ITK  4.9.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 >
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;
109  typedef typename TInputImage::IndexType IndexType;
110  typedef typename TInputImage::PixelType PixelType;
111  typedef typename TInputImage::OffsetType OffsetType;
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 
126  typedef typename KernelType::SizeType RadiusType;
127 
128  typedef typename std::list< OffsetType > OffsetListType;
129 
130  typedef typename std::map< OffsetType, OffsetListType, typename OffsetType::LexicographicCompare > OffsetMapType;
131 
133  virtual void ConfigureHistogram(THistogram &) {}
134 
135 protected:
138 
141  outputRegionForThread,
142  ThreadIdType threadId) ITK_OVERRIDE;
143 
144  // declare the type used to store the histogram
145  typedef THistogram HistogramType;
146 
147  void PushHistogram(HistogramType & histogram,
148  const OffsetListType *addedList,
149  const OffsetListType *removedList,
150  const RegionType & inputRegion,
151  const RegionType & kernRegion,
152  const InputImageType *inputImage,
153  const IndexType currentIdx);
154 
155 private:
156  MovingHistogramImageFilter(const Self &) ITK_DELETE_FUNCTION;
157  void operator=(const Self &) ITK_DELETE_FUNCTION;
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.
Superclass::OutputImageRegionType OutputImageRegionType
TInputImage::IndexType IndexType
Base class for all process objects that output image data.
Superclass::OutputImageRegionType OutputImageRegionType
void PushHistogram(HistogramType &histogram, const OffsetListType *addedList, const OffsetListType *removedList, const RegionType &inputRegion, const RegionType &kernRegion, const InputImageType *inputImage, const IndexType currentIdx)
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
std::map< OffsetType, OffsetListType, typename OffsetType::LexicographicCompare > OffsetMapType
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
MovingHistogramImageFilterBase< TInputImage, TOutputImage, TKernel > Superclass
Implements a generic moving histogram algorithm.