ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkInterpolateImagePointsFilter.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 /*=========================================================================
19  *
20  * Portions of this file are subject to the VTK Toolkit Version 3 copyright.
21  *
22  * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
23  *
24  * For complete copyright, license and disclaimer of warranty information
25  * please refer to the NOTICE file at the top of the ITK source tree.
26  *
27  *=========================================================================*/
28 #ifndef __itkInterpolateImagePointsFilter_h
29 #define __itkInterpolateImagePointsFilter_h
30 
32 #include "itkImageToImageFilter.h"
33 #include "itkImageRegionIterator.h"
34 
35 namespace itk
36 {
76 template< typename TInputImage,
77  typename TOutputImage,
78  typename TCoordType = typename TInputImage::PixelType,
79  typename InterpolatorType = BSplineInterpolateImageFunction< TInputImage, TCoordType > >
81  public ImageToImageFilter< TInputImage, TOutputImage >
82 {
83 public:
89 
92 
94  itkNewMacro(Self);
95 
97  itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);
98 
103 
105  typedef typename TOutputImage::Pointer OutputImagePointer;
107  typedef typename OutputImageType::RegionType OutputImageRegionType;
108 
110  typedef typename TOutputImage::PixelType PixelType;
111 
113  typedef typename InterpolatorType::Pointer InterpolatorPointer;
114  typedef typename InterpolatorType::ContinuousIndexType ContinuousIndexType;
115 
118 
120  typedef ImageToImageFilterDetail::ImageRegionCopier< itkGetStaticConstMacro(ImageDimension),
121  itkGetStaticConstMacro(ImageDimension) > RegionCopierType;
122 
127  void SetInputImage(const TInputImage *inputImage);
128 
131  void SetInterpolationCoordinate(const CoordImageType *coordinate, unsigned int setDimension);
132 
134  itkSetMacro(DefaultPixelValue, PixelType);
135 
137  itkGetConstMacro(DefaultPixelValue, PixelType);
138 
141  { return m_Interpolator; }
142 
146 
149 
150 #ifdef ITK_USE_CONCEPT_CHECKING
151  // Begin concept checking
152  itkConceptMacro( InputHasNumericTraitsCheck,
154  // End concept checking
155 #endif
156 
157 protected:
159  // ~InterpolateImagePointsFilter(){} default implemnetation ok
160 
161  void PrintSelf(std::ostream & os, Indent indent) const;
162 
168  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
169  ThreadIdType threadId);
170 
172 
178  virtual void VerifyInputInformation() {}
179 
180 private:
181 
186 
187  InterpolateImagePointsFilter(const Self &); //purposely not implemented
188  void operator=(const Self &); //purposely not implemented
189 
191  PixelType m_DefaultPixelValue; // default pixel value if the
192  // point is outside the image
193 };
194 } // namespace itk
195 
196 #ifndef ITK_MANUAL_INSTANTIATION
197 #include "itkInterpolateImagePointsFilter.hxx"
198 #endif
199 
200 #endif
Superclass::RegionType RegionType
Definition: itkImage.h:140
ImageToImageFilter< TInputImage, TOutputImage > Superclass
ImageRegionConstIterator< CoordImageType > CoordImageIterator
A Function object used to dispatching to a routine to copy a region (start index and size)...
void PrintSelf(std::ostream &os, Indent indent) const
InterpolatorType::ContinuousIndexType ContinuousIndexType
InputImageType::Pointer InputImagePointer
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
void SetInputImage(const TInputImage *inputImage)
Base class for all process objects that output image data.
ImageRegionIterator< InputImageType > OutputImageIterator
A multi-dimensional iterator templated over image type that walks a region of pixels.
ImageToImageFilterDetail::ImageRegionCopier< itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) > RegionCopierType
Resamples an image at the coordinates specified by the user.
Base class for filters that take an image as input and produce an image as output.
void SetInterpolationCoordinate(const CoordImageType *coordinate, unsigned int setDimension)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Image< TCoordType, itkGetStaticConstMacro(ImageDimension) > CoordImageType
TOutputImage OutputImageType
#define itkConceptMacro(name, concept)
Templated n-dimensional image class.
Definition: itkImage.h:75
A multi-dimensional iterator templated over image type that walks a region of pixels.
unsigned int ThreadIdType
Definition: itkIntTypes.h:159