ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkConstantPadImageFilter.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 itkConstantPadImageFilter_h
19 #define itkConstantPadImageFilter_h
20 
21 #include "itkPadImageFilter.h"
22 
24 
25 namespace itk
26 {
47 template< typename TInputImage, typename TOutputImage >
49  public PadImageFilter< TInputImage, TOutputImage >
50 {
51 public:
57 
59  itkNewMacro(Self);
60 
63 
67 
71 
77 
79  itkStaticConstMacro(ImageDimension, unsigned int,
80  TInputImage::ImageDimension);
81  itkStaticConstMacro(OutputImageDimension, unsigned int,
82  TOutputImage::ImageDimension);
84 
87  {
88  if ( constant != m_InternalBoundaryCondition.GetConstant() )
89  {
90  m_InternalBoundaryCondition.SetConstant( constant );
91  this->Modified();
92  }
93  }
95  {
96  return m_InternalBoundaryCondition.GetConstant();
97  }
99 
100 #ifdef ITK_USE_CONCEPT_CHECKING
101  // Begin concept checking
102  itkConceptMacro( OutputEqualityComparableCheck,
104  itkConceptMacro( InputConvertibleToOutputCheck,
106  itkConceptMacro( SameDimensionCheck,
108  itkConceptMacro( OutputOStreamWritableCheck,
110  // End concept checking
111 #endif
112 
113 protected:
116  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
117 
118 private:
119  ConstantPadImageFilter(const Self &); //purposely not implemented
120  void operator=(const Self &); //purposely not implemented
121 
123 };
124 } // end namespace itk
125 
126 #ifndef ITK_MANUAL_INSTANTIATION
127 #include "itkConstantPadImageFilter.hxx"
128 #endif
129 
130 #endif
TOutputImage::RegionType OutputImageRegionType
Increase the image size by padding with a constant value.
TInputImage::RegionType InputImageRegionType
This boundary condition returns a constant value for out-of-bounds image pixels.
TInputImage::PixelType InputImagePixelType
Superclass::InputImageRegionType InputImageRegionType
Base class for all process objects that output image data.
TInputImage::IndexType InputImageIndexType
void PrintSelf(std::ostream &os, Indent indent) const override
OutputImagePixelType GetConstant() const
static const unsigned int ImageDimension
static const unsigned int OutputImageDimension
Superclass::OutputImageSizeType OutputImageSizeType
TOutputImage::SizeType OutputImageSizeType
TOutputImage::PixelType OutputImagePixelType
Superclass::OutputImagePixelType OutputImagePixelType
Superclass::InputImageSizeType InputImageSizeType
Superclass::InputImageIndexType InputImageIndexType
OutputImageType::PixelType OutputImagePixelType
SmartPointer< const Self > ConstPointer
virtual void Modified() const
void SetConstant(OutputImagePixelType constant)
Superclass::OutputImageRegionType OutputImageRegionType
TInputImage::SizeType InputImageSizeType
Superclass::InputImagePixelType InputImagePixelType
ConstantBoundaryCondition< TInputImage, TOutputImage > m_InternalBoundaryCondition
Control indentation during Print() invocation.
Definition: itkIndent.h:49
PadImageFilter< TInputImage, TOutputImage > Superclass
TOutputImage::IndexType OutputImageIndexType
Increase the image size by padding. Superclass for filters that fill in extra pixels.
#define itkConceptMacro(name, concept)
Superclass::OutputImageIndexType OutputImageIndexType
void operator=(const Self &)