template<typename TInputImage, typename TOutputImage, typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
class itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTransformPrecisionType >
Resample an image via a coordinate transform.
ResampleImageFilter resamples an existing image through some coordinate transform, interpolating via some image function. The class is templated over the types of the input and output images.
Note that the choice of interpolator function can be important. This function is set via SetInterpolator(). The default is LinearInterpolateImageFunction<InputImageType, TInterpolatorPrecisionType>, which is reasonable for ordinary medical images. However, some synthetic images have pixels drawn from a finite prescribed set. An example would be a mask indicating the segmentation of a brain into a small number of tissue types. For such an image, one does not want to interpolate between different pixel values, and so NearestNeighborInterpolateImageFunction< InputImageType, TCoordRep > would be a better choice.
If an sample is taken from outside the image domain, the default behavior is to use a default pixel value. If different behavior is desired, an extrapolator function can be set with SetExtrapolator().
Output information (spacing, size and direction) for the output image should be set. This information has the normal defaults of unit spacing, zero origin and identity direction. Optionally, the output information can be obtained from a reference image. If the reference image is provided and UseReferenceImage is On, then the spacing, origin and direction of the reference image will be used.
Since this filter produces an image which is a different size than its input, it needs to override several of the methods defined in ProcessObject in order to properly manage the pipeline execution model. In particular, this filter overrides ProcessObject::GenerateInputRequestedRegion() and ProcessObject::GenerateOutputInformation().
This filter is implemented as a multithreaded filter. It provides a ThreadedGenerateData() method for its implementation.
- Warning
- For multithreading, the TransformPoint method of the user-designated coordinate transform must be threadsafe.
- Wiki Examples:
-
- Examples:
- Filtering/DigitallyReconstructedRadiograph1.cxx, Filtering/FFTDirectInverse.cxx, Filtering/ResampleImageFilter.cxx, Filtering/ResampleImageFilter2.cxx, Filtering/ResampleImageFilter3.cxx, Filtering/ResampleImageFilter4.cxx, Filtering/ResampleImageFilter5.cxx, Filtering/ResampleImageFilter7.cxx, Filtering/ResampleImageFilter8.cxx, Filtering/ResampleOrientedImageFilter.cxx, Filtering/ResampleVolumesToBeIsotropic.cxx, Filtering/SubsampleVolume.cxx, RegistrationITKv3/BSplineWarping1.cxx, RegistrationITKv3/BSplineWarping2.cxx, RegistrationITKv3/DeformableRegistration12.cxx, RegistrationITKv3/DeformableRegistration13.cxx, RegistrationITKv3/DeformableRegistration14.cxx, RegistrationITKv3/DeformableRegistration15.cxx, RegistrationITKv3/DeformableRegistration4.cxx, RegistrationITKv3/DeformableRegistration6.cxx, RegistrationITKv3/DeformableRegistration7.cxx, RegistrationITKv3/DeformableRegistration8.cxx, RegistrationITKv3/ImageRegistration1.cxx, RegistrationITKv3/ImageRegistration10.cxx, RegistrationITKv3/ImageRegistration11.cxx, RegistrationITKv3/ImageRegistration12.cxx, RegistrationITKv3/ImageRegistration13.cxx, RegistrationITKv3/ImageRegistration14.cxx, RegistrationITKv3/ImageRegistration15.cxx, RegistrationITKv3/ImageRegistration16.cxx, RegistrationITKv3/ImageRegistration17.cxx, RegistrationITKv3/ImageRegistration18.cxx, RegistrationITKv3/ImageRegistration19.cxx, RegistrationITKv3/ImageRegistration2.cxx, RegistrationITKv3/ImageRegistration20.cxx, RegistrationITKv3/ImageRegistration3.cxx, RegistrationITKv3/ImageRegistration4.cxx, RegistrationITKv3/ImageRegistration5.cxx, RegistrationITKv3/ImageRegistration6.cxx, RegistrationITKv3/ImageRegistration7.cxx, RegistrationITKv3/ImageRegistration8.cxx, RegistrationITKv3/ImageRegistration9.cxx, RegistrationITKv3/ImageRegistrationHistogramPlotter.cxx, RegistrationITKv3/MultiResImageRegistration1.cxx, RegistrationITKv3/MultiResImageRegistration2.cxx, RegistrationITKv3/MultiResImageRegistration3.cxx, RegistrationITKv3/ThinPlateSplineWarp.cxx, RegistrationITKv4/BSplineWarping1.cxx, RegistrationITKv4/BSplineWarping2.cxx, RegistrationITKv4/DeformableRegistration12.cxx, RegistrationITKv4/DeformableRegistration13.cxx, RegistrationITKv4/DeformableRegistration14.cxx, RegistrationITKv4/DeformableRegistration15.cxx, RegistrationITKv4/DeformableRegistration4.cxx, RegistrationITKv4/DeformableRegistration6.cxx, RegistrationITKv4/DeformableRegistration7.cxx, RegistrationITKv4/DeformableRegistration8.cxx, RegistrationITKv4/ImageRegistration1.cxx, RegistrationITKv4/ImageRegistration10.cxx, RegistrationITKv4/ImageRegistration11.cxx, RegistrationITKv4/ImageRegistration12.cxx, RegistrationITKv4/ImageRegistration13.cxx, RegistrationITKv4/ImageRegistration14.cxx, RegistrationITKv4/ImageRegistration15.cxx, RegistrationITKv4/ImageRegistration16.cxx, RegistrationITKv4/ImageRegistration17.cxx, RegistrationITKv4/ImageRegistration18.cxx, RegistrationITKv4/ImageRegistration19.cxx, RegistrationITKv4/ImageRegistration2.cxx, RegistrationITKv4/ImageRegistration20.cxx, RegistrationITKv4/ImageRegistration3.cxx, RegistrationITKv4/ImageRegistration4.cxx, RegistrationITKv4/ImageRegistration5.cxx, RegistrationITKv4/ImageRegistration6.cxx, RegistrationITKv4/ImageRegistration7.cxx, RegistrationITKv4/ImageRegistration8.cxx, RegistrationITKv4/ImageRegistration9.cxx, RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx, RegistrationITKv4/MultiResImageRegistration1.cxx, RegistrationITKv4/MultiResImageRegistration2.cxx, RegistrationITKv4/MultiResImageRegistration3.cxx, and RegistrationITKv4/ThinPlateSplineWarp.cxx.
Definition at line 89 of file itkResampleImageFilter.h.
|
virtual PixelType | CastPixelWithBoundsChecking (const InterpolatorOutputType value, const ComponentType minComponent, const ComponentType maxComponent) const |
|
virtual void | LinearThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) |
|
virtual void | NonlinearThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) |
|
void | PrintSelf (std::ostream &os, Indent indent) const |
|
| ResampleImageFilter () |
|
virtual void | ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) |
|
virtual void | VerifyInputInformation () |
|
| ~ResampleImageFilter () |
|
virtual void | CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion) |
|
virtual void | CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion) |
|
| ImageToImageFilter () |
|
| ~ImageToImageFilter () |
|
void | PushBackInput (const DataObject *input) |
|
void | PushFrontInput (const DataObject *input) |
|
virtual void | AllocateOutputs () |
|
virtual void | GenerateData () ITK_OVERRIDE |
|
virtual const
ImageRegionSplitterBase * | GetImageRegionSplitter (void) const |
|
| ImageSource () |
|
virtual unsigned int | SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion) |
|
virtual | ~ImageSource () |
|
virtual void | AddInput (DataObject *input) |
|
virtual void | AddOutput (DataObject *output) |
|
virtual void | CacheInputReleaseDataFlags () |
|
virtual void | GenerateOutputRequestedRegion (DataObject *output) |
|
virtual const
DataObjectPointerArraySizeType & | GetNumberOfRequiredOutputs () const |
|
bool | IsIndexedInputName (const DataObjectIdentifierType &) const |
|
bool | IsIndexedOutputName (const DataObjectIdentifierType &) const |
|
| itkLegacyMacro (virtual void RemoveOutput(DataObject *output)) |
|
| itkLegacyMacro (void SetNumberOfOutputs(DataObjectPointerArraySizeType num)) |
|
| itkLegacyMacro (virtual void RemoveInput(DataObject *input)) |
|
| itkLegacyMacro (void SetNumberOfInputs(DataObjectPointerArraySizeType num)) |
|
DataObjectPointerArraySizeType | MakeIndexFromInputName (const DataObjectIdentifierType &name) const |
|
DataObjectPointerArraySizeType | MakeIndexFromOutputName (const DataObjectIdentifierType &name) const |
|
DataObjectIdentifierType | MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const |
|
DataObjectIdentifierType | MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const |
|
| ProcessObject () |
|
virtual void | PropagateResetPipeline () |
|
virtual void | ReleaseInputs () |
|
virtual void | RemoveInput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveInput (DataObjectPointerArraySizeType) |
|
virtual void | RemoveOutput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveOutput (DataObjectPointerArraySizeType idx) |
|
virtual void | RestoreInputReleaseDataFlags () |
|
virtual void | SetInput (const DataObjectIdentifierType &key, DataObject *input) |
|
virtual void | SetNthInput (DataObjectPointerArraySizeType num, DataObject *input) |
|
virtual void | SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output) |
|
void | SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num) |
|
void | SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num) |
|
virtual void | SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg) |
|
virtual void | SetOutput (const DataObjectIdentifierType &key, DataObject *output) |
|
virtual void | SetPrimaryInput (DataObject *input) |
|
virtual void | SetPrimaryOutput (DataObject *output) |
|
virtual void | VerifyPreconditions () |
|
| ~ProcessObject () |
|
DataObject * | GetInput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetInput (const DataObjectIdentifierType &key) const |
|
DataObject * | GetInput (DataObjectPointerArraySizeType idx) |
|
const DataObject * | GetInput (DataObjectPointerArraySizeType idx) const |
|
DataObject * | GetPrimaryInput () |
|
const DataObject * | GetPrimaryInput () const |
|
virtual void | SetPrimaryInputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryInputName (void) const |
|
virtual void | SetNumberOfRequiredInputs (DataObjectPointerArraySizeType) |
|
virtual const
DataObjectPointerArraySizeType & | GetNumberOfRequiredInputs () const |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
bool | RemoveRequiredInputName (const DataObjectIdentifierType &) |
|
bool | IsRequiredInputName (const DataObjectIdentifierType &) const |
|
void | SetRequiredInputNames (const NameArray &) |
|
DataObject * | GetOutput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetOutput (const DataObjectIdentifierType &key) const |
|
virtual void | SetPrimaryOutputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryOutputName (void) const |
|
DataObject * | GetOutput (DataObjectPointerArraySizeType idx) |
|
const DataObject * | GetOutput (DataObjectPointerArraySizeType idx) const |
|
DataObject * | GetPrimaryOutput () |
|
const DataObject * | GetPrimaryOutput () const |
|
| Object () |
|
bool | PrintObservers (std::ostream &os, Indent indent) const |
|
virtual void | SetTimeStamp (const TimeStamp &time) |
|
virtual | ~Object () |
|
virtual LightObject::Pointer | InternalClone () const |
|
| LightObject () |
|
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
|
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
|
virtual | ~LightObject () |
|