ITK  4.13.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 
22 
23 namespace itk
24 {
86 template< typename TInputImage, typename TOutputImage, typename TKernel, typename THistogram >
87 class ITK_TEMPLATE_EXPORT MovingHistogramImageFilter:
88  public MovingHistogramImageFilterBase< TInputImage, TOutputImage, TKernel >
89 {
90 public:
96 
98  itkNewMacro(Self);
99 
101  itkTypeMacro(MovingHistogramImageFilter,
103 
105  typedef TInputImage InputImageType;
106  typedef TOutputImage OutputImageType;
107  typedef typename TInputImage::RegionType RegionType;
108  typedef typename TInputImage::SizeType SizeType;
110  typedef typename TInputImage::PixelType PixelType;
111  typedef typename TInputImage::OffsetType OffsetType;
112  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
113  typedef typename TOutputImage::PixelType OutputPixelType;
114 
116  itkStaticConstMacro(ImageDimension, unsigned int,
117  TInputImage::ImageDimension);
118 
120  typedef TKernel KernelType;
121 
123  typedef typename KernelType::ConstIterator KernelIteratorType;
124 
127 
128  typedef typename std::list< OffsetType > OffsetListType;
129 
130  typedef typename std::map< OffsetType, OffsetListType, typename OffsetType::LexicographicCompare > OffsetMapType;
131 
134  virtual void ConfigureHistogram(THistogram &) {}
135 
136 protected:
138  ~MovingHistogramImageFilter() ITK_OVERRIDE {}
139 
141  void ThreadedGenerateData(const OutputImageRegionType &
142  outputRegionForThread,
143  ThreadIdType threadId) ITK_OVERRIDE;
144 
145  // declare the type used to store the histogram
146  typedef THistogram HistogramType;
147 
148  void PushHistogram(HistogramType & histogram,
149  const OffsetListType *addedList,
150  const OffsetListType *removedList,
151  const RegionType & inputRegion,
152  const RegionType & kernRegion,
153  const InputImageType *inputImage,
154  const IndexType currentIdx);
155 
156 private:
157  ITK_DISALLOW_COPY_AND_ASSIGN(MovingHistogramImageFilter);
158 }; // end of class
159 } // end namespace itk
160 
161 #ifndef ITK_MANUAL_INSTANTIATION
162 #include "itkMovingHistogramImageFilter.hxx"
163 #endif
164 
165 #endif
TInputImage::RegionType RegionType
Implements a generic moving histogram algorithm.
TInputImage::IndexType IndexType
Base class for all process objects that output image data.
Superclass::OutputImageRegionType OutputImageRegionType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
std::map< OffsetType, OffsetListType, typename OffsetType::LexicographicCompare > OffsetMapType
MovingHistogramImageFilterBase< TInputImage, TOutputImage, TKernel > Superclass
Implements a generic moving histogram algorithm.