00001
00021 #ifndef INC_SPATMOD_IMAGEFILTERSTEREODUAL_H
00022 #define INC_SPATMOD_IMAGEFILTERSTEREODUAL_H
00023
00024 #ifndef INC_SPATMOD_IMAGEFILTER_H
00025 #include <spatmod/imagefilter.h>
00026 #endif
00027
00028 #ifndef INC_SPATMOD_IMAGESECTION_H
00029 #include <spatmod/imagesection.h>
00030 #endif
00031
00032 #ifndef INC_SPATMOD_IMAGESAMPLEITERATOR_H
00033 #include <spatmod/imagesampleiterator.h>
00034 #endif
00035
00036 #ifndef INC_SPATMOD_IMAGEHELPERRESAMPLE_H
00037 #include <spatmod/imagehelperresample.h>
00038 #endif
00039
00040 #ifndef INC_MI32_TRANS2MAPGEN_H
00041 #include <mi32/trans2dmapgen.h>
00042 #endif
00043
00044 #ifndef INC_MI32_RECT_H
00045 #include <mi32/rect.h>
00046 #endif
00047
00048 #ifndef INC_MI32_STEREOSHIFT_H
00049 #include <mi32/stereoshift.h>
00050 #endif
00051
00052 namespace SPATMOD {
00053 namespace IMAGE {
00054
00055 class BUFFER;
00056
00057
00058
00086 class FILTER_STEREO_DUAL : public FILTER {
00087 public:
00088
00090 FILTER_STEREO_DUAL (
00091 STAGE *pStageDrape,
00092 bool TakeOwnershipDrape,
00093 STAGE *pStageTerrain,
00094 bool TakeOwnershipTerrain,
00095 const STEREOSHIFT& StereoShift,
00096 const DIMENSIONS& Dimensions,
00097 const GEOREFERENCE& Georeference,
00098 RESAMPLEMETHOD ResampleMethod
00099 );
00100
00102 FILTER_STEREO_DUAL (
00103 STAGE *pStageDrape,
00104 bool TakeOwnershipDrape,
00105 STAGE *pStageTerrain,
00106 bool TakeOwnershipTerrain,
00107 const STEREOSHIFT& StereoShift,
00108 const BASE& RefImage,
00109 RESAMPLEMETHOD ResampleMethod
00110 );
00111
00112
00113 virtual ~FILTER_STEREO_DUAL ();
00114
00119 void SetAccuracy (
00120 double accuracy
00121 ) { m_Accuracy = accuracy; }
00122
00125 void SetPixelNoTerrain (
00126 const PIXEL& pixel,
00127 double BlendFactor
00128 );
00129
00130 private:
00131 #ifndef GENERATING_DOXYGEN_OUTPUT
00132 class BLENDER;
00133
00134 RESAMPLEMETHOD m_ResampleMethodDrape;
00135 RESAMPLEMETHOD m_ResampleMethodTerrain;
00136 TRANS2D_MAPGEN m_TransToPrev[2];
00137 DRECT2D m_RectTotalPrev[2];
00138 HELPER_RESAMPLE m_DrapeResampler;
00139 HELPER_RESAMPLE m_TerrainResampler;
00140 STEREOSHIFT m_StereoShift;
00141 BLENDER *m_BlenderNoTerrain;
00142 double m_DisplacementMax;
00143 double m_Accuracy;
00144 bool m_PullSinglePixels;
00145
00146 ERRVALUE ComputePrevMaxSectionSize (
00147 const SECTION_ITERATOR& TgtIterator,
00148 int StageIdx,
00149 DRECT2D& PrevRectAll,
00150 UINT32& PrevMaxColumns,
00151 UINT32& PrevMaxRows
00152 ) const;
00153
00154 ERRVALUE DoPullBegin (
00155 const SECTION_ITERATOR& TgtIterator,
00156 int StageIdx
00157 );
00158
00159 void ProcessMissingTerrain (
00160 INT32 TgtRow,
00161 INT32 TgtColumns,
00162 BUFFER& TgtFrame,
00163 const UINT8 *HasTerrain
00164 ) const;
00165
00166
00167 virtual ERRVALUE v_Initialize ();
00168 virtual ERRVALUE v_PullBegin (const SECTION_ITERATOR& iterator);
00169 virtual ERRVALUE v_PullSubSection (const SECTION& SubSection, BUFFER& buffer);
00170 virtual float v_QueryIterator (const SECTION_ITERATOR& iterator) const;
00171
00172
00173 FILTER_STEREO_DUAL (const FILTER_STEREO_DUAL&);
00174 FILTER_STEREO_DUAL& operator= (const FILTER_STEREO_DUAL&);
00175 #endif // GENERATING_DOXYGEN_OUTPUT
00176
00177 };
00178
00179
00180
00181 }
00182 }
00183
00184 #endif // INC_SPATMOD_IMAGEFILTERSTEREODUAL_H
00185