ITK  6.0.0
Insight Toolkit
itkRegionalMaximaImageFilter.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 itkRegionalMaximaImageFilter_h
19#define itkRegionalMaximaImageFilter_h
20
22
23namespace itk
24{
53template <typename TInputImage, typename TOutputImage>
54class ITK_TEMPLATE_EXPORT RegionalMaximaImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
55{
56public:
57 ITK_DISALLOW_COPY_AND_MOVE(RegionalMaximaImageFilter);
58
64
66 using InputImageType = TInputImage;
67 using OutputImageType = TOutputImage;
71 using InputImagePixelType = typename InputImageType::PixelType;
75 using OutputImagePixelType = typename OutputImageType::PixelType;
76
78 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
79 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
80
82 itkNewMacro(Self);
83
85 itkOverrideGetNameOfClassMacro(RegionalMaximaImageFilter);
86
93 itkSetMacro(FullyConnected, bool);
94 itkGetConstMacro(FullyConnected, bool);
95 itkBooleanMacro(FullyConnected);
102 itkSetMacro(ForegroundValue, OutputImagePixelType);
103 itkGetConstMacro(ForegroundValue, OutputImagePixelType);
110 itkSetMacro(BackgroundValue, OutputImagePixelType);
111 itkGetConstMacro(BackgroundValue, OutputImagePixelType);
118 itkSetMacro(FlatIsMaxima, bool);
119 itkGetConstMacro(FlatIsMaxima, bool);
120 itkBooleanMacro(FlatIsMaxima);
123#ifdef ITK_USE_CONCEPT_CHECKING
124 // Begin concept checking
127 // End concept checking
128#endif
129
130protected:
132 ~RegionalMaximaImageFilter() override = default;
133 void
134 PrintSelf(std::ostream & os, Indent indent) const override;
135
139 void
141
143 void
144 EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
145
148 void
149 GenerateData() override;
150
151private:
152 bool m_FullyConnected{ false };
153 bool m_FlatIsMaxima{ true };
154 OutputImagePixelType m_ForegroundValue{};
155 OutputImagePixelType m_BackgroundValue{};
156}; // end of class
157} // end namespace itk
158
159#ifndef ITK_MANUAL_INSTANTIATION
160# include "itkRegionalMaximaImageFilter.hxx"
161#endif
162
163#endif
Base class for all data objects in ITK.
Base class for all process objects that output image data.
typename OutputImageType::PixelType OutputImagePixelType
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename OutputImageType::Pointer OutputImagePointer
Base class for filters that take an image as input and produce an image as output.
typename InputImageType::ConstPointer InputImageConstPointer
typename InputImageType::Pointer InputImagePointer
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::RegionType InputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Produce a binary image where foreground is the regional maxima of the input image.
typename OutputImageType::ConstPointer OutputImageConstPointer
void EnlargeOutputRequestedRegion(DataObject *) override
~RegionalMaximaImageFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
void GenerateInputRequestedRegion() override
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....