ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkInterpolateImageFilter.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 itkInterpolateImageFilter_h
19 #define itkInterpolateImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
43 template< typename TInputImage, typename TOutputImage >
44 class ITK_TEMPLATE_EXPORT InterpolateImageFilter:
45  public ImageToImageFilter< TInputImage, TOutputImage >
46 {
47 public:
53 
55  itkNewMacro(Self);
56 
59 
61  typedef typename Superclass::InputImageType InputImageType;
62  typedef typename Superclass::InputImagePointer InputImagePointer;
63  typedef typename Superclass::OutputImageType OutputImageType;
64  typedef typename Superclass::OutputImagePointer OutputImagePointer;
65  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
66 
68  itkStaticConstMacro(ImageDimension, unsigned int,
69  TOutputImage::ImageDimension);
70  itkStaticConstMacro(IntermediateImageDimension, unsigned int,
71  TOutputImage::ImageDimension + 1);
73 
75  typedef typename TInputImage::PixelType InputPixelType;
78 
80  void SetInput1(const InputImageType *image)
81  { this->SetInput(image); }
83  { return this->GetInput(); }
85 
87  void SetInput2(const InputImageType *image);
88 
89  const InputImageType * GetInput2();
90 
93  itkSetClampMacro(Distance, double, 0.0, 1.0);
94  itkGetConstMacro(Distance, double);
96 
98  itkSetObjectMacro(Interpolator, InterpolatorType)
99  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
100 
103  void BeforeThreadedGenerateData() ITK_OVERRIDE;
104 
106  void AfterThreadedGenerateData() ITK_OVERRIDE;
107 
108 #ifdef ITK_USE_CONCEPT_CHECKING
109  // Begin concept checking
110  itkConceptMacro( InputHasNumericTraitsCheck,
112  // End concept checking
113 #endif
114 
115 protected:
117  ~InterpolateImageFilter() ITK_OVERRIDE {}
118  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
119 
121  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
122  ThreadIdType threadId) ITK_OVERRIDE;
123 
124 private:
125  ITK_DISALLOW_COPY_AND_ASSIGN(InterpolateImageFilter);
126 
128 
130 
131  double m_Distance;
132 };
133 } // end namespace itk
134 
135 #ifndef ITK_MANUAL_INSTANTIATION
136 #include "itkInterpolateImageFilter.hxx"
137 #endif
138 
139 #endif
Superclass::OutputImageType OutputImageType
Superclass::OutputImagePointer OutputImagePointer
const InputImageType * GetInput1()
SmartPointer< const Self > ConstPointer
Base class for all process objects that output image data.
Image< InputPixelType, itkGetStaticConstMacro(IntermediateImageDimension) > IntermediateImageType
Superclass::OutputImageRegionType OutputImageRegionType
InterpolateImageFunction< IntermediateImageType > InterpolatorType
Superclass::InputImageType InputImageType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
Base class for all image interpolaters.
void SetInput1(const InputImageType *image)
Superclass::InputImagePointer InputImagePointer
Base class for filters that take an image as input and produce an image as output.
TInputImage::PixelType InputPixelType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ImageToImageFilter< TInputImage, TOutputImage > Superclass
InterpolatorType::Pointer m_Interpolator
#define itkConceptMacro(name, concept)
Interpolate an image from two N-D images.
IntermediateImageType::Pointer m_IntermediateImage
Templated n-dimensional image class.
Definition: itkImage.h:75