The NITF graphics header (sarpy.io.general.nitf_elements.graphics)¶
The graphics header element definition.
- class sarpy.io.general.nitf_elements.graphics.GraphicsSegmentHeader(**kwargs)¶
Bases:
NITFElement
Graphics segment subheader - see standards document Joint BIIF Profile (JBP) for more information.
- SY: str¶
File part type. Takes values in
{'SY'}
. Default value isSY
.- Type:
str
- SID: str¶
Graphic Identifier. This field shall contain a valid alphanumeric identification code associated with the graphic. The valid codes are determined by the application.
- Type:
str
- SNAME: str¶
Graphic name. This field shall contain an alphanumeric name for the graphic.
- Type:
str
- Security: NITFSecurityTags¶
The security tags.
- Type:
- ENCRYP: str¶
Encryption. Takes values in
{'0'}
. Default value is0
.- Type:
str
- SFMT: str¶
Graphic Type. This field shall contain a valid indicator of the representation type of the graphic. Default value is
C
.- Type:
str
- SSTRUCT: int¶
Reserved for Future Use. Default value is
0
.- Type:
int
- SDLVL: int¶
Graphic Display Level. This field shall contain a valid value that indicates the graphic display level of the graphic relative to other displayed file components in a composite display. The valid values are
1-999
. The display level of each displayable file component (image or graphic) within a file shall be unique. Default value is1
.- Type:
int
- SALVL: int¶
Graphic Attachment Level. This field shall contain a valid value that indicates the attachment level of the graphic. Valid values for this field are 0 and the display level value of any other image or graphic in the file. Default value is
0
.- Type:
int
- SLOC: int¶
Graphic Location. The graphics location is specified by providing the location of the graphics origin point relative to the position (location of the CCS, image, or graphic to which it is attached. This field shall contain the graphic location offset from the ILOC or SLOC value of the CCS, image, or graphic to which the graphic is attached or from the origin of the CCS when the graphic is unattached (SALVL = 0). A row and column value of
0
indicates no offset. Positive row and column values indicate offsets down and to the right, while negative row and column values indicate offsets up and to the left. Default value is0
.- Type:
int
- SBND1: int¶
First Graphic Bound Location. This field shall contain an ordered pair of integers defining a location in Cartesian coordinates for use with CGM graphics. It is the upper left corner of the bounding box for the CGM graphic. Default value is
0
.- Type:
int
- SCOLOR: str¶
Graphic Color. If SFMT = C, this field shall contain a
C
if the CGM contains any color pieces or anM
if it is monochrome (i.e., black, white, or levels of grey). Takes values in{'M', 'C'}
. Default value isM
.- Type:
str
- SBND2: int¶
Second Graphic Bound Location. This field shall contain an ordered pair of integers defining a location in Cartesian coordinates for use with CGM graphics. It is the lower right corner of the bounding box for the CGM graphic. Default value is
0
.- Type:
int
- SRES2: int¶
Reserved for Future Use. Default value is
0
.- Type:
int
- UserHeader: UserHeaderType¶
User defined header.
- Type:
- classmethod from_bytes(value, start)¶
- Parameters:
value (bytes|str) – the header string to scrape
start (int) – the beginning location in the string
- get_bytes_length()¶
Get the length of the serialized bytes array
- Return type:
int
- classmethod minimum_length()¶
The minimum size in bytes that takes to write this header element.
- Return type:
int
- to_bytes()¶
Write the object to a properly packed str.
- Return type:
bytes
- to_json()¶
Serialize element to a json representation. This is intended to allow a simple presentation of the element.
- Return type:
dict