sarkit.sidd.NitfReader
- class NitfReader(file)
Read a SIDD NITF
A NitfReader object should 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 SIDD NITF file to read
- file
- Attributes:
- metadata
NitfMetadata SIDD NITF metadata
- jbp
jbpy.Jbp NITF file object
- metadata
Methods
read_ded(*[, out])Read Digital Elevation Data (DED)
read_image(image_number, *[, out])Read the entire pixel array
read_legend(image_number, legend_number, *)Read a legend
See also
Examples
>>> import sarkit.sidd as sksidd >>> with file.open("rb") as f, sksidd.NitfReader(f) as r: ... img = r.read_image(0) >>> print(r.metadata.images[0].xmltree.getroot().tag) {urn:SIDD:3.0.0}SIDD >>> print(r.metadata.file_header_part.ftitle) sarkit example >>> print(r.jbp["FileHeader"]["FTITLE"].value) sarkit example