|
using | InputToOutputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::OutputImageDimension, Self::InputImageDimension > |
|
using | OutputToInputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::InputImageDimension, Self::OutputImageDimension > |
|
| ImageToImageFilter () |
|
| ~ImageToImageFilter () override=default |
|
virtual void | CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion) |
|
virtual void | CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion) |
|
void | PushBackInput (const DataObject *input) override |
|
void | PushFrontInput (const DataObject *input) override |
|
| ImageSource () |
|
| ~ImageSource () override=default |
|
void | GenerateData () override |
|
void | ClassicMultiThread (ThreadFunctionType callbackFunction) |
|
virtual void | ThreadedGenerateData (const OutputImageRegionType ®ion, ThreadIdType threadId) |
|
virtual void | AllocateOutputs () |
|
virtual const ImageRegionSplitterBase * | GetImageRegionSplitter () const |
|
virtual unsigned int | SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion) |
|
virtual bool | GetDynamicMultiThreading () const |
|
virtual void | SetDynamicMultiThreading (bool _arg) |
|
virtual void | DynamicMultiThreadingOn () |
|
virtual void | DynamicMultiThreadingOff () |
|
| ProcessObject () |
|
| ~ProcessObject () override |
|
DataObject * | GetInput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetInput (const DataObjectIdentifierType &key) const |
|
DataObject * | GetInput (DataObjectPointerArraySizeType idx) |
|
const DataObject * | GetInput (DataObjectPointerArraySizeType idx) const |
|
virtual void | SetInput (const DataObjectIdentifierType &key, DataObject *input) |
|
virtual void | SetNthInput (DataObjectPointerArraySizeType idx, DataObject *input) |
|
virtual void | AddInput (DataObject *input) |
|
virtual void | RemoveInput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveInput (DataObjectPointerArraySizeType) |
|
DataObject * | GetPrimaryInput () |
|
const DataObject * | GetPrimaryInput () const |
|
virtual void | SetPrimaryInputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryInputName () const |
|
virtual void | SetPrimaryInput (DataObject *object) |
|
void | SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num) |
|
virtual void | SetNumberOfRequiredInputs (DataObjectPointerArraySizeType) |
|
virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredInputs () const |
|
bool | RemoveRequiredInputName (const DataObjectIdentifierType &) |
|
bool | IsRequiredInputName (const DataObjectIdentifierType &) const |
|
void | SetRequiredInputNames (const NameArray &) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
DataObject * | GetOutput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetOutput (const DataObjectIdentifierType &key) const |
|
virtual void | SetPrimaryOutputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryOutputName () const |
|
DataObject * | GetOutput (DataObjectPointerArraySizeType i) |
|
const DataObject * | GetOutput (DataObjectPointerArraySizeType i) const |
|
virtual void | SetOutput (const DataObjectIdentifierType &name, DataObject *output) |
|
virtual void | RemoveOutput (const DataObjectIdentifierType &key) |
|
DataObject * | GetPrimaryOutput () |
|
const DataObject * | GetPrimaryOutput () const |
|
virtual void | SetPrimaryOutput (DataObject *object) |
|
virtual void | SetNthOutput (DataObjectPointerArraySizeType idx, DataObject *output) |
|
virtual void | AddOutput (DataObject *output) |
|
virtual void | RemoveOutput (DataObjectPointerArraySizeType idx) |
|
virtual void | SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg) |
|
virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredOutputs () const |
|
void | SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num) |
|
DataObjectIdentifierType | MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const |
|
DataObjectIdentifierType | MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const |
|
DataObjectPointerArraySizeType | MakeIndexFromInputName (const DataObjectIdentifierType &name) const |
|
DataObjectPointerArraySizeType | MakeIndexFromOutputName (const DataObjectIdentifierType &name) const |
|
bool | IsIndexedInputName (const DataObjectIdentifierType &) const |
|
bool | IsIndexedOutputName (const DataObjectIdentifierType &) const |
|
virtual void | GenerateOutputRequestedRegion (DataObject *output) |
|
virtual void | PropagateResetPipeline () |
|
virtual void | ReleaseInputs () |
|
virtual void | CacheInputReleaseDataFlags () |
|
virtual void | RestoreInputReleaseDataFlags () |
|
virtual bool | GetThreaderUpdateProgress () const |
|
virtual void | ThreaderUpdateProgressOn () |
|
virtual void | ThreaderUpdateProgressOff () |
|
virtual void | SetThreaderUpdateProgress (bool arg) |
|
| Object () |
|
| ~Object () override |
|
bool | PrintObservers (std::ostream &os, Indent indent) const |
|
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
|
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 () |
|
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
|
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
|
static constexpr float | progressFixedToFloat (uint32_t fixed) |
|
static uint32_t | progressFloatToFixed (float f) |
|
bool | m_DynamicMultiThreading |
|
bool | m_Updating |
|
TimeStamp | m_OutputInformationMTime |
|
std::atomic< int > | m_ReferenceCount |
|
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 DynamicThreadedGenerateData() method for its implementation.
- Warning
- For multithreading, the TransformPoint method of the user-designated coordinate transform must be threadsafe.
- ITK Sphinx Examples:
-
- Examples
- Examples/Filtering/DigitallyReconstructedRadiograph1.cxx, Examples/Filtering/FFTDirectInverse.cxx, Examples/Filtering/ResampleImageFilter.cxx, Examples/Filtering/ResampleImageFilter2.cxx, Examples/Filtering/ResampleImageFilter3.cxx, Examples/Filtering/ResampleImageFilter4.cxx, Examples/Filtering/ResampleImageFilter5.cxx, Examples/Filtering/ResampleImageFilter6.cxx, Examples/Filtering/ResampleImageFilter7.cxx, Examples/Filtering/ResampleImageFilter8.cxx, Examples/Filtering/ResampleImageFilter9.cxx, Examples/Filtering/ResampleOrientedImageFilter.cxx, Examples/Filtering/ResampleVolumesToBeIsotropic.cxx, Examples/Filtering/SubsampleVolume.cxx, Examples/RegistrationITKv4/BSplineWarping1.cxx, Examples/RegistrationITKv4/BSplineWarping2.cxx, Examples/RegistrationITKv4/DeformableRegistration10.cxx, Examples/RegistrationITKv4/DeformableRegistration12.cxx, Examples/RegistrationITKv4/DeformableRegistration13.cxx, Examples/RegistrationITKv4/DeformableRegistration14.cxx, Examples/RegistrationITKv4/DeformableRegistration15.cxx, Examples/RegistrationITKv4/DeformableRegistration16.cxx, Examples/RegistrationITKv4/DeformableRegistration17.cxx, Examples/RegistrationITKv4/DeformableRegistration2.cxx, Examples/RegistrationITKv4/DeformableRegistration3.cxx, Examples/RegistrationITKv4/DeformableRegistration4.cxx, Examples/RegistrationITKv4/DeformableRegistration5.cxx, Examples/RegistrationITKv4/DeformableRegistration6.cxx, Examples/RegistrationITKv4/DeformableRegistration7.cxx, Examples/RegistrationITKv4/DeformableRegistration8.cxx, Examples/RegistrationITKv4/DeformableRegistration9.cxx, Examples/RegistrationITKv4/ImageRegistration1.cxx, Examples/RegistrationITKv4/ImageRegistration10.cxx, Examples/RegistrationITKv4/ImageRegistration11.cxx, Examples/RegistrationITKv4/ImageRegistration12.cxx, Examples/RegistrationITKv4/ImageRegistration13.cxx, Examples/RegistrationITKv4/ImageRegistration14.cxx, Examples/RegistrationITKv4/ImageRegistration15.cxx, Examples/RegistrationITKv4/ImageRegistration16.cxx, Examples/RegistrationITKv4/ImageRegistration17.cxx, Examples/RegistrationITKv4/ImageRegistration18.cxx, Examples/RegistrationITKv4/ImageRegistration19.cxx, Examples/RegistrationITKv4/ImageRegistration2.cxx, Examples/RegistrationITKv4/ImageRegistration20.cxx, Examples/RegistrationITKv4/ImageRegistration3.cxx, Examples/RegistrationITKv4/ImageRegistration4.cxx, Examples/RegistrationITKv4/ImageRegistration5.cxx, Examples/RegistrationITKv4/ImageRegistration6.cxx, Examples/RegistrationITKv4/ImageRegistration7.cxx, Examples/RegistrationITKv4/ImageRegistration8.cxx, Examples/RegistrationITKv4/ImageRegistration9.cxx, Examples/RegistrationITKv4/ImageRegistrationHistogramPlotter.cxx, Examples/RegistrationITKv4/LandmarkWarping2.cxx, Examples/RegistrationITKv4/MultiResImageRegistration1.cxx, Examples/RegistrationITKv4/MultiResImageRegistration2.cxx, Examples/RegistrationITKv4/MultiResImageRegistration3.cxx, Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx, Examples/RegistrationITKv4/MultiStageImageRegistration2.cxx, Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx, SphinxExamples/src/Core/ImageFunction/ResampleSegmentedImage/Code.cxx, SphinxExamples/src/Core/Transform/ApplyAffineTransformFromHomogeneousMatrixAndResample/Code.cxx, SphinxExamples/src/Core/Transform/GlobalRegistrationTwoImagesAffine/Code.cxx, SphinxExamples/src/Core/Transform/GlobalRegistrationTwoImagesBSpline/Code.cxx, SphinxExamples/src/Core/Transform/MutualInformationAffine/Code.cxx, SphinxExamples/src/Core/Transform/ScaleAnImage/Code.cxx, SphinxExamples/src/Core/Transform/TranslateAVectorImage/Code.cxx, SphinxExamples/src/Core/Transform/TranslateImage/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/ResampleAnImage/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/ResampleAScalarImage/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/ResampleAVectorImage/Code.cxx, SphinxExamples/src/Filtering/ImageGrid/UpsampleAnImage/Code.cxx, SphinxExamples/src/IO/GDCM/ResampleDICOMSeries/Code.cxx, SphinxExamples/src/Registration/Common/GlobalRegistrationOfTwoImages/Code.cxx, SphinxExamples/src/Registration/Common/MutualInformation/Code.cxx, SphinxExamples/src/Registration/Common/Perform2DTranslationRegistrationWithMeanSquares/Code.cxx, SphinxExamples/src/Registration/Common/PerformMultiModalityRegistrationWithMutualInformation/Code.cxx, SphinxExamples/src/Registration/Common/RegisterImageToAnotherUsingLandmarks/Code.cxx, SphinxExamples/src/Registration/Common/WatchRegistration/Code.cxx, and SphinxExamples/src/Registration/Metricsv4/PerformRegistrationOnVectorImages/Code.cxx.
Definition at line 90 of file itkResampleImageFilter.h.
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
template<typename TComponent >
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
template<typename TPixel >
static PixelType itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTransformPrecisionType >::CastPixelWithBoundsChecking |
( |
const TPixel |
value | ) |
|
|
staticprivate |
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
virtual::itk::LightObject::Pointer itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTransformPrecisionType >::CreateAnother |
( |
| ) |
const |
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTransformPrecisionType >::GenerateOutputInformation |
( |
| ) |
|
|
overrideprotectedvirtual |
ResampleImageFilter produces an image which is a different size than its input. As such, it needs to provide an implementation for GenerateOutputInformation() in order to inform the pipeline execution model. The original documentation of this method is below.
- See also
- ProcessObject::GenerateOutputInformaton()
Reimplemented from itk::ProcessObject.
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTransformPrecisionType >::PrintSelf |
( |
std::ostream & |
os, |
|
|
Indent |
indent |
|
) |
| const |
|
overrideprotectedvirtual |
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
Set a reference image to use to define the output information. By default, output information is specified through the SetOutputSpacing, SetOutputOrigin, and SetOutputDirection or SetOutputParametersFromImage methods. Alternatively, this method can be used to specify an image from which to copy the pixel information. UseReferenceImageOn must be set to utilize the reference image.
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
Get/Set the coordinate transformation. Set the coordinate transform to use for resampling. Note that this must be in physical coordinates and it is the output-to-input transform, NOT the input-to-output transform that you might naively expect. By default the filter uses an Identity transform. You must provide a different transform here, before attempting to run the filter, if you do not want to use the default Identity transform.
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTransformPrecisionType >::VerifyPreconditions |
( |
| ) |
|
|
overridevirtual |
Verifies that the process object has been configured correctly, that all required inputs are set, and needed parameters are set appropriately. If not valid an exceptions will be thrown.
This method is called before UpdateOutputInformation is propagated to the inputs.
The ProcessObject's implementation verifies that the NumberOfRequiredInputs are set and not null.
Reimplemented from itk::ProcessObject.
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
template<typename TInputImage , typename TOutputImage , typename TInterpolatorPrecisionType = double, typename TTransformPrecisionType = TInterpolatorPrecisionType>
bool itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTransformPrecisionType >::m_UseReferenceImage { false } |
|
private |