ITK  4.4.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  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
100 
103  void BeforeThreadedGenerateData();
104 
106  void AfterThreadedGenerateData();
107 
108 #ifdef ITK_USE_CONCEPT_CHECKING
109 
110  itkConceptMacro( InputHasNumericTraitsCheck,
112 
114 #endif
115 
116 protected:
119  void PrintSelf(std::ostream & os, Indent indent) const;
120 
122  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
123  ThreadIdType threadId);
124 
125 private:
126  InterpolateImageFilter(const Self &); //purposely not implemented
127  void operator=(const Self &); //purposely not implemented
128 
130 
132 
133  double m_Distance;
134 };
135 } // end namespace itk
136 
137 #ifndef ITK_MANUAL_INSTANTIATION
138 #include "itkInterpolateImageFilter.hxx"
139 #endif
140 
141 #endif
142