ITK  6.0.0
Insight Toolkit
itkMaskedRankImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
28namespace itk
29{
63template <typename TInputImage,
64 typename TMaskImage,
65 typename TOutputImage,
66 typename TKernel = FlatStructuringElement<TInputImage::ImageDimension>>
67class ITK_TEMPLATE_EXPORT MaskedRankImageFilter
68 : public MaskedMovingHistogramImageFilter<TInputImage,
69 TMaskImage,
70 TOutputImage,
71 TKernel,
72 Function::RankHistogram<typename TInputImage::PixelType>>
73{
74public:
75 ITK_DISALLOW_COPY_AND_MOVE(MaskedRankImageFilter);
76
80 TMaskImage,
81 TOutputImage,
82 TKernel,
84
87
89 itkNewMacro(Self);
90
92 itkOverrideGetNameOfClassMacro(MaskedRankImageFilter);
93
95 using InputImageType = TInputImage;
96 using OutputImageType = TOutputImage;
100 using PixelType = typename TInputImage::PixelType;
101 using OffsetType = typename TInputImage::OffsetType;
102 using typename Superclass::OutputImageRegionType;
103 using OutputPixelType = typename TOutputImage::PixelType;
104 using InputPixelType = typename TInputImage::PixelType;
105
106 using typename Superclass::HistogramType;
107
109 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
110
112 using KernelType = TKernel;
113
115 using KernelIteratorType = typename KernelType::ConstIterator;
116
119
120 itkSetClampMacro(Rank, float, 0.0, 1.0);
121 itkGetConstMacro(Rank, float);
122
123 bool
125 {
126 return HistogramType::UseVectorBasedAlgorithm();
127 }
128
129protected:
131 ~MaskedRankImageFilter() override = default;
132
133 void
134 PrintSelf(std::ostream & os, Indent indent) const override;
135
136 void
137 ConfigureHistogram(HistogramType & histogram) override;
138
139private:
140 float m_Rank{};
141}; // end of class
142} // end namespace itk
143
144#ifndef ITK_MANUAL_INSTANTIATION
145# include "itkMaskedRankImageFilter.hxx"
146#endif
147
148#endif
typename TInputImage::RegionType RegionType
typename TInputImage::SizeType SizeType
typename TInputImage::PixelType InputPixelType
typename TInputImage::SizeType RadiusType
typename TInputImage::IndexType IndexType
typename TOutputImage::PixelType OutputPixelType
typename TInputImage::OffsetType OffsetType
Base class for all process objects that output image data.
TOutputImage OutputImageType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Rank filter of a greyscale image.
typename KernelType::ConstIterator KernelIteratorType
typename TInputImage::PixelType PixelType
~MaskedRankImageFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
void ConfigureHistogram(HistogramType &histogram) override
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....