[ITK] Question about applying registration transformation to another data set

Samuel Gerber samuel.gerber at kitware.com
Fri Jun 9 13:21:18 EDT 2017


Hi Ivan,

It would need a few modifications:

First, save the transform parameters from your registration. I.e.
GetParameters form your transform object (these might be the matrix numbers
you are mentioning).

For applying the transform to a new image:
1. Read the transfrom parameters you saved
2. Instantiate a new transfrom object of the same type as the registration
3. Set the transfrom parameters with SetParmeters
4. Create a resampler and set the transform.
5. Apply the resampler to your new image

The resampler example provides the basic structure:
https://itk.org/Wiki/ITK/Examples/ImageProcessing/ResampleImageFilter
You would need to change the code to use your specific transformation and
set your saved transform parameters.

Alternatively you could modify ImageRegistration8.cxx to read additional
images and apply the same resampler used for your image B to them.

Another option is to use Slicer3D https://www.slicer.org/.


On Fri, Jun 9, 2017 at 1:08 PM, Ivan Hidrovo <ivan.hidrovo at gmail.com> wrote:

> Hello all,
>
> We are registering 2 data sets A and B using ImageRegistration8.cxx. We
> get an output dataset C registered to A and also some matrix numbers which
> we believe to be the rigid registration parameters.
>
>  We need to apply the same registration transformation to another data set
> (of a different modality) -- is there a way to use this code or another
> code to apply a given transformation to an image.
>
> Or do we need to make small changes to the code to do this.
>
> thanks,
> Ivan
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>
>


-- 
Samuel Gerber
R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20170609/e0d8d629/attachment.html>


More information about the Community mailing list