sarkit.sicd.NitfReader
- class NitfReader(file)
Read a SICD NITF
A NitfReader object can be used as a context manager in a
withstatement. Attributes, but not methods, can be safely accessed outside of the context manager’s context.- Parameters:
- file
file object SICD NITF file to read
- file
- Attributes:
- metadata
NitfMetadata SICD NITF metadata
- jbp
jbpy.Jbp NITF file object
- metadata
Methods
done()Indicates to the reader that the user is done with it
read_image(*[, out])Read the entire pixel array
read_sub_image([start_row, start_col, ...])Read a 2D slice / sub-image from the file
See also
Examples
>>> import sarkit.sicd as sicd >>> with file.open("rb") as f, sksicd.NitfReader(f) as r: ... img = r.read_image() >>> print(r.metadata.xmltree.getroot().tag) {urn:SICD:1.4.0}SICD >>> print(r.metadata.im_subheader_part.isorce) this sensor >>> print(r.jbp["FileHeader"]["FTITLE"].value) SARkit example SICD FTITLE