private void parseRPFColorOffsetRecord(java.nio.ByteBuffer buffer)
 {
     this.tableID               = NITFSUtil.getUShort(buffer);
     this.numOfColorRecords     = NITFSUtil.getUInt(buffer);
     this.colorElementLength    = NITFSUtil.getByteAsShort(buffer);
     this.histogramRecordLength = NITFSUtil.getUShort(buffer);
     this.colorTableOffset      = NITFSUtil.getUInt(buffer);
     this.histogramTableOffset  = NITFSUtil.getUInt(buffer);
 }
Exemple #2
0
        public RPFBoundingRectangleSection(ByteBuffer buffer)
        {
            // [ bounding rectangle section subheader ]
            this.tableOffset     = NITFSUtil.getUInt(buffer);
            this.numberOfRecords = NITFSUtil.getUShort(buffer);
            this.recordLength    = NITFSUtil.getUShort(buffer);

            parseBoundsRecords(buffer);
        }
Exemple #3
0
//    public ArrayList<String> getPathnameTable()
//    {
//        return pathnameTable;
//    }

        public RPFFrameFileIndexSection(java.nio.ByteBuffer buffer)
        {
            // [ frame file index section subheader ]
            this.highestSecurityClassification = NITFSUtil.getString(buffer, 1);
            this.frameFileIndexTableOffset     = NITFSUtil.getUInt(buffer);
            this.numOfFrameFileIndexRecords    = NITFSUtil.getUInt(buffer);
            this.numOfPathnameRecords          = NITFSUtil.getUShort(buffer);
            this.frameFileIndexRecordLength    = NITFSUtil.getUShort(buffer);

            this.parseFrameFileIndexAndPathnameTables(buffer);
        }
Exemple #4
0
            private String pathname; // this field is not part of the NITFS spec

            public RPFFrameFileIndexRecord(java.nio.ByteBuffer buffer)
            {
                this.boundaryRectangleRecordNumber = NITFSUtil.getUShort(buffer);
                this.frameLocationRowNumber        = NITFSUtil.getUShort(buffer);
                this.frameLocationColumnNumber     = NITFSUtil.getUShort(buffer);
                this.pathnameRecordOffset          = NITFSUtil.getUInt(buffer);
                this.frameFileName       = NITFSUtil.getString(buffer, 12);
                this.geoLocation         = NITFSUtil.getString(buffer, 6);
                this.securityClass       = NITFSUtil.getString(buffer, 1);
                this.securityCountryCode = NITFSUtil.getString(buffer, 2);
                this.securityReleaseMark = NITFSUtil.getString(buffer, 2);
                this.pathname            = "";
            }
Exemple #5
0
 private void parseImageDescriptionSubheader(java.nio.ByteBuffer buffer)
 {
     this.numOfSpectralGroups                 = NITFSUtil.getUShort(buffer);
     this.numOfSubframeTables                 = NITFSUtil.getUShort(buffer);
     this.numOfSpectralBandTables             = NITFSUtil.getUShort(buffer);
     this.numOfSpectralBandLinesPerImageRow   = NITFSUtil.getUShort(buffer);
     this.numOfSubframesInEastWestDirection   = NITFSUtil.getUShort(buffer);
     this.numOfSubframesInNorthSouthDirection = NITFSUtil.getUShort(buffer);
     this.numOfOutputColumnsPerSubframe       = NITFSUtil.getUInt(buffer);
     this.numOfOutputRowsPerSubframe          = NITFSUtil.getUInt(buffer);
     this.subframeMaskTableOffset             = NITFSUtil.getUInt(buffer);
     this.transparencyMaskTableOffset         = NITFSUtil.getUInt(buffer);
 }
Exemple #6
0
        private void parseColormapSubSection(java.nio.ByteBuffer buffer)
        {
            buffer.position(this.componentLocationTable.getColormapSubsectionLocation());

            this.colormapOffsetTableOffset           = NITFSUtil.getUInt(buffer);
            this.colormapGrayscaleOffsetRecordLength = NITFSUtil.getUShort(buffer);
            // read color / grayscale AND histogram records; builds a ColorMap (LUT)
            if (0 < this.numOfColorGrayscaleOffsetRecords)
            {
                rpfColorMaps = new RPFColorMap[this.numOfColorGrayscaleOffsetRecords];
                for (int i = 0; i < this.numOfColorGrayscaleOffsetRecords; i++)
                {
                    rpfColorMaps[i] = new RPFColorMap(buffer, this.componentLocationTable.getColormapSubsectionLocation());
                }
            }
            else
            {
                throw new NITFSRuntimeException("NITFSReader.InvalidNumberOfRPFColorGrayscaleRecords");
            }
        }
Exemple #7
0
        public RPFLocationSection(java.nio.ByteBuffer buffer)
        {
            this.locationSectionLength         = NITFSUtil.getUShort(buffer);
            this.componentLocationTableOffset  = NITFSUtil.getUInt(buffer);
            this.numOfComponentLocationRecords = NITFSUtil.getUShort(buffer);
            this.componentLocationRecordLength = NITFSUtil.getUShort(buffer);
            this.componentAggregateLength      = NITFSUtil.getUInt(buffer);

            if (this.numOfComponentLocationRecords < 2)
            {
                throw new NITFSRuntimeException("NITFSReader:InvalidNumberOfComponentLocationRecords");
            }

            for (int i = 0; i < this.numOfComponentLocationRecords; i++)
            {
                int id = NITFSUtil.getUShort(buffer);
                table.put(id, new ComponentLocationRecord(id,
                                                          NITFSUtil.getUInt(buffer), // read uint:4 as "length"
                                                          NITFSUtil.getUInt(buffer)  // read uint:4 as "location"
                                                          ));
            }
        }
Exemple #8
0
 public RPFBoundingRectangleRecord(ByteBuffer buffer)
 {
     this.dataType         = NITFSUtil.getString(buffer, 5);
     this.compressionRatio = NITFSUtil.getString(buffer, 5);
     this.scale            = NITFSUtil.getString(buffer, 12);
     this.zone             = NITFSUtil.getString(buffer, 1);
     this.producer         = NITFSUtil.getString(buffer, 5);
     this.ulLat            = buffer.getDouble();
     this.ulLon            = buffer.getDouble();
     this.llLat            = buffer.getDouble();
     this.llLon            = buffer.getDouble();
     this.urLat            = buffer.getDouble();
     this.urLon            = buffer.getDouble();
     this.lrLat            = buffer.getDouble();
     this.lrLon            = buffer.getDouble();
     this.nsRes            = buffer.getDouble();
     this.ewRes            = buffer.getDouble();
     this.latInterval      = buffer.getDouble();
     this.lonInterval      = buffer.getDouble();
     this.numFramesNS      = NITFSUtil.getUInt(buffer);
     this.numFramesEW      = NITFSUtil.getUInt(buffer);
 }
Exemple #9
0
 public RelatedImagesSection(java.nio.ByteBuffer buffer)
 {
     this.relatedImageDescriptionTableOffset  = NITFSUtil.getUInt(buffer);
     this.numOfRelatedImageDescriptionRecords = NITFSUtil.getUShort(buffer);
     this.relatedImageDescriptionRecordLength = NITFSUtil.getUShort(buffer);
 }