ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkRankImageFilter.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 itkRankImageFilter_h
19 #define itkRankImageFilter_h
20 
22 #include <list>
23 #include <map>
24 #include <set>
25 #include "itkRankHistogram.h"
27 
28 namespace itk
29 {
66 template< typename TInputImage, typename TOutputImage, typename TKernel =
67  FlatStructuringElement< TInputImage::ImageDimension > >
69  public MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel,
70  Function::RankHistogram< typename TInputImage::PixelType > >
71 {
72 public:
77  typedef MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel,
79 
81  itkNewMacro(Self);
82 
84  itkTypeMacro(RankImageFilter,
86 
88  typedef TInputImage InputImageType;
89  typedef TOutputImage OutputImageType;
90  typedef typename TInputImage::RegionType RegionType;
91  typedef typename TInputImage::SizeType SizeType;
92  typedef typename TInputImage::IndexType IndexType;
93  typedef typename TInputImage::PixelType PixelType;
94  typedef typename TInputImage::OffsetType OffsetType;
96  typedef typename TOutputImage::PixelType OutputPixelType;
97  typedef typename TInputImage::PixelType InputPixelType;
98 
100 
102  itkStaticConstMacro(ImageDimension, unsigned int,
103  TInputImage::ImageDimension);
104 
106  typedef TKernel KernelType;
107 
109  typedef typename KernelType::ConstIterator KernelIteratorType;
110 
112  typedef typename KernelType::SizeType RadiusType;
113 
114  itkSetMacro(Rank, float)
115  itkGetConstMacro(Rank, float)
116 
118  {
119  return HistogramType::UseVectorBasedAlgorithm();
120  }
121 
122 protected:
123  RankImageFilter();
125 
126  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
127 
128  virtual void ConfigureHistogram( HistogramType & histogram ) ITK_OVERRIDE;
129 
130 private:
131  RankImageFilter(const Self &); //purposely not implemented
132  void operator=(const Self &); //purposely not implemented
133 
134  float m_Rank;
135 }; // end of class
136 } // end namespace itk
137 
138 #ifndef ITK_MANUAL_INSTANTIATION
139 #include "itkRankImageFilter.hxx"
140 #endif
141 
142 #endif
KernelType::ConstIterator KernelIteratorType
TInputImage::SizeType SizeType
Rank filter of a greyscale image.
Implements a generic moving histogram algorithm.
TInputImage::PixelType InputPixelType
TInputImage::IndexType IndexType
KernelType::SizeType RadiusType
SmartPointer< const Self > ConstPointer
Base class for all process objects that output image data.
void operator=(const Self &)
SmartPointer< Self > Pointer
TOutputImage OutputImageType
virtual void ConfigureHistogram(HistogramType &histogram) override
void PrintSelf(std::ostream &os, Indent indent) const override
Superclass::HistogramType HistogramType
static const unsigned int ImageDimension
Superclass::OutputImageRegionType OutputImageRegionType
TInputImage::RegionType RegionType
TInputImage::OffsetType OffsetType
TInputImage::PixelType PixelType
Superclass::OutputImageRegionType OutputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
TOutputImage::PixelType OutputPixelType
MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, Function::RankHistogram< typename TInputImage::PixelType > > Superclass