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 CLITKLABELIMAGEOVERLAPMEASUREFILTER_H
20 #define CLITKLABELIMAGEOVERLAPMEASUREFILTER_H
23 #include "clitkFilterBase.h"
24 #include "clitkCropLikeImageFilter.h"
25 #include "clitkSegmentationUtils.h"
28 #include <itkImageToImageFilter.h>
29 #include <itkLabelStatisticsImageFilter.h>
30 #include <itkLabelOverlapMeasuresImageFilter.h>
36 //--------------------------------------------------------------------
38 Analyze the relative position of a Target (mask image) according
39 to some Object, in a given Support. Indicate the main important
40 position of this Target according the Object.
42 //--------------------------------------------------------------------
44 template <class ImageType>
45 class LabelImageOverlapMeasureFilter:
46 public virtual FilterBase,
47 public itk::ImageToImageFilter<ImageType, ImageType>
51 /** Standard class typedefs. */
52 typedef itk::ImageToImageFilter<ImageType, ImageType> Superclass;
53 typedef LabelImageOverlapMeasureFilter<ImageType> Self;
54 typedef itk::SmartPointer<Self> Pointer;
55 typedef itk::SmartPointer<const Self> ConstPointer;
57 /** Method for creation through the object factory. */
60 /** Run-time type information (and related methods). */
61 itkTypeMacro(LabelImageOverlapMeasureFilter, ImageToImageFilter);
63 /** Some convenient typedefs. */
64 typedef typename ImageType::ConstPointer ImageConstPointer;
65 typedef typename ImageType::Pointer ImagePointer;
66 typedef typename ImageType::RegionType RegionType;
67 typedef typename ImageType::PixelType PixelType;
68 typedef typename ImageType::SpacingType SpacingType;
69 typedef typename ImageType::SizeType SizeType;
70 typedef typename ImageType::IndexType IndexType;
71 typedef typename ImageType::PointType PointType;
73 /** ImageDimension constants */
74 itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension);
78 itkGetConstMacro(BackgroundValue, PixelType);
79 //itkSetMacro(BackgroundValue, PixelType);
81 itkGetConstMacro(Label1, PixelType);
82 itkSetMacro(Label1, PixelType);
84 itkGetConstMacro(Label2, PixelType);
85 itkSetMacro(Label2, PixelType);
87 itkSetMacro(VerboseFlag, bool);
88 itkGetConstMacro(VerboseFlag, bool);
89 itkBooleanMacro(VerboseFlag);
91 itkSetMacro(LongFlag, bool);
92 itkGetConstMacro(LongFlag, bool);
93 itkBooleanMacro(LongFlag);
95 // I dont want to verify inputs information
96 virtual void VerifyInputInformation() { }
99 LabelImageOverlapMeasureFilter();
100 virtual ~LabelImageOverlapMeasureFilter() {}
102 PixelType m_BackgroundValue;
105 ImagePointer m_Input1;
106 ImagePointer m_Input2;
110 virtual void GenerateOutputInformation();
111 virtual void GenerateInputRequestedRegion();
112 virtual void GenerateData();
115 LabelImageOverlapMeasureFilter(const Self&); //purposely not implemented
116 void operator=(const Self&); //purposely not implemented
119 //--------------------------------------------------------------------
121 } // end namespace clitk
122 //--------------------------------------------------------------------
124 #include "clitkLabelImageOverlapMeasureFilter.txx"