ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkPadImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 itkPadImageFilter_h
19 #define itkPadImageFilter_h
20 
21 #include "itkPadImageFilterBase.h"
22 
24 
25 namespace itk
26 {
46 template< typename TInputImage, typename TOutputImage >
47 class ITK_TEMPLATE_EXPORT PadImageFilter:
48  public PadImageFilterBase< TInputImage, TOutputImage >
49 {
50 public:
51  ITK_DISALLOW_COPY_AND_ASSIGN(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 
81 
83  itkTypeMacro(PadImageFilter, PadImageFilterBase);
84 
86  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
87 
90  itkSetMacro(PadLowerBound, SizeType);
91  itkSetMacro(PadUpperBound, SizeType);
92  itkGetConstReferenceMacro(PadLowerBound, SizeType);
93  itkGetConstReferenceMacro(PadUpperBound, SizeType);
94  itkSetVectorMacro(PadLowerBound, const SizeValueType, ImageDimension);
95  itkSetVectorMacro(PadUpperBound, const SizeValueType, ImageDimension);
97 
98  void SetPadBound(const InputImageSizeType & bound)
99  {
100  this->SetPadLowerBound(bound);
101  this->SetPadUpperBound(bound);
102  }
103 
104 protected:
105  PadImageFilter();
106  ~PadImageFilter() override = default;
107  void PrintSelf(std::ostream & os, Indent indent) const override;
108 
115  void GenerateOutputInformation() override;
116 
117 private:
120 };
121 } // end namespace itk
122 
123 #ifndef ITK_MANUAL_INSTANTIATION
124 #include "itkPadImageFilter.hxx"
125 #endif
126 
127 #endif
unsigned long SizeValueType
Definition: itkIntTypes.h:83
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename TInputImage::SizeType SizeType
typename OutputImageType::PixelType OutputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Increase the image size by padding. Superclass for filters that fill in extra pixels.
void SetPadBound(const InputImageSizeType &bound)
typename OutputImageType::RegionType OutputImageRegionType
typename TOutputImage::SizeType OutputImageSizeType
A virtual base object that defines an interface to a class of boundary condition objects for use by n...
typename TOutputImage::IndexType OutputImageIndexType
typename InputImageType::RegionType InputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename TInputImage::SizeValueType SizeValueType
Increase the image size by padding. Superclass for filters that fill in extra pixels.
typename TInputImage::IndexType InputImageIndexType
typename TInputImage::SizeType InputImageSizeType