ITK  5.0.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:
71  ITK_DISALLOW_COPY_AND_ASSIGN(MaskedRankImageFilter);
72 
75  using Superclass = MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel,
77 
80 
82  itkNewMacro(Self);
83 
85  itkTypeMacro(MaskedRankImageFilter,
87 
89  using InputImageType = TInputImage;
90  using OutputImageType = TOutputImage;
92  using SizeType = typename TInputImage::SizeType;
94  using PixelType = typename TInputImage::PixelType;
95  using OffsetType = typename TInputImage::OffsetType;
96  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
97  using OutputPixelType = typename TOutputImage::PixelType;
98  using InputPixelType = typename TInputImage::PixelType;
99 
100  using HistogramType = typename Superclass::HistogramType;
101 
103  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
104 
106  using KernelType = TKernel;
107 
109  using KernelIteratorType = typename KernelType::ConstIterator;
110 
113 
114  itkSetClampMacro(Rank, float, 0.0, 1.0);
115  itkGetConstMacro(Rank, float)
116 
117  bool GetUseVectorBasedAlgorithm() const
118  {
119  return HistogramType::UseVectorBasedAlgorithm();
120  }
121 
122 protected:
124  ~MaskedRankImageFilter() override = default;
125 
126  void PrintSelf(std::ostream & os, Indent indent) const override;
127 
128  void ConfigureHistogram( HistogramType & histogram ) override;
129 
130 private:
131  float m_Rank;
132 }; // end of class
133 } // end namespace itk
134 
135 #ifndef ITK_MANUAL_INSTANTIATION
136 #include "itkMaskedRankImageFilter.hxx"
137 #endif
138 
139 #endif
typename TInputImage::SizeType RadiusType
typename TInputImage::IndexType IndexType
Implements a generic moving histogram algorithm.
typename TOutputImage::PixelType OutputPixelType
typename TInputImage::RegionType RegionType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename TInputImage::OffsetType OffsetType
typename KernelType::ConstIterator KernelIteratorType
typename Superclass::HistogramType HistogramType
typename OutputImageType::RegionType OutputImageRegionType
typename TInputImage::SizeType SizeType
TOutputImage OutputImageType
typename TInputImage::PixelType InputPixelType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Rank filter of a greyscale image.