Esempio n. 1
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);
            }
        }
Esempio n. 2
0
        public FixVignetteRadial(FileReader aPefFile, uint aID, uint aVersion, uint aFlags, uint aSizeInBytes)
            : base(aID, aVersion, aFlags, aSizeInBytes)
        {
            if (aSizeInBytes != 7 * sizeof(double))
            {
                throw new ArgumentException("Opcode parameter length doesn't match opcode.");
            }
            _coefficients = new Coefficients();

            _coefficients.K0 = aPefFile.ReadF8BE();
            _coefficients.K1 = aPefFile.ReadF8BE();
            _coefficients.K2 = aPefFile.ReadF8BE();
            _coefficients.K3 = aPefFile.ReadF8BE();
            _coefficients.K4 = aPefFile.ReadF8BE();
            _coefficients.Cx = aPefFile.ReadF8BE();
            _coefficients.Cy = aPefFile.ReadF8BE();
        }
Esempio n. 3
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. 4
0
 public WarpRectilinear(FileReader aPefFile, uint aID, uint aVersion, uint aFlags, uint aSizeInBytes)
     : base(aID, aVersion, aFlags, aSizeInBytes)
 {
     _coefficientSetCount = aPefFile.ReadI4BE();
     if (aSizeInBytes != 4 + _coefficientSetCount * 6 * sizeof(double) + 2 * sizeof(double))
     {
         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();
         c.Kt0 = aPefFile.ReadF8BE();
         c.Kt1 = aPefFile.ReadF8BE();
         _coefficients.Add(c);
     }
     _Cx = aPefFile.ReadF8BE();
     _Cy = aPefFile.ReadF8BE();
 }