ITK  4.2.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< class TInputImage, class TOutputImage >
44 class ITK_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); }
82  const InputImageType * GetInput1()
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 
100 
101  itkGetObjectMacro(Interpolator, InterpolatorType);
102 
105  void BeforeThreadedGenerateData();
106 
108  void AfterThreadedGenerateData();
109 
110 #ifdef ITK_USE_CONCEPT_CHECKING
111 
112  itkConceptMacro( InputHasNumericTraitsCheck,
114 
116 #endif
117 protected:
120  void PrintSelf(std::ostream & os, Indent indent) const;
122 
124  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
125  ThreadIdType threadId);
126 
127 private:
128  InterpolateImageFilter(const Self &); //purposely not implemented
129  void operator=(const Self &); //purposely not implemented
130 
132 
134 
135  double m_Distance;
136 };
137 } // end namespace itk
138 
139 #ifndef ITK_MANUAL_INSTANTIATION
140 #include "itkInterpolateImageFilter.hxx"
141 #endif
142 
143 #endif
144