ITK  5.2.0
Insight Toolkit
itkMaskedImageToHistogramFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkMaskedImageToHistogramFilter_h
19 #define itkMaskedImageToHistogramFilter_h
20 
21 #include "itkHistogram.h"
24 
25 namespace itk
26 {
27 namespace Statistics
28 {
45 template <typename TImage, typename TMaskImage>
46 class ITK_TEMPLATE_EXPORT MaskedImageToHistogramFilter : public ImageToHistogramFilter<TImage>
47 {
48 public:
49  ITK_DISALLOW_COPY_AND_ASSIGN(MaskedImageToHistogramFilter);
50 
56 
59 
61  itkNewMacro(Self);
62 
63  using ImageType = TImage;
64  using PixelType = typename ImageType::PixelType;
68 
75 
76  using MaskImageType = TMaskImage;
77  using MaskPixelType = typename MaskImageType::PixelType;
78 
80  itkSetInputMacro(MaskImage, MaskImageType);
81  itkGetInputMacro(MaskImage, MaskImageType);
83 
87  itkSetGetDecoratedInputMacro(MaskValue, MaskPixelType);
88 
89 protected:
91  ~MaskedImageToHistogramFilter() override = default;
92 
93  void
94  ThreadedStreamedGenerateData(const RegionType & inputRegionForThread) override;
95  void
96  ThreadedComputeMinimumAndMaximum(const RegionType & inputRegionForThread) override;
97 };
98 } // end of namespace Statistics
99 } // end of namespace itk
100 
101 #ifndef ITK_MANUAL_INSTANTIATION
102 # include "itkMaskedImageToHistogramFilter.hxx"
103 #endif
104 
105 #endif
itkImageToHistogramFilter.h
itk::Statistics::MaskedImageToHistogramFilter
Generate a histogram from the masked pixels of an image.
Definition: itkMaskedImageToHistogramFilter.h:46
itk::Statistics::ImageToHistogramFilter::HistogramMeasurementVectorType
typename HistogramType::MeasurementVectorType HistogramMeasurementVectorType
Definition: itkImageToHistogramFilter.h:78
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::Statistics::ImageToHistogramFilter::HistogramConstPointer
typename HistogramType::ConstPointer HistogramConstPointer
Definition: itkImageToHistogramFilter.h:75
itk::SmartPointer< Self >
itk::Statistics::Histogram::MeasurementVectorType
typename Superclass::MeasurementVectorType MeasurementVectorType
Definition: itkHistogram.h:101
itk::Statistics::Histogram
This class stores measurement vectors in the context of n-dimensional histogram.
Definition: itkHistogram.h:77
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::Statistics::MaskedImageToHistogramFilter::MaskPixelType
typename MaskImageType::PixelType MaskPixelType
Definition: itkMaskedImageToHistogramFilter.h:77
itk::Statistics::ImageToHistogramFilter::HistogramPointer
typename HistogramType::Pointer HistogramPointer
Definition: itkImageToHistogramFilter.h:74
itkHistogram.h
itk::Statistics::ImageToHistogramFilter::HistogramSizeType
typename HistogramType::SizeType HistogramSizeType
Definition: itkImageToHistogramFilter.h:76
itk::Statistics::ImageToHistogramFilter::PixelType
typename ImageType::PixelType PixelType
Definition: itkImageToHistogramFilter.h:68
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::Statistics::ImageToHistogramFilter::ValueType
typename NumericTraits< PixelType >::ValueType ValueType
Definition: itkImageToHistogramFilter.h:70
itk::Statistics::ImageToHistogramFilter::RegionType
typename ImageType::RegionType RegionType
Definition: itkImageToHistogramFilter.h:69
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:58
itk::Statistics::ImageToHistogramFilter::ValueRealType
typename NumericTraits< ValueType >::RealType ValueRealType
Definition: itkImageToHistogramFilter.h:71
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Statistics::ImageToHistogramFilter::ImageType
TImage ImageType
Definition: itkImageToHistogramFilter.h:67
itk::Statistics::ImageToHistogramFilter::HistogramMeasurementType
typename HistogramType::MeasurementType HistogramMeasurementType
Definition: itkImageToHistogramFilter.h:77
itk::NumericTraits::RealType
double RealType
Definition: itkNumericTraits.h:84
itkSimpleDataObjectDecorator.h
itk::Statistics::ImageToHistogramFilter
This class generates a histogram from an image.
Definition: itkImageToHistogramFilter.h:50
itk::Statistics::Histogram::MeasurementType
TMeasurement MeasurementType
Definition: itkHistogram.h:98
itk::Statistics::MaskedImageToHistogramFilter::MaskImageType
TMaskImage MaskImageType
Definition: itkMaskedImageToHistogramFilter.h:76