MeVisLabToolboxReference
MeVisLab/Standard/Sources/ML/MLKernel/mlBitMorphologyFilter.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //-------------------------------------------------------------------------
00004 
00009 //-------------------------------------------------------------------------
00010 // Prevent multiple including of this file.
00011 #if !defined (__mlBitMorphologyFilter_H)
00012 #define __mlBitMorphologyFilter_H
00013 
00014 // ML-includes
00015 #ifndef __mlInitSystemKernel_H
00016 #include "mlInitSystemKernel.h"
00017 #endif
00018 #ifndef __mlKernelModule_H
00019 #include "mlKernelModule.h"
00020 #endif
00021 
00022 ML_START_NAMESPACE
00023 
00024   //-----------------------------------------------------------------
00037   //-----------------------------------------------------------------
00038   class MLKERNELEXPORT BitMorphologyFilter : public KernelModule{
00039 
00040   public:
00041 
00042     //---------------------------------------------------------------------------------
00056     //---------------------------------------------------------------------------------
00057     enum BitMorphologyFilterTypes {
00058       ID                        = 0,
00059       BIT_DILATION              ,
00060       BIT_EROSION               ,
00061 
00062       NUM_BIT_MORPHOLOGY_FILTERS
00063     };
00064 
00066     static const char* const BitMorphologyFilterNames[NUM_BIT_MORPHOLOGY_FILTERS];
00067 
00068     //-------------------------------------------------------------------
00085     //-------------------------------------------------------------------
00086     BitMorphologyFilter();
00087 
00091     inline EnumField *getBitMorphologyFilterFld() const { return _bitMorphologyFilterFld; }
00092 
00093   protected:
00095     virtual void handleNotification(Field* field);
00096 
00102     virtual void calculateOutputImageProperties(int outIndex);
00103 
00109     CALC_ROW_H();
00110 
00115     template <typename DATATYPE>
00116       void calcRow(MLsoffset    *indexTab,
00117                    size_t       indexTabSize,
00118                    MLsoffset    srcVoxelOffset,
00119                    size_t       numVox,
00120                    DATATYPE     *inCursor,
00121                    DATATYPE     *outCursor,
00122                    const ImageVector &/*rowStart*/);
00123 
00124   private:
00127     EnumField *_bitMorphologyFilterFld;
00128 
00133     ML_MODULE_CLASS_HEADER(BitMorphologyFilter);
00134  };
00135 
00136 ML_END_NAMESPACE
00137 
00138 #endif //of __mlBitMorphologyFilter_H
00139 
00140 
00141 
00142