Orfeo Toolbox  4.0
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 "itkImageToImageFilter.h"
22 
24 
25 namespace itk
26 {
46 template< typename TInputImage, typename TOutputImage >
48  public ImageToImageFilter< TInputImage, TOutputImage >
49 {
50 public:
56 
58  itkNewMacro(Self);
59 
61  typedef typename TOutputImage::RegionType OutputImageRegionType;
62  typedef typename TInputImage::RegionType InputImageRegionType;
63 
65  typedef typename TOutputImage::PixelType OutputImagePixelType;
66  typedef typename TInputImage::PixelType InputImagePixelType;
67 
69  typedef typename TOutputImage::IndexType OutputImageIndexType;
70  typedef typename TInputImage::IndexType InputImageIndexType;
71  typedef typename TOutputImage::SizeType OutputImageSizeType;
72  typedef typename TInputImage::SizeType InputImageSizeType;
73  typedef typename TInputImage::SizeType SizeType;
75 
79 
81  itkTypeMacro(PadImageFilter, ImageToImageFilter);
82 
84  itkStaticConstMacro(ImageDimension, unsigned int,
85  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);
95 
96  void SetPadBound(const InputImageSizeType & bound)
97  {
98  this->SetPadLowerBound(bound);
99  this->SetPadUpperBound(bound);
100  }
101 
103  itkSetMacro(BoundaryCondition, BoundaryConditionPointerType);
104  itkGetConstMacro(BoundaryCondition, BoundaryConditionPointerType);
105 
106 protected:
107  PadImageFilter();
109  void PrintSelf(std::ostream & os, Indent indent) const;
110 
117  virtual void GenerateOutputInformation();
118 
124  virtual void GenerateInputRequestedRegion();
125 
127  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
128  ThreadIdType threadId);
129 
131  void InternalSetBoundaryCondition( const BoundaryConditionPointerType boundaryCondition );
132 
133 private:
134  PadImageFilter(const Self &); //purposely not implemented
135  void operator=(const Self &); //purposely not implemented
136 
139 
141 };
142 } // end namespace itk
143 
144 #ifndef ITK_MANUAL_INSTANTIATION
145 #include "itkPadImageFilter.hxx"
146 #endif
147 
148 #endif

Generated at Sat Mar 8 2014 15:20:09 for Orfeo Toolbox with doxygen 1.8.3.1