ITK  6.0.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
24namespace itk
25{
87template <typename TInputImage, typename TOutputImage, typename TKernel, typename THistogram>
88class ITK_TEMPLATE_EXPORT MovingHistogramImageFilter
89 : public MovingHistogramImageFilterBase<TInputImage, TOutputImage, TKernel>
90{
91public:
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;
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
139protected:
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
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
typename TInputImage::RegionType RegionType
typename TInputImage::SizeType SizeType
typename TInputImage::SizeType RadiusType
typename TInputImage::IndexType IndexType
typename TOutputImage::PixelType OutputPixelType
typename TInputImage::OffsetType OffsetType
Base class for all process objects that output image data.
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
Implements a generic moving histogram algorithm.
Implements a generic moving histogram algorithm.
typename KernelType::ConstIterator KernelIteratorType
typename TInputImage::PixelType PixelType
typename std::list< OffsetType > OffsetListType
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
void PushHistogram(HistogramType &histogram, const OffsetListType *addedList, const OffsetListType *removedList, const RegionType &inputRegion, const RegionType &kernRegion, const InputImageType *inputImage, const IndexType currentIdx)
~MovingHistogramImageFilter() override=default
typename std::map< OffsetType, OffsetListType, Functor::LexicographicCompare > OffsetMapType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....