X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkMorphoMathGenericFilter.h;h=5b00ccb39d78a9ea047be64fd465ca33ef40261b;hb=69dacfe0651ee24bef0f9e6b41171b9eec96fd2e;hp=23a8c23be2d8126227a72286e7204610c0509807;hpb=2f5b335da5621bdfc86cb594cc667d0929f4d8e3;p=clitk.git diff --git a/segmentation/clitkMorphoMathGenericFilter.h b/segmentation/clitkMorphoMathGenericFilter.h old mode 100755 new mode 100644 index 23a8c23..5b00ccb --- a/segmentation/clitkMorphoMathGenericFilter.h +++ b/segmentation/clitkMorphoMathGenericFilter.h @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,85 +14,58 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ -#ifndef clitkMorphoMathGenericFilter_h -#define clitkMorphoMathGenericFilter_h -/** - ================================================= - * @file clitkMorphoMathGenericFilter.h - * @author Jef Vandemeulebroucke - * @date 5 May 2009 - * - * @brief - * - =================================================*/ + ===========================================================================**/ +#ifndef CLITKMORPHOMATHGENERICFILTER_H +#define CLITKMORPHOMATHGENERICFILTER_H // clitk include #include "clitkIO.h" #include "clitkImageCommon.h" +#include "clitkImageToImageGenericFilter.h" #include "clitkMorphoMath_ggo.h" -#include "clitkConditionalBinaryErodeImageFilter.h" -#include "clitkConditionalBinaryDilateImageFilter.h" +#include "clitkMorphoMathFilter.h" -// itk include -#include "itkLightObject.h" -#include "itkBinaryErodeImageFilter.h" -#include "itkBinaryDilateImageFilter.h" -#include "itkBinaryMorphologicalClosingImageFilter.h" -#include "itkBinaryMorphologicalOpeningImageFilter.h" -#include "itkBinaryBallStructuringElement.h" -#include "itkCastImageFilter.h" - -namespace clitk { +//-------------------------------------------------------------------- +namespace clitk +{ - //==================================================================== - class MorphoMathGenericFilter: public itk::LightObject + template + class ITK_EXPORT MorphoMathGenericFilter: + public clitk::ImageToImageGenericFilter > { public: - //================================================ - typedef MorphoMathGenericFilter Self; - typedef itk::LightObject Superclass; - typedef itk::SmartPointer Pointer; + typedef MorphoMathGenericFilter Self; + typedef ImageToImageGenericFilter > Superclass; + typedef itk::SmartPointer Pointer; typedef itk::SmartPointer ConstPointer; - //================================================ + //-------------------------------------------------------------------- + MorphoMathGenericFilter(); itkNewMacro(Self); + itkTypeMacro(MorphoMathGenericFilter, LightObject); - //==================================================================== - // Set methods - void SetArgsInfo(const args_info_clitkMorphoMath a) - { - m_ArgsInfo=a; - m_InputFileName=m_ArgsInfo.input_arg; - m_Verbose=m_ArgsInfo.verbose_flag; - } + //-------------------------------------------------------------------- + void SetArgsInfo(const ArgsInfoType & a); + template + void SetOptionsFromArgsInfoToFilter(FilterType * f) ; - //==================================================================== - // Update - virtual void Update(); + //-------------------------------------------------------------------- + // Main function called each time the filter is updated + template + void UpdateWithInputImageType(); protected: - const char * GetNameOfClass() const { return "MorphoMathGenericFilter"; } - - //==================================================================== - // Constructor & Destructor - MorphoMathGenericFilter(); - ~MorphoMathGenericFilter(){;} - - //==================================================================== - //Protected member functions - template void UpdateWithDim(std::string PixelType); - template void UpdateWithDimAndPixelType(); - - - args_info_clitkMorphoMath m_ArgsInfo; - bool m_Verbose; - std::string m_InputFileName; - - }; + template void InitializeImageType(); + ArgsInfoType mArgsInfo; + + private: + MorphoMathGenericFilter(const Self&); //purposely not implemented + void operator=(const Self&); //purposely not implemented + }; // end class } // end namespace clitk + #ifndef ITK_MANUAL_INSTANTIATION #include "clitkMorphoMathGenericFilter.txx" #endif