Medical Imaging Interaction Toolkit  2023.12.99-63768887
Medical Imaging Interaction Toolkit
itkMaskedNaryStatisticsImageFilter.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef __itkMaskedNaryStatisticsImageFilter_h
14 #define __itkMaskedNaryStatisticsImageFilter_h
15 
16 #include "itkImageToImageFilter.h"
17 #include "itkImageIterator.h"
18 #include "itkArray.h"
19 
20 namespace itk
21 {
31 template< class TInputImage, class TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension> >
33  public ImageToImageFilter< TInputImage, TInputImage >
34 
35 {
36 public:
39  typedef ImageToImageFilter< TInputImage, TInputImage > Superclass;
43  itkNewMacro(Self);
44 
46  itkTypeMacro(MaskedNaryStatisticsImageFilter, ImageToImageFilter);
47 
49  typedef TInputImage InputImageType;
50  typedef typename InputImageType::Pointer InputImagePointer;
51  typedef typename InputImageType::RegionType InputImageRegionType;
52  typedef typename InputImageType::PixelType InputImagePixelType;
53  typedef typename NumericTraits< InputImagePixelType >::RealType RealType;
54 
55  typedef std::vector<InputImagePixelType> PixelVectorType;
56  typedef std::vector<RealType> RealVectorType;
57 
58  typedef TMaskImage MaskImageType;
59  typedef typename MaskImageType::Pointer MaskImagePointer;
60  typedef typename MaskImageType::ConstPointer MaskImageConstPointer;
61  typedef typename MaskImageType::RegionType MaskImageRegionType;
62 
63  itkSetConstObjectMacro(Mask, MaskImageType);
64  itkGetConstObjectMacro(Mask, MaskImageType);
65 
66  itkGetConstReferenceMacro(Mean,RealVectorType);
67  itkGetConstReferenceMacro(Sigma,RealVectorType);
68  itkGetConstReferenceMacro(Variance,RealVectorType);
69  itkGetConstReferenceMacro(Sum,RealVectorType);
70  itkGetConstReferenceMacro(Minimum,PixelVectorType);
71  itkGetConstReferenceMacro(Maximum,PixelVectorType);
72 
74  itkStaticConstMacro(
75  InputImageDimension, unsigned int, TInputImage::ImageDimension);
76 
77 #ifdef ITK_USE_CONCEPT_CHECKING
78 
79  itkConceptMacro( SameDimensionCheck,
80  ( Concept::SameDimension< InputImageDimension, InputImageDimension > ) );
81  itkConceptMacro( OutputHasZeroCheck,
82  ( Concept::HasZero< InputImagePixelType > ) );
84 #endif
85 protected:
88 
89  void GenerateData() override;
90 
91 private:
92  MaskedNaryStatisticsImageFilter(const Self &); //purposely not implemented
93  void operator=(const Self &); //purposely not implemented
94 
95  RealVectorType m_Mean;
96  RealVectorType m_Sigma;
97  RealVectorType m_Variance;
98  RealVectorType m_Sum;
99  PixelVectorType m_Minimum;
100  PixelVectorType m_Maximum;
101 
102  MaskImageConstPointer m_Mask;
103 };
104 } // end namespace itk
105 
106 #ifndef ITK_MANUAL_INSTANTIATION
107 #include "itkMaskedNaryStatisticsImageFilter.hxx"
108 #endif
109 
110 #endif
itk::MaskedNaryStatisticsImageFilter::InputImagePointer
InputImageType::Pointer InputImagePointer
Definition: itkMaskedNaryStatisticsImageFilter.h:50
itk::MaskedNaryStatisticsImageFilter
Computes a masked statistic on N images and produces vectors of those statistic results.
Definition: itkMaskedNaryStatisticsImageFilter.h:32
itk::MaskedNaryStatisticsImageFilter::Pointer
SmartPointer< Self > Pointer
Definition: itkMaskedNaryStatisticsImageFilter.h:40
itk::MaskedNaryStatisticsImageFilter::~MaskedNaryStatisticsImageFilter
~MaskedNaryStatisticsImageFilter() override
Definition: itkMaskedNaryStatisticsImageFilter.h:87
itk::MaskedNaryStatisticsImageFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: itkMaskedNaryStatisticsImageFilter.h:51
itk::SmartPointer< Self >
itk::MaskedNaryStatisticsImageFilter::MaskImageConstPointer
MaskImageType::ConstPointer MaskImageConstPointer
Definition: itkMaskedNaryStatisticsImageFilter.h:60
itk::MaskedNaryStatisticsImageFilter::MaskImageRegionType
MaskImageType::RegionType MaskImageRegionType
Definition: itkMaskedNaryStatisticsImageFilter.h:61
itk::MaskedNaryStatisticsImageFilter::InputImageType
TInputImage InputImageType
Definition: itkMaskedNaryStatisticsImageFilter.h:46
itk
SET FUNCTIONS.
Definition: itkIntelligentBinaryClosingFilter.h:30
itk::MaskedNaryStatisticsImageFilter::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkMaskedNaryStatisticsImageFilter.h:41
itk::MaskedNaryStatisticsImageFilter::RealType
NumericTraits< InputImagePixelType >::RealType RealType
Definition: itkMaskedNaryStatisticsImageFilter.h:53
itk::MaskedNaryStatisticsImageFilter::InputImagePixelType
InputImageType::PixelType InputImagePixelType
Definition: itkMaskedNaryStatisticsImageFilter.h:52
itk::MaskedNaryStatisticsImageFilter::RealVectorType
std::vector< RealType > RealVectorType
Definition: itkMaskedNaryStatisticsImageFilter.h:56
itk::MaskedNaryStatisticsImageFilter::MaskImageType
TMaskImage MaskImageType
Definition: itkMaskedNaryStatisticsImageFilter.h:58
itk::MaskedNaryStatisticsImageFilter::MaskImagePointer
MaskImageType::Pointer MaskImagePointer
Definition: itkMaskedNaryStatisticsImageFilter.h:59
itk::MaskedNaryStatisticsImageFilter::Superclass
ImageToImageFilter< TInputImage, TInputImage > Superclass
Definition: itkMaskedNaryStatisticsImageFilter.h:39
itk::MaskedNaryStatisticsImageFilter::Self
MaskedNaryStatisticsImageFilter Self
Definition: itkMaskedNaryStatisticsImageFilter.h:38
itk::MaskedNaryStatisticsImageFilter::PixelVectorType
std::vector< InputImagePixelType > PixelVectorType
Definition: itkMaskedNaryStatisticsImageFilter.h:55