ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkVectorExpandImageFilter.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 itkVectorExpandImageFilter_h
19 #define itkVectorExpandImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
71 template< typename TInputImage, typename TOutputImage >
73  public ImageToImageFilter< TInputImage, TOutputImage >
74 {
75 public:
81 
83  itkNewMacro(Self);
84 
86  typedef typename TInputImage::Pointer InputImagePointer;
87  typedef typename TOutputImage::Pointer OutputImagePointer;
88  typedef typename TOutputImage::RegionType OutputImageRegionType;
89 
92 
94  itkStaticConstMacro(ImageDimension, unsigned int,
95  TInputImage::ImageDimension);
96 
100 
102  typedef typename OutputImageType::PixelType OutputPixelType;
103  typedef typename OutputPixelType::ValueType OutputValueType;
104  typedef typename InputImageType::PixelType InputPixelType;
105  typedef typename InputPixelType::ValueType InputValueType;
106 
108  enum { VectorDimension = InputPixelType::Dimension };
109 
111  typedef float ExpandFactorsType;
113 
115  typedef double CoordRepType;
119 
121  itkSetObjectMacro(Interpolator, InterpolatorType);
122  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
124 
127  itkSetMacro(ExpandFactors, ExpandFactorsArrayType);
128  virtual void SetExpandFactors(const float factor);
129  itkSetVectorMacro(ExpandFactors, const unsigned int, ImageDimension);
131 
133  itkGetConstReferenceMacro(ExpandFactors, ExpandFactorsArrayType);
134 
137 //TEST_RMV20100728 virtual void SetEdgePaddingValue( const OutputPixelType&
138 // value );
139 //TEST_RMV20100728
140 
142 //TEST_RMV20100728 virtual const OutputPixelType& GetEdgePaddingValue()
143 //TEST_RMV20100728 { return m_EdgePaddingValue; }
144 
151  virtual void GenerateOutputInformation() ITK_OVERRIDE;
152 
158  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
159 
160 #ifdef ITK_USE_CONCEPT_CHECKING
161  // Begin concept checking
162  itkConceptMacro( InputHasNumericTraitsCheck,
164  itkConceptMacro( OutputHasNumericTraitsCheck,
166  // End concept checking
167 #endif
168 
169 protected:
170 
173  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
174 
183  virtual
184  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
185  ThreadIdType threadId) ITK_OVERRIDE;
186 
189  virtual void BeforeThreadedGenerateData() ITK_OVERRIDE;
190 
191 private:
192  VectorExpandImageFilter(const Self &) ITK_DELETE_FUNCTION;
193  void operator=(const Self &) ITK_DELETE_FUNCTION;
194 
197 //TEST_RMV20100728 * \warning: The following is valid only when the flag
198 //TEST_RMV20100728 * ITK_USE_CENTERED_PIXEL_COORDINATES_CONSISTENTLY is ON
199 //TEST_RMV20100728 * The output image will not contain any padding, and
200 // therefore the
201 //TEST_RMV20100728 * EdgePaddingValue will not be used.
202 //TEST_RMV20100728 *
203 //TEST_RMV20100728 OutputPixelType m_EdgePaddingValue;
204 };
205 } // end namespace itk
206 
207 #ifndef ITK_MANUAL_INSTANTIATION
208 #include "itkVectorExpandImageFilter.hxx"
209 #endif
210 
211 #endif
virtual void GenerateInputRequestedRegion() override
Superclass::InputImageType InputImageType
virtual void BeforeThreadedGenerateData() override
OutputImageType::PixelType OutputPixelType
TOutputImage::RegionType OutputImageRegionType
InterpolatorType::Pointer InterpolatorPointer
InputImageType::PixelType InputPixelType
Base class for all process objects that output image data.
void PrintSelf(std::ostream &os, Indent indent) const override
static const unsigned int ImageDimension
VectorLinearInterpolateImageFunction< InputImageType, CoordRepType > DefaultInterpolatorType
Expand the size of a vector image by an integer factor in each dimension.
OutputPixelType::ValueType OutputValueType
Superclass::OutputImageType OutputImageType
virtual void GenerateOutputInformation() override
ImageToImageFilter< TInputImage, TOutputImage > Superclass
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
VectorInterpolateImageFunction< InputImageType, CoordRepType > InterpolatorType
Base class for filters that take an image as input and produce an image as output.
FixedArray< ExpandFactorsType, ImageDimension > ExpandFactorsArrayType
InputPixelType::ValueType InputValueType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for all vector image interpolaters.
TOutputImage OutputImageType
#define itkConceptMacro(name, concept)
virtual void SetExpandFactors(ExpandFactorsArrayType _arg)
virtual void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
Linearly interpolate a vector image at specified positions.
SmartPointer< const Self > ConstPointer