Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::RegistrationWrapper Class Reference

The RegistrationWrapper class wraps the pyramid registration to calculate and apply a reference transformation to several images. More...

#include <mitkRegistrationWrapper.h>

Public Types

typedef itk::Image< double, 3 > ItkImageType
 
typedef itk::Image< unsigned char, 3 > ItkBinaryImageType
 
typedef double * RidgidTransformType
 

Static Public Member Functions

static void ApplyTransformationToImage (mitk::Image::Pointer img, const RidgidTransformType &transformation, double *offset, mitk::Image *resampleReference=NULL, bool binary=false)
 ApplyTransformationToImage Applies transformation from GetTransformation to provided image. More...
 
static void GetTransformation (Image::Pointer fixedImage, Image::Pointer movingImage, RidgidTransformType transformation, double *offset, bool useSameOrigin=true, mitk::Image *mask=NULL)
 GetTransformation Registeres the moving to the fixed image and returns the according transformation. More...
 

Detailed Description

The RegistrationWrapper class wraps the pyramid registration to calculate and apply a reference transformation to several images.

Use if several pictures with the same world geometry are to be registered to one reference image, the registration is only computed once (for the moving image) and the geometry can be transformed for the complete image batch accordingly. Can handle image types that are usually not supported by registrations filters, e.g. fiber bundles and segmentations: these can be registered if a "registerable" image such as B0/T2 from which they are derived is supplied, since the transformation can be calculated on those and applied to the derived objects.

For DWI images a registerable B0 Image will automatically be extracted.

Definition at line 24 of file mitkRegistrationWrapper.h.

Member Typedef Documentation

Definition at line 29 of file mitkRegistrationWrapper.h.

Definition at line 28 of file mitkRegistrationWrapper.h.

Member Function Documentation

void mitk::RegistrationWrapper::ApplyTransformationToImage ( mitk::Image::Pointer  img,
const RidgidTransformType transformation,
double *  offset,
mitk::Image resampleReference = NULL,
bool  binary = false 
)
static

ApplyTransformationToImage Applies transformation from GetTransformation to provided image.

Transforms image according to previously calculated transformation. Can be applied to derived resources also (e.g. binary images). Handles DWI Data and rotates the gradients according to the transformation. Images are resampled to provided reference, if no reference it supplied a copy of the input image is used as reference.

Parameters
img- image on which the transformation is to be applied
transformation- transformation returned from GetTransformation
offset- offset transformation returned from GetTransformation
resampleReference- image to which is to be resampled
binary- resampling will be done using nearest neighbor interpolation

Definition at line 19 of file mitkRegistrationWrapper.cpp.

References mitk::CastToItkImage(), mitk::GrabItkImageMemory(), mitk::DiffusionPropertyHelper::GRADIENTCONTAINERPROPERTYNAME, mitk::DiffusionPropertyHelper::InitializeImage(), mitk::DiffusionPropertyHelper::IsDiffusionWeightedImage(), mitk::DiffusionPropertyHelper::MEASUREMENTFRAMEPROPERTYNAME, mitk::FloatProperty::New(), mitk::New(), mitk::ImageSource::New(), and mitk::DiffusionPropertyHelper::REFERENCEBVALUEPROPERTYNAME.

Referenced by main().

void mitk::RegistrationWrapper::GetTransformation ( Image::Pointer  fixedImage,
Image::Pointer  movingImage,
RidgidTransformType  transformation,
double *  offset,
bool  useSameOrigin = true,
mitk::Image mask = NULL 
)
static

GetTransformation Registeres the moving to the fixed image and returns the according transformation.

Note
Does not return a registered image
See also
ApplyTransformationToImage for this.

Both images are set to the same origin (the one of the fixed image), this is supposed to ensure overlapping, the correction of the moving image is returned in the offset.

It is possible mask a certain area and thereby excluding it from the registration metric (e.g. a tumor that is operated on), this can be set as mitk::Image where all non-zero voxels are excluded.

Parameters
fixedImage
movingImage
transformation
offset- stores offset that has been applied to match origin of both images
useSameOrigin-
mask- optional, provide a mask that is excluded from registration metric

Definition at line 169 of file mitkRegistrationWrapper.cpp.

References mitk::CastToItkImage(), mitk::BaseData::GetProperty(), mitk::DiffusionPropertyHelper::GRADIENTCONTAINERPROPERTYNAME, mitk::DiffusionPropertyHelper::IsDiffusionWeightedImage(), itk::B0ImageExtractionImageFilter< TInputImagePixelType, TOutputImagePixelType >::New(), mitk::New(), and mitk::Image::New().

Referenced by main().


The documentation for this class was generated from the following files: