1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
19 #ifndef CLITKFILLMASKFILTER_H
20 #define CLITKFILLMASKFILTER_H
23 #include "clitkCommon.h"
26 #include "itkLightObject.h"
27 #include "itkJoinSeriesImageFilter.h"
28 #include "itkBinaryThresholdImageFilter.h"
29 #include "itkConnectedComponentImageFilter.h"
30 #include "itkRelabelComponentImageFilter.h"
31 #include "itkThresholdImageFilter.h"
32 #include "itkPermuteAxesImageFilter.h"
33 #include "itkExtractImageFilter.h"
34 #include "itkCastImageFilter.h"
39 //--------------------------------------------------------------------
40 template <class TImageType>
41 class ITK_EXPORT FillMaskFilter:
42 public itk::ImageToImageFilter<TImageType, TImageType >
45 /** Standard class typedefs. */
46 typedef itk::ImageToImageFilter<TImageType, TImageType> Superclass;
47 typedef FillMaskFilter Self;
48 typedef itk::SmartPointer<Self> Pointer;
49 typedef itk::SmartPointer<const Self> ConstPointer;
51 /** Method for creation through the object factory */
54 /** Run-time type information (and related methods)*/
55 itkTypeMacro(FillMaskFilter, ImageToImageFilter);
57 /** Some convenient typedefs */
58 typedef TImageType ImageType;
59 typedef typename ImageType::ConstPointer InputImageConstPointer;
60 typedef typename ImageType::Pointer InputImagePointer;
61 typedef typename ImageType::RegionType InputImageRegionType;
62 typedef typename ImageType::PixelType InputImagePixelType;
63 typedef typename ImageType::SizeType InputImageSizeType;
64 typedef typename ImageType::IndexType InputImageIndexType;
65 typedef typename ImageType::PointType InputImagePointType;
66 itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension);
69 void AddDirection(int dir);
70 void ResetDirections();
71 const std::vector<int> & GetDirections() const { return m_Directions; }
73 // Set all options at a time
74 template<class ArgsInfoType> void SetOptionsFromArgsInfo(ArgsInfoType & arg);
75 template<class ArgsInfoType> void SetOptionsToArgsInfo(ArgsInfoType & arg);
79 virtual ~FillMaskFilter() {};
82 InputImageConstPointer input;
83 std::vector<int> m_Directions;
86 virtual void GenerateData();
89 FillMaskFilter(const Self&); //purposely not implemented
90 void operator=(const Self&); //purposely not implemented
93 //--------------------------------------------------------------------
95 } // end namespace clitk
96 //--------------------------------------------------------------------
98 #ifndef ITK_MANUAL_INSTANTIATION
99 #include "clitkFillMaskFilter.txx"