MeVisLabToolboxReference
MeVisLab/Standard/Sources/ML/MLKernel/mlLocalMaximaFilter.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //--------------------------------------------------------------------------------
00004 
00009 //--------------------------------------------------------------------------------
00010 // Prevent multiple including of this file.
00011 #ifndef __mlLocalMaximaFilter_H
00012 #define __mlLocalMaximaFilter_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   //--------------------------------------------------------------------------------
00034   //--------------------------------------------------------------------------------
00035   class MLKERNELEXPORT LocalMaximaFilter : public KernelModule {
00036 
00037   public:
00038     
00039     //-------------------------------------------------------------------
00061     //-------------------------------------------------------------------
00062     LocalMaximaFilter();
00063 
00064     //-------------------------------------------------------------------
00066 
00067     //-------------------------------------------------------------------
00068     inline BoolField &getReturnSourceValueField     () const { return *_returnSourceValueFld  ; }
00069     inline BoolField &getCalculateMinimaField       () const { return *_calculateMinimaFld    ; }
00070     inline BoolField &getCalculateRealMaximaField   () const { return *_calculateRealMaximaFld; }
00072 
00073   protected:
00074 
00076     virtual void calculateOutputImageProperties(int outIndex);
00077 
00083     CALC_ROW_H();
00084 
00087     template <typename DATATYPE> 
00088     void calcRow(MLsoffset    *indexTab,
00089                  size_t       indexTabSize,
00090                  MLsoffset    srcVoxelOffset,
00091                  size_t       numVox,
00092                  DATATYPE     *inCursor,
00093                  DATATYPE     *outCursor,
00094                  const ImageVector &/*rowStart*/);
00095 
00096 
00097   private:
00098 
00100     BoolField *_returnSourceValueFld;
00101 
00103     BoolField *_calculateMinimaFld;
00104 
00107     BoolField *_calculateRealMaximaFld;
00108 
00113     ML_MODULE_CLASS_HEADER(LocalMaximaFilter);
00114   };
00115 
00116 ML_END_NAMESPACE
00117 
00118 #endif //of __mlLocalMaximaFilter_H
00119 
00120