X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractPatientFilter.h;h=fe290cc2302603808682cf1c49887494ca0c72a5;hb=48727138e88f056b67312603560e600362346462;hp=b4717477dee9aa52c033701fc78e188e89c7538e;hpb=5668d4a49a5a6b68dc80fa28f0f82b54187cb70c;p=clitk.git diff --git a/segmentation/clitkExtractPatientFilter.h b/segmentation/clitkExtractPatientFilter.h index b471747..fe290cc 100644 --- a/segmentation/clitkExtractPatientFilter.h +++ b/segmentation/clitkExtractPatientFilter.h @@ -21,6 +21,7 @@ #include "clitkFilterBase.h" #include "clitkFilterWithAnatomicalFeatureDatabaseManagement.h" +#include "clitkSegmentationUtils.h" namespace clitk { @@ -90,80 +91,63 @@ namespace clitk { void SetInput(const TInputImageType * image); itkSetMacro(OutputPatientFilename, std::string); itkGetMacro(OutputPatientFilename, std::string); - GGO_DefineOption(output, SetOutputPatientFilename, std::string); - - // Set all options at a time - template - void SetArgsInfo(ArgsInfoType arg); // Step 1 itkSetMacro(UpperThreshold, InputImagePixelType); itkGetMacro(UpperThreshold, InputImagePixelType); - GGO_DefineOption(upper, SetUpperThreshold, InputImagePixelType); itkSetMacro(LowerThreshold, InputImagePixelType); itkGetMacro(LowerThreshold, InputImagePixelType); - itkSetMacro(UseLowerThreshold, bool); + itkSetMacro(UseLowerThreshold, bool); + itkGetMacro(PrimaryOpeningRadius, unsigned int); + itkSetMacro(PrimaryOpeningRadius, unsigned int); itkGetConstMacro(UseLowerThreshold, bool); itkBooleanMacro(UseLowerThreshold); - GGO_DefineOption_WithTest(lower, SetLowerThreshold, InputImagePixelType, UseLowerThreshold); // Step 2 itkSetMacro(DecomposeAndReconstructDuringFirstStep, bool); itkGetConstMacro(DecomposeAndReconstructDuringFirstStep, bool); itkBooleanMacro(DecomposeAndReconstructDuringFirstStep); - GGO_DefineOption_Flag(erode1, SetDecomposeAndReconstructDuringFirstStep); itkSetMacro(Radius1, InternalImageSizeType); itkGetConstMacro(Radius1, InternalImageSizeType); - GGO_DefineOption_Vector(radius1, SetRadius1, InternalImageSizeType, ImageDimension, true); itkSetMacro(MaximumNumberOfLabels1, int); itkGetConstMacro(MaximumNumberOfLabels1, int); - GGO_DefineOption(max1, SetMaximumNumberOfLabels1, int); itkSetMacro(NumberOfNewLabels1, int); itkGetConstMacro(NumberOfNewLabels1, int); - GGO_DefineOption(new1, SetNumberOfNewLabels1, int); // Step 2 itkSetMacro(DecomposeAndReconstructDuringSecondStep, bool); itkGetConstMacro(DecomposeAndReconstructDuringSecondStep, bool); itkBooleanMacro(DecomposeAndReconstructDuringSecondStep); - GGO_DefineOption_Flag(erode2, SetDecomposeAndReconstructDuringSecondStep); itkSetMacro(Radius2, InternalImageSizeType); itkGetConstMacro(Radius2, InternalImageSizeType); - GGO_DefineOption_Vector(radius2, SetRadius2, InternalImageSizeType, ImageDimension, true) itkSetMacro(MaximumNumberOfLabels2, int); itkGetConstMacro(MaximumNumberOfLabels2, int); - GGO_DefineOption(max2, SetMaximumNumberOfLabels2, int); itkSetMacro(NumberOfNewLabels2, int); itkGetConstMacro(NumberOfNewLabels2, int); - GGO_DefineOption(new2, SetNumberOfNewLabels2, int); // Step 3 itkSetMacro(FirstKeep, int); itkGetConstMacro(FirstKeep, int); - GGO_DefineOption(firstKeep, SetFirstKeep, int); itkSetMacro(LastKeep, int); itkGetConstMacro(LastKeep, int); - GGO_DefineOption(lastKeep, SetLastKeep, int); // Step 4 itkSetMacro(FinalOpenClose, bool); itkGetConstMacro(FinalOpenClose, bool); itkBooleanMacro(FinalOpenClose); - GGO_DefineOption_Flag(openClose, SetFinalOpenClose); // Step 4 itkSetMacro(AutoCrop, bool); itkGetConstMacro(AutoCrop, bool); itkBooleanMacro(AutoCrop); - GGO_DefineOption_Flag(noAutoCrop, SetAutoCrop); protected: ExtractPatientFilter(); @@ -183,6 +167,7 @@ namespace clitk { bool m_DecomposeAndReconstructDuringFirstStep; bool m_DecomposeAndReconstructDuringSecondStep; bool m_FinalOpenClose; + unsigned m_PrimaryOpeningRadius; InternalImageSizeType m_Radius1; InternalImageSizeType m_Radius2; int m_MaximumNumberOfLabels1;