ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkMovingHistogramImageFilter.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 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_ASSIGN(MovingHistogramImageFilter);
93 
99 
101  itkNewMacro(Self);
102 
104  itkTypeMacro(MovingHistogramImageFilter,
106 
108  using InputImageType = TInputImage;
109  using OutputImageType = TOutputImage;
111  using SizeType = typename TInputImage::SizeType;
113  using PixelType = typename TInputImage::PixelType;
114  using OffsetType = typename TInputImage::OffsetType;
115  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
116  using OutputPixelType = typename TOutputImage::PixelType;
117 
119  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
120 
122  using KernelType = TKernel;
123 
125  using KernelIteratorType = typename KernelType::ConstIterator;
126 
129 
130  using OffsetListType = typename std::list< OffsetType >;
131 
132  using OffsetMapType = typename std::map< OffsetType, OffsetListType, Functor::LexicographicCompare >;
133 
136  virtual void ConfigureHistogram(THistogram &) {}
137 
138 protected:
140  ~MovingHistogramImageFilter() override = default;
141 
143  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
144 
145 
146  // declare the type used to store the histogram
147  using HistogramType = THistogram;
148 
149  void PushHistogram(HistogramType & histogram,
150  const OffsetListType *addedList,
151  const OffsetListType *removedList,
152  const RegionType & inputRegion,
153  const RegionType & kernRegion,
154  const InputImageType *inputImage,
155  const IndexType currentIdx);
156 }; // end of class
157 } // end namespace itk
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 #include "itkMovingHistogramImageFilter.hxx"
161 #endif
162 
163 #endif
typename TInputImage::SizeType RadiusType
typename std::map< OffsetType, OffsetListType, Functor::LexicographicCompare > OffsetMapType
typename TInputImage::IndexType IndexType
Implements a generic moving histogram algorithm.
typename TOutputImage::PixelType OutputPixelType
typename TInputImage::RegionType RegionType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename TInputImage::OffsetType OffsetType
typename KernelType::ConstIterator KernelIteratorType
typename OutputImageType::RegionType OutputImageRegionType
typename TInputImage::SizeType SizeType
TOutputImage OutputImageType
Implements a generic moving histogram algorithm.