ITK  5.4.0
Insight Toolkit
itkPadImageFilter.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 itkPadImageFilter_h
19 #define itkPadImageFilter_h
20 
21 #include "itkPadImageFilterBase.h"
22 
24 
25 namespace itk
26 {
47 template <typename TInputImage, typename TOutputImage>
48 class ITK_TEMPLATE_EXPORT PadImageFilter : public PadImageFilterBase<TInputImage, TOutputImage>
49 {
50 public:
51  ITK_DISALLOW_COPY_AND_MOVE(PadImageFilter);
52 
58 
60  itkNewMacro(Self);
61 
65 
67  using OutputImagePixelType = typename TOutputImage::PixelType;
68  using InputImagePixelType = typename TInputImage::PixelType;
69 
75  using SizeType = typename TInputImage::SizeType;
77 
80 
82  itkOverrideGetNameOfClassMacro(PadImageFilter);
83 
85  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
86 
89  itkSetMacro(PadLowerBound, SizeType);
90  itkSetMacro(PadUpperBound, SizeType);
91  itkGetConstReferenceMacro(PadLowerBound, SizeType);
92  itkGetConstReferenceMacro(PadUpperBound, SizeType);
93  itkSetVectorMacro(PadLowerBound, const SizeValueType, ImageDimension);
94  itkSetVectorMacro(PadUpperBound, const SizeValueType, ImageDimension);
97  void
99  {
100  this->SetPadLowerBound(bound);
101  this->SetPadUpperBound(bound);
102  }
103 
104 protected:
105  PadImageFilter();
106  ~PadImageFilter() override = default;
107  void
108  PrintSelf(std::ostream & os, Indent indent) const override;
109 
116  void
117  GenerateOutputInformation() override;
118 
119 private:
120  SizeType m_PadLowerBound{};
121  SizeType m_PadUpperBound{};
122 };
123 } // end namespace itk
124 
125 #ifndef ITK_MANUAL_INSTANTIATION
126 # include "itkPadImageFilter.hxx"
127 #endif
128 
129 #endif
itk::PadImageFilter::InputImageIndexType
typename TInputImage::IndexType InputImageIndexType
Definition: itkPadImageFilter.h:72
itk::PadImageFilterBase
Increase the image size by padding. Superclass for filters that fill in extra pixels.
Definition: itkPadImageFilterBase.h:48
itk::PadImageFilter::OutputImageSizeType
typename TOutputImage::SizeType OutputImageSizeType
Definition: itkPadImageFilter.h:73
itk::PadImageFilter::OutputImageIndexType
typename TOutputImage::IndexType OutputImageIndexType
Definition: itkPadImageFilter.h:71
itk::PadImageFilter::SizeValueType
typename TInputImage::SizeValueType SizeValueType
Definition: itkPadImageFilter.h:76
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ImageBoundaryCondition
A virtual base object that defines an interface to a class of boundary condition objects for use by n...
Definition: itkImageBoundaryCondition.h:52
itk::PadImageFilter::InputImageSizeType
typename TInputImage::SizeType InputImageSizeType
Definition: itkPadImageFilter.h:74
itkImageBoundaryCondition.h
itk::ImageToImageFilter::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkImageToImageFilter.h:133
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::PadImageFilter::SizeType
typename TInputImage::SizeType SizeType
Definition: itkPadImageFilter.h:75
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::PadImageFilter
Increase the image size by padding. Superclass for filters that fill in extra pixels.
Definition: itkPadImageFilter.h:48
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
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:139
itk::ImageSource::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkImageSource.h:93
itk::PadImageFilter::SetPadBound
void SetPadBound(const InputImageSizeType &bound)
Definition: itkPadImageFilter.h:98
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itkPadImageFilterBase.h
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83