ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkMaskedRankImageFilter.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 itkMaskedRankImageFilter_h
19 #define itkMaskedRankImageFilter_h
20 
22 #include <list>
23 #include <map>
24 #include <set>
25 #include "itkRankHistogram.h"
27 
28 namespace itk
29 {
64 template< typename TInputImage, typename TMaskImage, typename TOutputImage, typename TKernel =
65  FlatStructuringElement< TInputImage::ImageDimension > >
66 class ITK_TEMPLATE_EXPORT MaskedRankImageFilter:
67  public MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel,
68  Function::RankHistogram< typename TInputImage::PixelType > >
69 {
70 public:
73  typedef MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel,
75 
78 
80  itkNewMacro(Self);
81 
83  itkTypeMacro(MaskedRankImageFilter,
85 
87  typedef TInputImage InputImageType;
88  typedef TOutputImage OutputImageType;
89  typedef typename TInputImage::RegionType RegionType;
90  typedef typename TInputImage::SizeType SizeType;
92  typedef typename TInputImage::PixelType PixelType;
93  typedef typename TInputImage::OffsetType OffsetType;
94  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
95  typedef typename TOutputImage::PixelType OutputPixelType;
96  typedef typename TInputImage::PixelType InputPixelType;
97 
98  typedef typename Superclass::HistogramType HistogramType;
99 
101  itkStaticConstMacro(ImageDimension, unsigned int,
102  TInputImage::ImageDimension);
103 
105  typedef TKernel KernelType;
106 
108  typedef typename KernelType::ConstIterator KernelIteratorType;
109 
112 
113  itkSetClampMacro(Rank, float, 0.0, 1.0);
114  itkGetConstMacro(Rank, float)
115 
116  bool GetUseVectorBasedAlgorithm() const
117  {
118  return HistogramType::UseVectorBasedAlgorithm();
119  }
120 
121 protected:
123  ~MaskedRankImageFilter() ITK_OVERRIDE {}
124 
125  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
126 
127  void ConfigureHistogram( HistogramType & histogram ) ITK_OVERRIDE;
128 
129 private:
130  ITK_DISALLOW_COPY_AND_ASSIGN(MaskedRankImageFilter);
131 
132  float m_Rank;
133 }; // end of class
134 } // end namespace itk
135 
136 #ifndef ITK_MANUAL_INSTANTIATION
137 #include "itkMaskedRankImageFilter.hxx"
138 #endif
139 
140 #endif
Superclass::OutputImageRegionType OutputImageRegionType
MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel, Function::RankHistogram< typename TInputImage::PixelType > > Superclass
TInputImage::IndexType IndexType
TInputImage::OffsetType OffsetType
Implements a generic moving histogram algorithm.
Base class for all process objects that output image data.
Superclass::HistogramType HistogramType
TInputImage::PixelType PixelType
TInputImage::RegionType RegionType
TOutputImage::PixelType OutputPixelType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
KernelType::ConstIterator KernelIteratorType
SmartPointer< const Self > ConstPointer
Rank filter of a greyscale image.
TInputImage::PixelType InputPixelType