00001
00066 #ifndef INC_SPATMOD_IMAGEFILTERRESAMPLE_H
00067 #define INC_SPATMOD_IMAGEFILTERRESAMPLE_H
00068
00069 #ifndef INC_SPATMOD_IMAGEFILTER_H
00070 #include <spatmod/imagefilter.h>
00071 #endif
00072
00073 #ifndef INC_SPATMOD_IMAGESECTION_H
00074 #include <spatmod/imagesection.h>
00075 #endif
00076
00077 #ifndef INC_SPATMOD_IMAGESAMPLEITERATOR_H
00078 #include <spatmod/imagesampleiterator.h>
00079 #endif
00080
00081 #ifndef INC_SPATMOD_IMAGEHELPERRESAMPLE_H
00082 #include <spatmod/imagehelperresample.h>
00083 #endif
00084
00085 #ifndef INC_MI32_TRANS2DMAPGEN_H
00086 #include <mi32/trans2dmapgen.h>
00087 #endif
00088
00089 #ifndef INC_MI32_RECT_H
00090 #include <mi32/rect.h>
00091 #endif
00092
00093 namespace SPATMOD {
00094 namespace IMAGE {
00095
00096 class BUFFER;
00097
00098
00099
00109 class FILTER_RESAMPLE : public FILTER {
00110 public:
00111
00113 FILTER_RESAMPLE (
00114 STAGE *pPreviousStage,
00115 bool TakeOwnership,
00116 const DIMENSIONS& Dimensions,
00117 const GEOREFERENCE& Georeference,
00118 RESAMPLEMETHOD ResampleMethod
00119 );
00120
00122 FILTER_RESAMPLE (
00123 STAGE *pPreviousStage,
00124 bool TakeOwnership,
00125 const BASE& RefImage,
00126 RESAMPLEMETHOD ResampleMethod
00127 );
00128
00132 FILTER_RESAMPLE (
00133 STAGE *pPreviousStage,
00134 bool TakeOwnership,
00135 const DIMENSIONS& Dimensions,
00136 const TRANS2D_MAPGEN& TransToPrev,
00137 RESAMPLEMETHOD ResampleMethod
00138 );
00139
00140
00141 virtual ~FILTER_RESAMPLE ();
00142
00145 const TRANS2D_MAPGEN& GetTransToPrev () const
00146 { return (m_TransToPrev); }
00147
00152 void SetAccuracy (
00153 double accuracy
00154 ) { m_Accuracy = accuracy; }
00155
00159 void SetUsePrevStageZoom (
00160 bool UsePrevStageZoom
00161 ) { m_UsePrevStageZoom = UsePrevStageZoom; }
00162
00163 private:
00164 #ifndef GENERATING_DOXYGEN_OUTPUT
00165 RESAMPLEMETHOD m_ResampleMethod;
00166 TRANS2D_MAPGEN m_TransToPrev;
00167 DRECT2D m_SrcRectTotal;
00168 DOUBLE_ARRAY<DPOINT2D> m_SrcCoord;
00169 DOUBLE_ARRAY<DPOINT2D> m_TgtCoord;
00170 HELPER_RESAMPLE m_Resampler;
00171 double m_Accuracy;
00172 bool m_PullSinglePixels;
00173 bool m_HasTrans;
00174 bool m_UsePrevStageZoom;
00175
00176 ERRVALUE ComputeSrcMaxSectionSize (
00177 const SECTION_ITERATOR& TgtIterator,
00178 DRECT2D& SrcRectAll,
00179 UINT32& SrcMaxColumns,
00180 UINT32& SrcMaxRows,
00181 bool AllowEstimate
00182 ) const;
00183
00184 ERRVALUE PullGeneral (const SECTION& SubSection, BUFFER& buffer);
00185
00186
00187 virtual const char* v_GetTypeName () const;
00188 virtual ERRVALUE v_Initialize ();
00189 virtual ERRVALUE v_PullBegin (const SECTION_ITERATOR& iterator);
00190 virtual ERRVALUE v_PullEnd ();
00191 virtual ERRVALUE v_PullSubSection (const SECTION& SubSection, BUFFER& buffer);
00192 virtual float v_QueryIterator (const SECTION_ITERATOR& iterator) const;
00193
00194
00195 FILTER_RESAMPLE (const FILTER_RESAMPLE&);
00196 FILTER_RESAMPLE& operator= (const FILTER_RESAMPLE&);
00197 #endif // GENERATING_DOXYGEN_OUTPUT
00198
00199 };
00200
00201
00202
00203 }
00204 }
00205
00206 #endif // INC_SPATMOD_IMAGEFILTERRESAMPLE_H
00207