Issue transforming ROIs/labels with transformix

46 views
Skip to first unread message

Donnie Cameron

unread,
Sep 15, 2020, 10:30:17 AM9/15/20
to elastix-imageregistration
Hi all,

I'd really appreciate your help with this head-scratcher of a registration problem. I've been working with a thigh muscle MRI dataset, consisting of DT-MRI data, higher-res Dixon structural images, and a set of ROIs drawn on those structural images. I ultimately want to transform the ROIs from the Dixon image space to the DT-MRI image space, as follows: 

First, I register the Dixon images to the DT-MRI images using rigid, affine, and B-spline registrations in sequence - applied in a single elastix 5.0 command. This appears to work pretty well - see example below from FSL's 'slicer' tool (DT-MRI data in greyscale, transformed Dixon in red).

reg_check.png

When I apply exactly the same series of transformations to the ROIs ('transformix -in roi.nii.gz -out results -tp TransformParameters.2.txt') there appears to be a big offset in the slice direction, and perhaps in other dimensions. See fig below, where ROIs that should start in the most distal slices of the DT-MRI (top) appear only in the most proximal slices (bottom)...  With the registration result above I would have expected the ROIs to stretch comfortably across the whole DT-MRI volume.   

roi_result.PNG

This large offset also appears if I apply only the 'TransformParameters.1.txt' or 'TransformParameters.0' transformations as well - avoiding the B-spline step. I've also tried an earlier version of elastix (4.9), to no avail. And lastly, I've examined the Nifti headers in detail - I've been using Jimmy Shen's Nift Tools for data i/o in Matlab and I thought there might be a problem there. No luck.    

Any ideas what might be going wrong here, or suggestions for further troubleshooting? I'd be really grateful for any tips and tricks.

With gratitude,
Donnie Cameron
Radiology, LUMC 

M.St...@lumc.nl

unread,
Sep 18, 2020, 4:31:52 AM9/18/20
to elastix-imag...@googlegroups.com

Dear Donny,


I would indeed be suspicious of the header information in the mask/roi. Is it defined in the moving image coordinate system (not the fixed one) ?


Best, Marius


Leiden University Medical Center | Division of Image Processing (LKEB), Department of Radiology | PO Box 9600 | 2300 RC Leiden | The Netherlands | Postzone C2-s, room C3-53 | +31 (0)71 52 62137



From: elastix-imag...@googlegroups.com <elastix-imag...@googlegroups.com> on behalf of Donnie Cameron <donnieca...@gmail.com>
Sent: 15 September 2020 4:30 PM
To: elastix-imageregistration
Subject: [elastix-imageregistration] Issue transforming ROIs/labels with transformix
 
--
You received this message because you are subscribed to the Google Groups "elastix-imageregistration" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elastix-imageregis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elastix-imageregistration/10453600-d0ef-44cc-b819-6bad506c1a6dn%40googlegroups.com.

Donnie Cameron

unread,
Sep 23, 2020, 4:10:25 AM9/23/20
to elastix-imageregistration
Dear Marius,

Thanks very much for the input. The ROIs were indeed defined in the moving image coordinate system, and I confirmed this by viewing the moving image and ROIs together in both 3D Slicer and FSLview; I just couldn't get why there was an offset in the tranformed ROIs. After playing about with the Nifti headers for a while, I decided to try something drastic by loading the moving image and ROI Nifti files and then saving them again with default headers - keeping only the voxel dimensions. This seems to have solved the problem:

Capture.PNG 

Thank you for your help!

WIth gratitude,
Donnie


M.St...@lumc.nl

unread,
Sep 23, 2020, 8:07:27 AM9/23/20
to elastix-imag...@googlegroups.com

Dear Donny,

great, and thanks for letting us know!

Best, Marius




Sent: 23 September 2020 10:10 AM
To: elastix-imageregistration
Subject: Re: [elastix-imageregistration] Issue transforming ROIs/labels with transformix
 
Reply all
Reply to author
Forward
0 new messages