ITK  4.13.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 {
68 template< typename TInputImage, typename TOutputImage, typename TKernel =
69  FlatStructuringElement< TInputImage::ImageDimension > >
70 class ITK_TEMPLATE_EXPORT RankImageFilter:
71  public MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel,
72  Function::RankHistogram< typename TInputImage::PixelType > >
73 {
74 public:
79  typedef MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel,
81 
83  itkNewMacro(Self);
84 
86  itkTypeMacro(RankImageFilter,
88 
90  typedef TInputImage InputImageType;
91  typedef TOutputImage OutputImageType;
92  typedef typename TInputImage::RegionType RegionType;
93  typedef typename TInputImage::SizeType SizeType;
95  typedef typename TInputImage::PixelType PixelType;
96  typedef typename TInputImage::OffsetType OffsetType;
97  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
98  typedef typename TOutputImage::PixelType OutputPixelType;
99  typedef typename TInputImage::PixelType InputPixelType;
100 
101  typedef typename Superclass::HistogramType HistogramType;
102 
104  itkStaticConstMacro(ImageDimension, unsigned int,
105  TInputImage::ImageDimension);
106 
108  typedef TKernel KernelType;
109 
111  typedef typename KernelType::ConstIterator KernelIteratorType;
112 
115 
116  itkSetClampMacro(Rank, float, 0.0, 1.0);
117  itkGetConstMacro(Rank, float)
118 
119  bool GetUseVectorBasedAlgorithm() const
120  {
121  return HistogramType::UseVectorBasedAlgorithm();
122  }
123 
124 protected:
125  RankImageFilter();
126  ~RankImageFilter() ITK_OVERRIDE {}
127 
128  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
129 
130  virtual void ConfigureHistogram( HistogramType & histogram ) ITK_OVERRIDE;
131 
132 private:
133  ITK_DISALLOW_COPY_AND_ASSIGN(RankImageFilter);
134 
135  float m_Rank;
136 }; // end of class
137 } // end namespace itk
138 
139 #ifndef ITK_MANUAL_INSTANTIATION
140 #include "itkRankImageFilter.hxx"
141 #endif
142 
143 #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.
SmartPointer< Self > Pointer
TOutputImage OutputImageType
Superclass::HistogramType HistogramType
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