ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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{
86
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;
109 using RegionType = typename TInputImage::RegionType;
110 using SizeType = typename TInputImage::SizeType;
111 using IndexType = typename TInputImage::IndexType;
112 using PixelType = typename TInputImage::PixelType;
113 using OffsetType = typename TInputImage::OffsetType;
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
127 using RadiusType = typename KernelType::SizeType;
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 OutputImageType::RegionType OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
MovingHistogramImageFilterBase< TInputImage, TOutputImage, TKernel > Superclass
typename KernelType::ConstIterator KernelIteratorType
typename TInputImage::PixelType PixelType
typename TInputImage::OffsetType OffsetType
typename std::list< OffsetType > OffsetListType
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
typename TInputImage::RegionType RegionType
typename TOutputImage::PixelType OutputPixelType
void PushHistogram(HistogramType &histogram, const OffsetListType *addedList, const OffsetListType *removedList, const RegionType &inputRegion, const RegionType &kernRegion, const InputImageType *inputImage, const IndexType currentIdx)
typename TInputImage::IndexType IndexType
~MovingHistogramImageFilter() override=default
typename std::map< OffsetType, OffsetListType, Functor::LexicographicCompare > OffsetMapType
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....