ITK  5.4.0
Insight Toolkit
itkMovingHistogramImageFilter.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 itkMovingHistogramImageFilter_h
19 #define itkMovingHistogramImageFilter_h
20 
23 
24 namespace itk
25 {
87 template <typename TInputImage, typename TOutputImage, typename TKernel, typename THistogram>
88 class ITK_TEMPLATE_EXPORT MovingHistogramImageFilter
89  : public MovingHistogramImageFilterBase<TInputImage, TOutputImage, TKernel>
90 {
91 public:
92  ITK_DISALLOW_COPY_AND_MOVE(MovingHistogramImageFilter);
93 
99 
101  itkNewMacro(Self);
102 
104  itkOverrideGetNameOfClassMacro(MovingHistogramImageFilter);
105 
107  using InputImageType = TInputImage;
108  using OutputImageType = TOutputImage;
110  using SizeType = typename TInputImage::SizeType;
112  using PixelType = typename TInputImage::PixelType;
113  using OffsetType = typename TInputImage::OffsetType;
114  using typename Superclass::OutputImageRegionType;
115  using OutputPixelType = typename TOutputImage::PixelType;
116 
118  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
119 
121  using KernelType = TKernel;
122 
124  using KernelIteratorType = typename KernelType::ConstIterator;
125 
128 
129  using OffsetListType = typename std::list<OffsetType>;
130 
131  using OffsetMapType = typename std::map<OffsetType, OffsetListType, Functor::LexicographicCompare>;
132 
135  virtual void
136  ConfigureHistogram(THistogram &)
137  {}
138 
139 protected:
141  ~MovingHistogramImageFilter() override = default;
142 
144  void
145  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
146 
147 
148  // declare the type used to store the histogram
149  using HistogramType = THistogram;
150 
151  void
152  PushHistogram(HistogramType & histogram,
153  const OffsetListType * addedList,
154  const OffsetListType * removedList,
155  const RegionType & inputRegion,
156  const RegionType & kernRegion,
157  const InputImageType * inputImage,
158  const IndexType currentIdx);
159 }; // end of class
160 } // end namespace itk
161 
162 #ifndef ITK_MANUAL_INSTANTIATION
163 # include "itkMovingHistogramImageFilter.hxx"
164 #endif
165 
166 #endif
itk::BoxImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkBoxImageFilter.h:67
itk::MovingHistogramImageFilterBase::KernelIteratorType
typename KernelType::ConstIterator KernelIteratorType
Definition: itkMovingHistogramImageFilterBase.h:126
itk::Function::MorphologicalGradientHistogram
Definition: itkMovingHistogramMorphologicalGradientImageFilter.h:29
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itkLexicographicCompare.h
itk::SmartPointer< Self >
itk::BoxImageFilter::RadiusType
typename TInputImage::SizeType RadiusType
Definition: itkBoxImageFilter.h:73
itk::BoxImageFilter::OffsetType
typename TInputImage::OffsetType OffsetType
Definition: itkBoxImageFilter.h:62
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::BoxImageFilter::IndexType
typename TInputImage::IndexType IndexType
Definition: itkBoxImageFilter.h:61
itk::MovingHistogramImageFilterBase::PixelType
typename TInputImage::PixelType PixelType
Definition: itkMovingHistogramImageFilterBase.h:114
itk::MovingHistogramImageFilterBase
Implements a generic moving histogram algorithm.
Definition: itkMovingHistogramImageFilterBase.h:91
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itkMovingHistogramImageFilterBase.h
itk::MovingHistogramImageFilter
Implements a generic moving histogram algorithm.
Definition: itkMovingHistogramImageFilter.h:88
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::KernelImageFilter::KernelType
TKernel KernelType
Definition: itkKernelImageFilter.h:71
itk::MovingHistogramImageFilter::ConfigureHistogram
virtual void ConfigureHistogram(THistogram &)
Definition: itkMovingHistogramImageFilter.h:136
itk::MovingHistogramImageFilterBase::OffsetMapType
typename std::map< OffsetType, OffsetListType, Functor::LexicographicCompare > OffsetMapType
Definition: itkMovingHistogramImageFilterBase.h:133
itk::BoxImageFilter::SizeType
typename TInputImage::SizeType SizeType
Definition: itkBoxImageFilter.h:60
itk::MovingHistogramImageFilterBase::OffsetListType
typename std::list< OffsetType > OffsetListType
Definition: itkMovingHistogramImageFilterBase.h:131
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::BoxImageFilter::RegionType
typename TInputImage::RegionType RegionType
Definition: itkBoxImageFilter.h:59