Exemplo n.º 1
0
        public bool ReadVisibleImage(int imageIndex)
        {
            System.DateTime FrameTime = System.DateTime.Now;


            var reader = new BufferReader(this.reader.GetImageData(imageIndex));

            if (reader.Eof)
            {
                return(false);
            }

            Width  = 0;
            Height = 0;


            //- Image header
            BytePerPixel = reader.ReadIntBE();
            Compressed   = reader.ReadIntBE();
            Width        = reader.ReadIntBE();
            Height       = reader.ReadIntBE();

            VisibleData = ReadVisibleImageData(reader, 8468, Width, Height, 276, Compressed);

            if (reader.Eof)
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Read image flags from the file
        /// </summary>
        public void ReadFlags(BufferReader reader, int offset)
        {
            CalibRange_min = reader.ReadSingleBE(offset + 92);
            CalibRange_max = reader.ReadSingleBE(offset + 96);


            Device           = reader.ReadNullTerminatedString(offset + 142, 12);
            DeviceSerial     = reader.ReadNullTerminatedString(offset + 186, 16);
            Optics           = reader.ReadNullTerminatedString(offset + 202, 32);
            OpticsResolution = reader.ReadNullTerminatedString(offset + 234, 32);
            OpticsText       = reader.ReadNullTerminatedString(offset + 554, 48);

            ShotRange_start_ERROR = reader.ReadSingleBE(offset + 532);
            ShotRange_size        = reader.ReadSingleBE(offset + 536);


            TimeStamp_Raw         = reader.ReadDoubleBE(8, offset + 540);
            TimeStampMilliseconds = reader.ReadIntBE(offset + 548);
            ImgAccu        = reader.ReadWordBE(offset + 580);
            ZoomHorizontal = reader.ReadWordBE(offset + 596);
            ZoomVertical   = reader.ReadWordBE(offset + 604);
            TimeStamp      = Double2DateTime(TimeStamp_Raw, TimeStampMilliseconds);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Read a image from the file
        /// </summary>
        public bool ReadImage(int imageIndex)
        {
            System.DateTime FrameTime = System.DateTime.Now;


            var reader = new BufferReader(this.reader.GetImageData(imageIndex));

            if (reader.Eof)
            {
                return(false);
            }

            Width  = 0;
            Height = 0;
            var i = 0;

            //- Image header
            BytePerPixel = reader.ReadWordBE();
            Compressed   = reader.ReadWordBE();
            Width        = reader.ReadWordBE();
            Height       = reader.ReadWordBE();


            UpperLeftX = reader.ReadWordBE();
            UpperLeftY = reader.ReadWordBE();

            FirstValidX = reader.ReadWordBE();


            LastValidX = reader.ReadWordBE();


            FirstValidY = reader.ReadWordBE();


            LastValidY = reader.ReadWordBE();
            Position   = reader.ReadSingleBE();

            Emissivity = reader.ReadSingleBE();

            Distanz = reader.ReadSingleBE();

            EnvironmentalTemp = reader.ReadSingleBE();


            AbsoConst       = reader.ReadSingleBE();
            PathTemperature = reader.ReadSingleBE();
            Version         = reader.ReadLongBE();

            //for (int pos = 0; pos < 1567; pos++)
            //    cbData[pos] = reader.ReadByte();

            Level        = reader.ReadSingleBE();
            Span         = reader.ReadSingleBE();
            ImgTime      = reader.ReadDoubleBE(8);
            ImgMilliTime = reader.ReadIntBE();
            //TimeStamp = Double2DateTime(ImgTime, (int)ImgMilliTime);
            ImgAccu        = reader.ReadWordBE();
            ImageComment   = reader.ReadStr(79, 0);
            ZoomHorizontal = reader.ReadSingleBE();
            ZoomVertical   = reader.ReadSingleBE();


            i = reader.ReadWordBE();
            i = reader.ReadWordBE();
            i = reader.ReadWordBE();
            i = reader.ReadWordBE();


            if ((Width > 10000) || (Height > 10000))
            {
                Width  = 1;
                Height = 1;
                return(false);
            }

            this.ReadFlags(reader, 1084);

            Data = ReadImageData(reader, 0x6C0, Width, Height, 60, Compressed);



            if (reader.Eof)
            {
                return(false);
            }

            return(true);
        }