ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkMaskedImageToHistogramFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 {
40 template< typename TImage, typename TMaskImage >
41 class ITK_TEMPLATE_EXPORT MaskedImageToHistogramFilter:public ImageToHistogramFilter<TImage>
42 {
43 public:
44  ITK_DISALLOW_COPY_AND_ASSIGN(MaskedImageToHistogramFilter);
45 
51 
54 
56  itkNewMacro(Self);
57 
58  using ImageType = TImage;
59  using PixelType = typename ImageType::PixelType;
63 
70 
71  using MaskImageType = TMaskImage;
72  using MaskPixelType = typename MaskImageType::PixelType;
73 
75  itkSetInputMacro(MaskImage, MaskImageType);
76  itkGetInputMacro(MaskImage, MaskImageType);
78 
82  itkSetGetDecoratedInputMacro(MaskValue, MaskPixelType);
83 
84 protected:
86  ~MaskedImageToHistogramFilter() override = default;
87 
88  void ThreadedComputeHistogram( const RegionType & inputRegionForThread ) override;
89  void ThreadedComputeMinimumAndMaximum( const RegionType & inputRegionForThread) override;
90 };
91 } // end of namespace Statistics
92 } // end of namespace itk
93 
94 #ifndef ITK_MANUAL_INSTANTIATION
95 #include "itkMaskedImageToHistogramFilter.hxx"
96 #endif
97 
98 #endif
typename HistogramType::MeasurementType HistogramMeasurementType
Light weight base class for most itk classes.
typename NumericTraits< ValueType >::RealType ValueRealType
Define numeric traits for std::vector.
typename HistogramType::SizeType HistogramSizeType
This class stores measurement vectors in the context of n-dimensional histogram.
Definition: itkHistogram.h:77
This class generates an histogram from an image.
typename NumericTraits< PixelType >::ValueType ValueType
typename HistogramType::Pointer HistogramPointer
This class generates an histogram from an image.
TMeasurement MeasurementType
Definition: itkHistogram.h:99
typename HistogramType::ConstPointer HistogramConstPointer
typename Superclass::MeasurementVectorType MeasurementVectorType
Definition: itkHistogram.h:102
typename HistogramType::MeasurementVectorType HistogramMeasurementVectorType