From: Benoît Presles Date: Tue, 29 Oct 2013 18:00:31 +0000 (+0100) Subject: Merge branch 'master' of git.creatis.insa-lyon.fr:clitk X-Git-Tag: v1.4.0~150^2~4 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=2e89c657340f556725119bbf49435652db005233;hp=a722c4a8807004f88add4554b400e608ec65c92c;p=clitk.git Merge branch 'master' of git.creatis.insa-lyon.fr:clitk --- diff --git a/common/clitkImage2DicomRTStructFilter.h b/common/clitkImage2DicomRTStructFilter.h index b6a74b2..9455eab 100644 --- a/common/clitkImage2DicomRTStructFilter.h +++ b/common/clitkImage2DicomRTStructFilter.h @@ -2,7 +2,7 @@ Program: vv http://www.creatis.insa-lyon.fr/rio/vv Main authors : XX XX XX - Authors belongs to: + Authors belongs to: - University of LYON http://www.universite-lyon.fr/ - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr @@ -31,7 +31,7 @@ namespace clitk { //-------------------------------------------------------------------- template class Image2DicomRTStructFilter: public clitk::FilterBase { - + public: Image2DicomRTStructFilter(); ~Image2DicomRTStructFilter(); @@ -41,17 +41,24 @@ namespace clitk { typedef typename clitk::DicomRT_StructureSet::Pointer DicomRTStructPointer; // Set inputs - itkSetMacro(InputFilenames, std::vector ); + virtual void SetInputFilenames (const std::vector _arg) + { + if ( this->m_InputFilenames != _arg ) + { + this->m_InputFilenames = _arg; + this->Modified(); + } + } itkSetMacro(StructureSetFilename, std::string); itkSetMacro(DicomFolder, std::string); itkSetMacro(OutputFilename, std::string); void SetROIType(std::string type); itkSetMacro(ThresholdValue, PixelType); itkSetMacro(SkipInitialStructuresFlag, bool); - + // Run filter - void Update(); - + void Update(); + protected: std::string m_StructureSetFilename; std::string m_DicomFolder; diff --git a/segmentation/clitkMorphoMathFilter.h b/segmentation/clitkMorphoMathFilter.h index f86c2ba..a634006 100644 --- a/segmentation/clitkMorphoMathFilter.h +++ b/segmentation/clitkMorphoMathFilter.h @@ -1,7 +1,7 @@ /*========================================================================= Program: vv http://www.creatis.insa-lyon.fr/rio/vv - Authors belong to: + Authors belong to: - University of LYON http://www.universite-lyon.fr/ - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr @@ -22,7 +22,6 @@ // clitk include #include "clitkIO.h" #include "clitkImageCommon.h" -#include "clitkMorphoMath_ggo.h" #include "clitkConditionalBinaryErodeImageFilter.h" #include "clitkConditionalBinaryDilateImageFilter.h" @@ -39,12 +38,12 @@ namespace clitk { //-------------------------------------------------------------------- template - class ITK_EXPORT MorphoMathFilter: - public clitk::FilterBase, - public itk::ImageToImageFilter + class ITK_EXPORT MorphoMathFilter: + public clitk::FilterBase, + public itk::ImageToImageFilter { - - public: + + public: /** Standard class typedefs. */ typedef itk::ImageToImageFilter Superclass; typedef MorphoMathFilter Self; @@ -52,8 +51,8 @@ namespace clitk { typedef itk::SmartPointer ConstPointer; /** Method for creation through the object factory. */ - itkNewMacro(Self); - + itkNewMacro(Self); + /** Run-time type information (and related methods). */ itkTypeMacro(AddRelativePositionConstraintToLabelImageFilter, ImageToImageFilter); FILTERBASE_INIT; @@ -61,7 +60,7 @@ namespace clitk { /** Some convenient typedefs. */ typedef typename ImageType::ConstPointer ImageConstPointer; typedef typename ImageType::Pointer ImagePointer; - typedef typename ImageType::RegionType RegionType; + typedef typename ImageType::RegionType RegionType; typedef typename ImageType::PixelType PixelType; typedef typename ImageType::SpacingType SpacingType; typedef typename ImageType::SizeType SizeType; @@ -69,17 +68,17 @@ namespace clitk { typedef typename ImageType::PointType PointType; typedef float InternalPixelType; typedef itk::Image InternalImageType; - + /** ImageDimension constants */ itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension); typedef itk::Image FloatImageType; /** Operation types */ typedef enum { Erode = 0, Dilate = 1, - Close = 2, Open = 3, + Close = 2, Open = 3, CondErode = 4, CondDilate = 5 } OperationTypeEnumeration; - + /** Options */ itkGetConstMacro(VerboseFlag, bool); itkSetMacro(VerboseFlag, bool); @@ -92,7 +91,7 @@ namespace clitk { itkSetMacro(ForegroundValue, PixelType); void SetOperationType(int type); - + itkGetConstMacro(RadiusInMM, PointType); void SetRadiusInMM(PointType & p); @@ -103,11 +102,11 @@ namespace clitk { itkGetConstMacro(BoundaryToForegroundFlag, bool); itkSetMacro(BoundaryToForegroundFlag, bool); itkBooleanMacro(BoundaryToForegroundFlag); - + itkGetConstMacro(ExtendSupportFlag, bool); itkSetMacro(ExtendSupportFlag, bool); itkBooleanMacro(ExtendSupportFlag); - + protected: MorphoMathFilter(); virtual ~MorphoMathFilter(); @@ -132,10 +131,10 @@ namespace clitk { MorphoMathFilter(const Self&); //purposely not implemented void operator=(const Self&); //purposely not implemented }; - + } // end namespace clitk #ifndef ITK_MANUAL_INSTANTIATION #include "clitkMorphoMathFilter.txx" #endif - + #endif //#define CLITKMORPHOMATHFILTER_H diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index a4594a2..06d85a7 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -251,11 +251,6 @@ IF (CLITK_BUILD_TOOLS) TARGET_LINK_LIBRARIES(clitkTransformLandmarks clitkCommon) SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkTransformLandmarks) - WRAP_GGO(clitkDice_GGO_C clitkDice.ggo) - ADD_EXECUTABLE(clitkDice clitkDice.cxx ${clitkDice_GGO_C}) - TARGET_LINK_LIBRARIES(clitkDice clitkSegmentationGgoLib clitkCommon ${ITK_LIBRARIES} ) - SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDice) - WRAP_GGO(clitkMaskLandmarks_GGO_C clitkMaskLandmarks.ggo) ADD_EXECUTABLE(clitkMaskLandmarks clitkMaskLandmarks.cxx ${clitkMaskLandmarks_GGO_C}) TARGET_LINK_LIBRARIES(clitkMaskLandmarks clitkCommon) @@ -353,8 +348,14 @@ IF (CLITK_BUILD_TOOLS) #========================================================= IF(ITK_VERSION_MAJOR VERSION_LESS 4) + MESSAGE("clitkDice is not compatible with ITK<4. It will not be built.") MESSAGE("clitkDicomRTPlan2Gate is not compatible with GDCM<2 (ITK<4). It will not be built.") ELSE(ITK_VERSION_MAJOR VERSION_LESS 4) + WRAP_GGO(clitkDice_GGO_C clitkDice.ggo) + ADD_EXECUTABLE(clitkDice clitkDice.cxx ${clitkDice_GGO_C}) + TARGET_LINK_LIBRARIES(clitkDice clitkSegmentationGgoLib clitkCommon ${ITK_LIBRARIES} ) + SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDice) + WRAP_GGO(clitkDicomRTPlan2Gate_GGO_C clitkDicomRTPlan2Gate.ggo) ADD_EXECUTABLE(clitkDicomRTPlan2Gate clitkDicomRTPlan2Gate.cxx clitkDicomRTPlan2Gate_ggo.c) TARGET_LINK_LIBRARIES(clitkDicomRTPlan2Gate clitkCommon)