MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //------------------------------------------------------------------------- 00005 00010 //------------------------------------------------------------------------- 00011 // Prevent multiple including of this file. 00012 #if !defined (__mlExtConvolutionFilter_H) 00013 #define __mlExtConvolutionFilter_H 00014 00015 // ML-includes 00016 #ifndef __mlInitSystemKernel_H 00017 #include "mlInitSystemKernel.h" 00018 #endif 00019 #ifndef __mlKernel_H 00020 #include "mlKernel.h" 00021 #endif 00022 #ifndef __mlKernelModule_H 00023 #include "mlKernelModule.h" 00024 #endif 00025 00026 ML_START_NAMESPACE 00027 00028 //-------------------------------------------------- 00036 //-------------------------------------------------- 00037 class MLKERNELEXPORT ExtConvolutionFilter : public KernelModule{ 00038 00039 public: 00040 00041 //-------------------------------------------------------------------------------------------------------- 00053 //-------------------------------------------------------------------------------------------------------- 00054 enum KernelType { 00055 AVERAGE_KERNEL = 0, 00056 GAUSS_KERNEL , 00057 ID_KERNEL , 00058 00059 NUM_KERNEL_TYPES 00060 }; 00061 00062 //------------------------------------------------------------------- 00064 //------------------------------------------------------------------- 00065 static const char* const mlKernelTypeNames[]; 00066 00067 //------------------------------------------------------------------- 00086 //------------------------------------------------------------------- 00087 ExtConvolutionFilter(); 00088 00090 EnumField *getKernelTypeFld() { return _kernelTypeFld; } 00091 00092 protected: 00094 virtual void handleNotification(Field* field); 00095 00098 virtual void _userKernelPostUpdate(); 00099 00101 virtual void calculateOutputImageProperties(int outIndex); 00102 00108 CALC_ROW_H(); 00109 00112 template <typename DATATYPE> 00113 void calcRow(MLsoffset *indexTab, 00114 size_t indexTabSize, 00115 MLsoffset srcVoxelOffset, 00116 size_t numVox, 00117 DATATYPE *inCursor, 00118 DATATYPE *outCursor, 00119 const ImageVector &/*rowStart*/); 00120 00121 private: 00125 EnumField *_kernelTypeFld; 00126 00131 ML_MODULE_CLASS_HEADER(ExtConvolutionFilter); 00132 }; 00133 00134 ML_END_NAMESPACE 00135 00136 #endif //of __mlExtConvolutionFilter_H 00137 00138 00139 00140