X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FclitkAutoCropFilter.h;h=f24aa05c09e506a34b9bc970e4705b8298727ad1;hb=ef03fc34db849c864b1ae7f50c8442e125834f84;hp=b294efb16b8eb7805540f1bc7537ca3edf8faec4;hpb=13ddd066e351ce733c75d38d0fb018bb6dba34b9;p=clitk.git diff --git a/itk/clitkAutoCropFilter.h b/itk/clitkAutoCropFilter.h index b294efb..f24aa05 100644 --- a/itk/clitkAutoCropFilter.h +++ b/itk/clitkAutoCropFilter.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,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html - ======================================================================-====*/ + ===========================================================================**/ #ifndef CLITKAUTOCROPFILTER_H #define CLITKAUTOCROPFILTER_H @@ -29,16 +29,16 @@ namespace clitk { */ //-------------------------------------------------------------------- - template + template class ITK_EXPORT AutoCropFilter: - public itk::ImageToImageFilter { + public itk::ImageToImageFilter { public: /** Standard class typedefs. */ - typedef AutoCropFilter Self; - typedef itk::ImageToImageFilter Superclass; - typedef itk::SmartPointer Pointer; - typedef itk::SmartPointer ConstPointer; + typedef AutoCropFilter Self; + typedef itk::ImageToImageFilter Superclass; + typedef itk::SmartPointer Pointer; + typedef itk::SmartPointer ConstPointer; /** Method for creation through the object factory. */ itkNewMacro(Self); @@ -47,7 +47,6 @@ namespace clitk { itkTypeMacro(AutoCropFilter, ImageToImageFilter); /** Some convenient typedefs. */ - typedef TImageType ImageType; typedef typename ImageType::ConstPointer ImageConstPointer; typedef typename ImageType::Pointer ImagePointer; typedef typename ImageType::PixelType ImagePixelType; @@ -55,24 +54,30 @@ namespace clitk { typedef long LabelType; /** Connect one of the operands for pixel-wise addition */ - void SetInput( const ImageType * image); + void SetInput( const ImageType * image) ITK_OVERRIDE; // LabelImage information (BG) void SetBackgroundValue(ImagePixelType p); + + // Use a border + itkSetMacro(UseBorder, bool); + itkGetConstMacro(UseBorder, bool); + itkBooleanMacro(UseBorder); /** ImageDimension constants */ - itkStaticConstMacro(ImageDimension, unsigned int, TImageType::ImageDimension); + itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension); protected: AutoCropFilter(); virtual ~AutoCropFilter() {} - virtual void GenerateOutputInformation(); - virtual void GenerateData(); + virtual void GenerateOutputInformation() ITK_OVERRIDE; + virtual void GenerateData() ITK_OVERRIDE; ImagePixelType m_BackgroundValue; ImageRegionType m_Region; ImagePointer m_labeImage; + bool m_UseBorder; private: AutoCropFilter(const Self&); //purposely not implemented