ITK  5.2.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  * 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 itkBoxImageFilter_h
19 #define itkBoxImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkCastImageFilter.h"
23 
24 namespace itk
25 {
39 template <typename TInputImage, typename TOutputImage>
40 class ITK_TEMPLATE_EXPORT BoxImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
41 {
42 public:
43  ITK_DISALLOW_COPY_AND_ASSIGN(BoxImageFilter);
44 
50 
52  itkNewMacro(Self);
53 
55  itkTypeMacro(BoxImageFilter, ImageToImageFilter);
56 
58  using InputImageType = TInputImage;
60  using SizeType = typename TInputImage::SizeType;
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 
84 protected:
86  ~BoxImageFilter() override = default;
87 
88  void
89  GenerateInputRequestedRegion() override;
90 
91  void
92  PrintSelf(std::ostream & os, Indent indent) const override;
93 
94 private:
96 };
97 } // namespace itk
98 
99 #ifndef ITK_MANUAL_INSTANTIATION
100 # include "itkBoxImageFilter.hxx"
101 #endif
102 
103 #endif
itk::BoxImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkBoxImageFilter.h:67
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::BoxImageFilter::m_Radius
RadiusType m_Radius
Definition: itkBoxImageFilter.h:95
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itkCastImageFilter.h
itk::BoxImageFilter
A base class for all the filters working on a box neighborhood.
Definition: itkBoxImageFilter.h:40
itk::BoxImageFilter::RadiusType
typename TInputImage::SizeType RadiusType
Definition: itkBoxImageFilter.h:73
itk::BoxImageFilter::OffsetType
typename TInputImage::OffsetType OffsetType
Definition: itkBoxImageFilter.h:62
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::BoxImageFilter::InputPixelType
typename TInputImage::PixelType InputPixelType
Definition: itkBoxImageFilter.h:64
itk::BoxImageFilter::IndexType
typename TInputImage::IndexType IndexType
Definition: itkBoxImageFilter.h:61
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itkImageToImageFilter.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::BoxImageFilter::SizeType
typename TInputImage::SizeType SizeType
Definition: itkBoxImageFilter.h:60
itk::BoxImageFilter::RadiusValueType
typename TInputImage::SizeValueType RadiusValueType
Definition: itkBoxImageFilter.h:74
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::BoxImageFilter::RegionType
typename TInputImage::RegionType RegionType
Definition: itkBoxImageFilter.h:59