00001
00015 #ifndef INC_SPATMOD_IMAGEFILTERVALIDITYNEAR_H
00016 #define INC_SPATMOD_IMAGEFILTERVALIDITYNEAR_H
00017
00018 #ifndef INC_SPATMOD_IMAGEFILTER_H
00019 #include <spatmod/imagefilter.h>
00020 #endif
00021
00022 #ifndef INC_MI32_MILIST_H
00023 #include <mi32/milist.h>
00024 #endif
00025
00026 #ifndef INC_MI32_DOUBLEAR_H
00027 #include <mi32/doublear.h>
00028 #endif
00029
00030 struct COLOR;
00031
00032 namespace SPATMOD {
00033 namespace IMAGE {
00034
00035
00036
00039 class FILTER_VALIDITYNEAR : public FILTER {
00040 public:
00041
00043 enum MEASURE {
00044 MEASURE_Euclidean,
00045 MEASURE_Orthogonal
00046 };
00047
00049 FILTER_VALIDITYNEAR (
00050 STAGE *pPreviousStage,
00051 bool TakeOwnership,
00052 MEASURE Measure,
00053 bool ResultValid,
00054 bool TestOpacity = false
00055 );
00056
00057 virtual ~FILTER_VALIDITYNEAR ();
00058
00061 ERRVALUE AddValue (
00062 const PIXEL& value,
00063 double distance
00064 );
00065
00068 ERRVALUE AddValue (
00069 const COLOR& color,
00070 double distance,
00071 bool use8bit = true
00072 );
00073
00076 ERRVALUE SetSamplesTest (
00077 const UINT16 *SamplesTest,
00078 UINT16 NumSamplesTest
00079 );
00080
00081 private:
00082 #ifndef GENERATING_DOXYGEN_OUTPUT
00083 MEASURE m_Measure;
00084 bool m_ResultValid;
00085 SIMPLE_ARRAY<UINT16> m_SamplesTest;
00086 MILIST<PIXEL> m_PixelList;
00087 DOUBLE_ARRAY<double> m_DistanceArray;
00088 DATATYPE m_DataTypeTest;
00089
00090 void ProcessUINT8 (BUFFER& buffer, INT32 NumRows, INT32 NumColumns) const;
00091 void ProcessSINT8 (BUFFER& buffer, INT32 NumRows, INT32 NumColumns) const;
00092 void ProcessUINT16 (BUFFER& buffer, INT32 NumRows, INT32 NumColumns) const;
00093 void ProcessSINT16 (BUFFER& buffer, INT32 NumRows, INT32 NumColumns) const;
00094 void ProcessUINT32 (BUFFER& buffer, INT32 NumRows, INT32 NumColumns) const;
00095 void ProcessSINT32 (BUFFER& buffer, INT32 NumRows, INT32 NumColumns) const;
00096 void ProcessFloat (BUFFER& buffer, INT32 NumRows, INT32 NumColumns) const;
00097 void ProcessDouble (BUFFER& buffer, INT32 NumRows, INT32 NumColumns) const;
00098
00099
00100 virtual ERRVALUE v_PullSubSection (const SECTION& SubSection, BUFFER& buffer);
00101 virtual ERRVALUE v_Initialize ();
00102
00103
00104 FILTER_VALIDITYNEAR (const FILTER_VALIDITYNEAR&);
00105 FILTER_VALIDITYNEAR& operator= (const FILTER_VALIDITYNEAR&);
00106 #endif // GENERATING_DOXYGEN_OUTPUT
00107 };
00108
00109
00110
00111 }
00112 }
00113
00114 #endif // INC_SPATMOD_IMAGEFILTERVALIDITYNEAR_H