MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //------------------------------------------------------------------------- 00004 00009 //------------------------------------------------------------------------- 00010 // Prevent multiple including of this file. 00011 #if !defined(__mlMorphologyFilter_H) 00012 #define __mlMorphologyFilter_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 //------------------------------------------------------------------------- 00033 //------------------------------------------------------------------------- 00034 class MLKERNELEXPORT MorphologyFilter : public KernelModule{ 00035 00036 public: 00037 00038 //-------------------------------------------------------------------------------------------------------- 00058 //-------------------------------------------------------------------------------------------------------- 00059 enum MorphologyFilters { 00060 ID = 0, 00061 DILATION , 00062 EROSION , 00063 00064 NUM_MORPHOLOGY_FILTERS 00065 }; 00066 00067 //------------------------------------------------------------------- 00069 //------------------------------------------------------------------- 00070 static const char* const MorphologyFilterNames[]; 00071 00072 00073 //------------------------------------------------------------------- 00093 //------------------------------------------------------------------- 00094 MorphologyFilter(); 00095 00099 inline EnumField *getMorphologyFilterFld() const { return _morphologyFilterFld; } 00100 00101 protected: 00106 virtual void _userKernelPostUpdate(); 00107 00109 virtual void handleNotification(Field* field); 00110 00113 virtual void calculateOutputImageProperties(int outIndex); 00114 00120 CALC_ROW_H(); 00121 00124 template <typename DATATYPE> 00125 void calcRow(MLsoffset *indexTab, 00126 size_t indexTabSize, 00127 MLsoffset srcVoxelOffset, 00128 size_t numVox, 00129 DATATYPE *inCursor, 00130 DATATYPE *outCursor, 00131 const ImageVector &/*rowStart*/); 00132 00133 private: 00134 00135 //------------------------------------------------------------------- 00137 00138 //------------------------------------------------------------------- 00140 EnumField *_morphologyFilterFld; 00142 00147 ML_MODULE_CLASS_HEADER(MorphologyFilter); 00148 }; 00149 00150 ML_END_NAMESPACE 00151 00152 #endif //of __mlMorphologyFilter_H 00153 00154