00001 00021 #ifndef INC_SPATMOD_IMAGEFILTERLINEAR_H 00022 #define INC_SPATMOD_IMAGEFILTERLINEAR_H 00023 00024 #ifndef INC_SPATMOD_IMAGEFILTER_H 00025 #include <spatmod/imagefilter.h> 00026 #endif 00027 00028 #ifndef INC_MI32_DOUBLEAR_H 00029 #include <mi32/doublear.h> 00030 #endif 00031 00032 class MIMATRIX; 00033 00034 namespace SPATMOD { 00035 namespace IMAGE { 00036 00037 //===================================================================================================================== 00038 00040 class FILTER_LINEAR : public FILTER { 00041 public: 00042 00049 FILTER_LINEAR ( 00050 STAGE *pPreviousStage, 00051 bool TakeOwnership, 00052 UINT16 NumTgtSamples = 0, 00053 bool PassOpacity = true 00054 ); 00055 00057 virtual ~FILTER_LINEAR (); 00058 00061 double GetCoefficient ( 00062 UINT16 TgtSampleNum, 00063 UINT16 SrcSampleNum 00064 ) const; 00065 00067 void GetCoefficients ( 00068 MIMATRIX& Coefficients 00069 ) const; 00070 00073 double GetOffset ( 00074 UINT16 TgtSampleNum 00075 ) const; 00076 00078 void GetOffsets ( 00079 MIMATRIX& Offsets 00080 ) const; 00081 00083 ERRVALUE SetCoefficient ( 00084 UINT16 TgtSampleNum, 00085 UINT16 SrcSampleNum, 00086 double value 00087 ); 00088 00092 ERRVALUE SetCoefficients ( 00093 const MIMATRIX& Coefficients 00094 ); 00095 00097 ERRVALUE SetOffset ( 00098 UINT16 TgtSampleNum, 00099 double value 00100 ); 00101 00104 ERRVALUE SetOffsets ( 00105 const MIMATRIX& Offsets 00106 ); 00107 00109 void SetOffsets ( 00110 const double *Offsets 00111 ); 00112 00113 protected: 00114 00115 // STAGE overrides. 00116 00121 virtual ERRVALUE v_Initialize (); 00122 00123 private: 00124 #ifndef GENERATING_DOXYGEN_OUTPUT 00125 DOUBLE_ARRAY<double> m_Coeff; 00126 DOUBLE_ARRAY<double> m_Offset; 00127 UINT16 m_NumSrcSamples; 00128 UINT16 m_NumTgtSamples; 00129 UINT16 m_NumOpacity; 00130 00131 // STAGE overrides. 00132 virtual ERRVALUE v_PullSubSection (const SECTION& SubSection, BUFFER& buffer); 00133 00134 // Unimplemented 00135 FILTER_LINEAR (const FILTER_LINEAR&); 00136 FILTER_LINEAR& operator= (const FILTER_LINEAR&); 00137 #endif // GENERATING_DOXYGEN_OUTPUT 00138 00139 }; 00140 00141 //===================================================================================================================== 00142 00143 } // End namespace IMAGE 00144 } // End namespace SPATMOD 00145 00146 #endif // INC_SPATMOD_IMAGEFILTERLINEAR_H 00147
1.6.1