ITK  5.4.0
Insight Toolkit
itkBoxImageFilter.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 itkBoxImageFilter_h
19#define itkBoxImageFilter_h
20
22#include "itkCastImageFilter.h"
23
24namespace itk
25{
39template <typename TInputImage, typename TOutputImage>
40class ITK_TEMPLATE_EXPORT BoxImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
41{
42public:
43 ITK_DISALLOW_COPY_AND_MOVE(BoxImageFilter);
44
50
52 itkNewMacro(Self);
53
55 itkOverrideGetNameOfClassMacro(BoxImageFilter);
56
58 using InputImageType = TInputImage;
62 using OffsetType = typename TInputImage::OffsetType;
63
64 using InputPixelType = typename TInputImage::PixelType;
65
66 using OutputImageType = TOutputImage;
67 using OutputPixelType = typename TOutputImage::PixelType;
68
70 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
71
75
76 virtual void
77 SetRadius(const RadiusType & radius);
78
79 virtual void
80 SetRadius(const RadiusValueType & radius);
81
82 itkGetConstReferenceMacro(Radius, RadiusType);
83
84protected:
86 ~BoxImageFilter() override = default;
87
88 void
90
91 void
92 PrintSelf(std::ostream & os, Indent indent) const override;
93
94private:
95 RadiusType m_Radius{};
96};
97} // namespace itk
98
99#ifndef ITK_MANUAL_INSTANTIATION
100# include "itkBoxImageFilter.hxx"
101#endif
102
103#endif
A base class for all the filters working on a box neighborhood.
void PrintSelf(std::ostream &os, Indent indent) const override
typename TInputImage::RegionType RegionType
virtual void SetRadius(const RadiusType &radius)
typename TInputImage::SizeType SizeType
typename TInputImage::PixelType InputPixelType
typename TInputImage::SizeType RadiusType
typename TInputImage::SizeValueType RadiusValueType
void GenerateInputRequestedRegion() override
virtual void SetRadius(const RadiusValueType &radius)
typename TInputImage::IndexType IndexType
~BoxImageFilter() override=default
typename TOutputImage::PixelType OutputPixelType
typename TInputImage::OffsetType OffsetType
Base class for all process objects that output image data.
TOutputImage OutputImageType
Base class for filters that take an image as input and produce an image as output.
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...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition: itkIntTypes.h:83