ITK  6.0.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 * https://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
25namespace itk
26{
27namespace Statistics
28{
45template <typename TImage, typename TMaskImage>
46class ITK_TEMPLATE_EXPORT MaskedImageToHistogramFilter : public ImageToHistogramFilter<TImage>
47{
48public:
49 ITK_DISALLOW_COPY_AND_MOVE(MaskedImageToHistogramFilter);
50
56
58 itkOverrideGetNameOfClassMacro(MaskedImageToHistogramFilter);
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
87 itkSetGetDecoratedInputMacro(MaskValue, MaskPixelType);
88
89protected:
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
Light weight base class for most itk classes.
Define additional traits for native types such as int or float.
This class stores measurement vectors in the context of n-dimensional histogram.
Definition: itkHistogram.h:78
TMeasurement MeasurementType
Definition: itkHistogram.h:98
This class generates a histogram from an image.
typename HistogramType::MeasurementType HistogramMeasurementType
typename HistogramType::SizeType HistogramSizeType
typename HistogramType::MeasurementVectorType HistogramMeasurementVectorType
typename HistogramType::Pointer HistogramPointer
typename NumericTraits< ValueType >::RealType ValueRealType
typename HistogramType::ConstPointer HistogramConstPointer
typename NumericTraits< PixelType >::ValueType ValueType
Generate a histogram from the masked pixels of an image.
void ThreadedComputeMinimumAndMaximum(const RegionType &inputRegionForThread) override
void ThreadedStreamedGenerateData(const RegionType &inputRegionForThread) override
itkGetInputMacro(MaskImage, MaskImageType)
itkSetInputMacro(MaskImage, MaskImageType)
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....