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 CLITKRELATIVEPOSITIONANALYZERFILTER_H
20 #define CLITKRELATIVEPOSITIONANALYZERFILTER_H
23 #include "clitkCommon.h"
26 #include <itkImageToImageFilter.h>
30 //--------------------------------------------------------------------
34 //--------------------------------------------------------------------
36 template <class ImageType>
37 class ITK_EXPORT RelativePositionAnalyzerFilter:
38 public itk::ImageToImageFilter<ImageType, ImageType>
42 /** Standard class typedefs. */
43 typedef itk::ImageToImageFilter<ImageType, ImageType> Superclass;
44 typedef RelativePositionAnalyzerFilter Self;
45 typedef itk::SmartPointer<Self> Pointer;
46 typedef itk::SmartPointer<const Self> ConstPointer;
48 /** Method for creation through the object factory. */
51 /** Run-time type information (and related methods). */
52 itkTypeMacro(RelativePositionAnalyzerFilter, ImageToImageFilter);
54 /** Some convenient typedefs. */
55 typedef typename ImageType::ConstPointer ImageConstPointer;
56 typedef typename ImageType::Pointer ImagePointer;
57 typedef typename ImageType::RegionType RegionType;
58 typedef typename ImageType::PixelType PixelType;
59 typedef typename ImageType::SpacingType SpacingType;
60 typedef typename ImageType::SizeType SizeType;
61 typedef typename ImageType::IndexType IndexType;
62 typedef typename ImageType::PointType PointType;
64 /** ImageDimension constants */
65 itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension);
66 typedef itk::Image<float, ImageDimension> FloatImageType;
68 /** Input : initial image and object */
69 void SetInputSupport(const ImageType * image);
70 void SetInputObject(const ImageType * image);
71 void SetInputTarget(const ImageType * image);
74 itkSetMacro(VerboseFlag, bool);
75 itkGetConstMacro(VerboseFlag, bool);
76 itkBooleanMacro(VerboseFlag);
78 itkGetConstMacro(BackgroundValue, PixelType);
79 itkSetMacro(BackgroundValue, PixelType);
81 itkGetConstMacro(ForegroundValue, PixelType);
82 itkSetMacro(ForegroundValue, PixelType);
88 RelativePositionAnalyzerFilter();
89 virtual ~RelativePositionAnalyzerFilter() {}
92 PixelType m_BackgroundValue;
93 PixelType m_ForegroundValue;
94 ImagePointer m_Support;
95 ImagePointer m_Object;
96 ImagePointer m_Target;
98 virtual void GenerateData();
101 RelativePositionAnalyzerFilter(const Self&); //purposely not implemented
102 void operator=(const Self&); //purposely not implemented
105 //--------------------------------------------------------------------
107 } // end namespace clitk
108 //--------------------------------------------------------------------
110 #ifndef ITK_MANUAL_INSTANTIATION
111 #include "clitkRelativePositionAnalyzerFilter.txx"