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 ===========================================================================**/
18 #ifndef clitkCombineImageFilter_h
19 #define clitkCombineImageFilter_h
21 /* =================================================
22 * @file clitkCombineImageFilter.h
28 ===================================================*/
33 #include "clitkCommon.h"
36 #include "itkImageToImageFilter.h"
41 template <class InputImageType>
42 class ITK_EXPORT CombineImageFilter :
43 public itk::ImageToImageFilter<InputImageType, InputImageType>
46 //----------------------------------------
48 //----------------------------------------
49 typedef CombineImageFilter Self;
50 typedef itk::ImageToImageFilter<InputImageType, InputImageType> Superclass;
51 typedef itk::SmartPointer<Self> Pointer;
52 typedef itk::SmartPointer<const Self> ConstPointer;
54 // Method for creation through the object factory
57 // Run-time type information (and related methods)
58 itkTypeMacro( CombineImageFilter, ImageToImageFilter );
60 /** Dimension of the domain space. */
61 itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension);
62 itkStaticConstMacro(OutputImageDimension, unsigned int, Superclass::OutputImageDimension);
63 typedef itk::Image<int, InputImageDimension> MaskImageType;
65 //----------------------------------------
67 //----------------------------------------
68 typedef typename InputImageType::RegionType OutputImageRegionType;
70 //----------------------------------------
72 //----------------------------------------
73 itkBooleanMacro(Verbose);
74 itkSetMacro( Verbose, bool);
75 itkGetConstReferenceMacro( Verbose, bool);
77 void SetMask(typename MaskImageType::Pointer m){m_Mask=m;}
78 typename MaskImageType::Pointer GetMask(void){return m_Mask;}
83 //----------------------------------------
84 // Constructor & Destructor
85 //----------------------------------------
87 ~CombineImageFilter() {};
89 //----------------------------------------
91 //----------------------------------------
93 void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId);
95 //----------------------------------------
97 //----------------------------------------
99 typename MaskImageType::Pointer m_Mask;
105 } // end namespace clitk
107 #ifndef ITK_MANUAL_INSTANTIATION
108 #include "clitkCombineImageFilter.txx"
111 #endif // #define clitkCombineImageFilter_h