00001 00022 #ifndef INC_SPATMOD_IMAGEFILTERSCALEOFFSET_H 00023 #define INC_SPATMOD_IMAGEFILTERSCALEOFFSET_H 00024 00025 #ifndef INC_SPATMOD_IMAGEFILTER_H 00026 #include <spatmod/imagefilter.h> 00027 #endif 00028 00029 #ifndef INC_MI32_DOUBLEAR_H 00030 #include <mi32/doublear.h> 00031 #endif 00032 00033 class MIMATRIX; 00034 00035 namespace SPATMOD { 00036 namespace IMAGE { 00037 00038 //===================================================================================================================== 00039 00042 class FILTER_SCALEOFFSET : public FILTER { 00043 public: 00044 00046 FILTER_SCALEOFFSET ( 00047 STAGE *pPreviousStage, 00048 bool TakeOwnership 00049 ); 00050 00052 virtual ~FILTER_SCALEOFFSET (); 00053 00056 double GetScale ( 00057 UINT16 SampleNum 00058 ) const; 00059 00061 void GetScales ( 00062 MIMATRIX& Scales 00063 ) const; 00064 00067 double GetOffset ( 00068 UINT16 SampleNum 00069 ) const; 00070 00072 void GetOffsets ( 00073 MIMATRIX& Offsets 00074 ) const; 00075 00077 void SetDoFloor ( 00078 bool DoFloor = true 00079 ) { m_DoFloor = DoFloor; } 00080 00082 ERRVALUE SetScaleOffset ( 00083 UINT16 SampleNum, 00084 double scale, 00085 double offset 00086 ); 00087 00090 ERRVALUE SetScaleOffsets ( 00091 const MIMATRIX& Scales, 00092 const MIMATRIX& Offsets 00093 ); 00094 00096 void SetScaleOffsets ( 00097 const double *Scales, 00098 const double *Offsets 00099 ); 00100 00101 private: 00102 #ifndef GENERATING_DOXYGEN_OUTPUT 00103 DOUBLE_ARRAY<double> m_Scales; 00104 DOUBLE_ARRAY<double> m_Offsets; 00105 bool m_CheckRange; 00106 bool m_DoFloor; 00107 00108 // STAGE overrides. 00109 virtual ERRVALUE v_PullSubSection (const SECTION& SubSection, BUFFER& buffer); 00110 virtual ERRVALUE v_Initialize (); 00111 00112 // Unimplemented 00113 FILTER_SCALEOFFSET (const FILTER_SCALEOFFSET&); 00114 FILTER_SCALEOFFSET& operator= (const FILTER_SCALEOFFSET&); 00115 #endif // GENERATING_DOXYGEN_OUTPUT 00116 00117 }; 00118 00119 //===================================================================================================================== 00120 00121 } // End namespace IMAGE 00122 } // End namespace SPATMOD 00123 00124 #endif // INC_SPATMOD_IMAGEFILTERSCALEOFFSET_H 00125
1.6.1