/*========================================================================= Program: vv http://www.creatis.insa-lyon.fr/rio/vv 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 This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the copyright notices for more information. It is distributed under dual licence - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html ===========================================================================*/ #ifndef clitkReconstructThroughDilationImageFilter_h #define clitkReconstructThroughDilationImageFilter_h /* ================================================= * @file clitkReconstructThroughDilationImageFilter.h * @author * @date * * @brief * ===================================================*/ // clitk include #include "clitkIO.h" #include "clitkCommon.h" #include "clitkConditionalBinaryDilateImageFilter.h" //itk include #include "itkImageToImageFilter.h" #include "itkBinaryBallStructuringElement.h" #include "itkConnectedComponentImageFilter.h" #include "itkStatisticsImageFilter.h" #include "itkCastImageFilter.h" #if ITK_VERSION_MAJOR >= 4 #include "itkTestingComparisonImageFilter.h" #else #include "itkDifferenceImageFilter.h" #endif #include "itkThresholdImageFilter.h" namespace clitk { template class ITK_EXPORT ReconstructThroughDilationImageFilter : public itk::ImageToImageFilter { public: //---------------------------------------- // ITK //---------------------------------------- typedef ReconstructThroughDilationImageFilter Self; typedef itk::ImageToImageFilter Superclass; typedef itk::SmartPointer Pointer; typedef itk::SmartPointer ConstPointer; // Method for creation through the object factory itkNewMacro(Self); // Run-time type information (and related methods) itkTypeMacro( ReconstructThroughDilationImageFilter, ImageToImageFilter ); /** Dimension of the domain space. */ itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension); itkStaticConstMacro(OutputImageDimension, unsigned int, Superclass::OutputImageDimension); //---------------------------------------- // Typedefs //---------------------------------------- typedef typename OutputImageType::RegionType OutputImageRegionType; typedef int InternalPixelType; typedef typename InputImageType::PixelType InputPixelType; typedef typename OutputImageType::PixelType OutputPixelType; typedef typename InputImageType::SizeType SizeType; //---------------------------------------- // Set & Get //---------------------------------------- itkBooleanMacro(Verbose); itkSetMacro( Verbose, bool); itkGetConstReferenceMacro( Verbose, bool); void SetRadius ( const SizeType& s){ m_Radius=s; this->Modified();} void SetRadius(const int r) { for(uint i=0; i