Esempio n. 1
0
        public FixBadPixelsList(FileReader aPefFile, uint aID, uint aVersion, uint aFlags, uint aSizeInBytes)
            : base(aID, aVersion, aFlags, aSizeInBytes)
        {
            _bayerPhase = aPefFile.ReadI4BE();
            int badPointCount = aPefFile.ReadI4BE();
            int badRectCount  = aPefFile.ReadI4BE();

            _badPoints = new List <BadPoint>();
            _badRects  = new List <BadRect>();

            for (int i = 0; i < badPointCount; i++)
            {
                BadPoint p = new BadPoint();
                p.Row    = aPefFile.ReadI4BE();
                p.Column = aPefFile.ReadI4BE();
                _badPoints.Add(p);
            }
            for (int i = 0; i < badRectCount; i++)
            {
                BadRect r = new BadRect();
                r.Top    = aPefFile.ReadI4BE();
                r.Left   = aPefFile.ReadI4BE();
                r.Bottom = aPefFile.ReadI4BE();
                r.Right  = aPefFile.ReadI4BE();
                _badRects.Add(r);
            }
        }
Esempio n. 2
0
        public FixBadPixelsConstant(FileReader aPefFile, uint aID, uint aVersion, uint aFlags, uint aSizeInBytes)
            : base(aID, aVersion, aFlags, aSizeInBytes)
        {
            if (aSizeInBytes != 2 * sizeof(int))
            {
                throw new ArgumentException("Opcode parameter length doesn't match opcode.");
            }

            _constant   = aPefFile.ReadI4BE();
            _bayerPhase = aPefFile.ReadI4BE();
        }
Esempio n. 3
0
        public TrimBounds(FileReader aPefFile, uint aID, uint aVersion, uint aFlags, uint aSizeInBytes)
            : base(aID, aVersion, aFlags, aSizeInBytes)
        {
            if (aSizeInBytes != 4 * sizeof(int))
            {
                throw new ArgumentException("Opcode parameter length doesn't match opcode.");
            }

            _top    = aPefFile.ReadI4BE();
            _left   = aPefFile.ReadI4BE();
            _bottom = aPefFile.ReadI4BE();
            _right  = aPefFile.ReadI4BE();
        }
Esempio n. 4
0
 public MapPolynomial(FileReader aPefFile, uint aID, uint aVersion, uint aFlags, uint aSizeInBytes)
     : base(aID, aVersion, aFlags, aSizeInBytes)
 {
     _top          = aPefFile.ReadI4BE();
     _left         = aPefFile.ReadI4BE();
     _bottom       = aPefFile.ReadI4BE();
     _right        = aPefFile.ReadI4BE();
     _plane        = aPefFile.ReadI4BE();
     _planes       = aPefFile.ReadI4BE();
     _rowPitch     = aPefFile.ReadI4BE();
     _colPitch     = aPefFile.ReadI4BE();
     _degree       = aPefFile.ReadI4BE();
     _coefficients = new List <double>();
     for (int i = 0; i < _degree + 1; i++)
     {
         double t = aPefFile.ReadF8BE();
         _coefficients.Add(t);
     }
 }
Esempio n. 5
0
        public ScalePerRow(FileReader aPefFile, uint aID, uint aVersion, uint aFlags, uint aSizeInBytes)
            : base(aID, aVersion, aFlags, aSizeInBytes)
        {
            _top      = aPefFile.ReadI4BE();
            _left     = aPefFile.ReadI4BE();
            _bottom   = aPefFile.ReadI4BE();
            _right    = aPefFile.ReadI4BE();
            _plane    = aPefFile.ReadI4BE();
            _planes   = aPefFile.ReadI4BE();
            _rowPitch = aPefFile.ReadI4BE();
            _colPitch = aPefFile.ReadI4BE();
            int count = aPefFile.ReadI4BE();

            _scale = new List <float>();
            for (int i = 0; i < count; i++)
            {
                float t = aPefFile.ReadF4BE();
                _scale.Add(t);
            }
        }
Esempio n. 6
0
        public MapTable(FileReader aPefFile, uint aID, uint aVersion, uint aFlags, uint aSizeInBytes)
            : base(aID, aVersion, aFlags, aSizeInBytes)
        {
            _top      = aPefFile.ReadI4BE();
            _left     = aPefFile.ReadI4BE();
            _bottom   = aPefFile.ReadI4BE();
            _right    = aPefFile.ReadI4BE();
            _plane    = aPefFile.ReadI4BE();
            _planes   = aPefFile.ReadI4BE();
            _rowPitch = aPefFile.ReadI4BE();
            _colPitch = aPefFile.ReadI4BE();
            int tableSize = aPefFile.ReadI4BE();

            _tableEntries = new List <short>();
            for (int i = 0; i < tableSize; i++)
            {
                short t = aPefFile.ReadI2BE();
                _tableEntries.Add(t);
            }
        }
Esempio n. 7
0
 public WarpFisheye(FileReader aPefFile, uint aID, uint aVersion, uint aFlags, uint aSizeInBytes)
     : base(aID, aVersion, aFlags, aSizeInBytes)
 {
     _coefficientSetCount = aPefFile.ReadI4BE();
     if (aSizeInBytes != _coefficientSetCount * 6 * sizeof(double) + 4)
     {
         throw new ArgumentException("Opcode parameter length doesn't match opcode.");
     }
     _coefficients = new List <Coefficients>();
     for (int i = 0; i < _coefficientSetCount; i++)
     {
         Coefficients c = new Coefficients();
         c.Kr0 = aPefFile.ReadF8BE();
         c.Kr1 = aPefFile.ReadF8BE();
         c.Kr2 = aPefFile.ReadF8BE();
         c.Kr3 = aPefFile.ReadF8BE();
         _coefficients.Add(c);
     }
     _Cx = aPefFile.ReadF8BE();
     _Cy = aPefFile.ReadF8BE();
 }
Esempio n. 8
0
        public GainMap(FileReader aPefFile, uint aID, uint aVersion, uint aFlags, uint aSizeInBytes)
            : base(aID, aVersion, aFlags, aSizeInBytes)
        {
            _top         = aPefFile.ReadI4BE();
            _left        = aPefFile.ReadI4BE();
            _bottom      = aPefFile.ReadI4BE();
            _right       = aPefFile.ReadI4BE();
            _plane       = aPefFile.ReadI4BE();
            _planes      = aPefFile.ReadI4BE();
            _rowPitch    = aPefFile.ReadI4BE();
            _colPitch    = aPefFile.ReadI4BE();
            _mapPointsV  = aPefFile.ReadI4BE();
            _mapPointsH  = aPefFile.ReadI4BE();
            _mapSpacingV = aPefFile.ReadF8BE();
            _mapSpacingH = aPefFile.ReadF8BE();
            _mapOriginV  = aPefFile.ReadF8BE();
            _mapOriginH  = aPefFile.ReadF8BE();
            _mapPlanes   = aPefFile.ReadI4BE();

            _mapGain = new List <float>();
            for (int i = 0; i < _mapPointsV * _mapPointsH * _mapPlanes; i++)
            {
                float t = aPefFile.ReadF4BE();
                _mapGain.Add(t);
            }
        }