Specify name for output file in elastix/transformix

62 views
Skip to first unread message

Rose

unread,
Feb 27, 2023, 1:24:18 PM2/27/23
to elastix-imageregistration
Hi, 

I'm using elastix in MATLAB to register multiple sets of images. I first perform the registration on one type of image, then I apply the resulting transformation to another three types of image. The output is always called essentially the same thing, some variation on "result.mhd". It would be convenient if I could save it under a different name, so as to not get the different image types mixed up, or at least rename it afterwards (but I view the results in Slicer, which does not seem to like it when mhd files have been renamed?). 

I've seen that this feature exists in SuperElastix (https://github.com/SuperElastix/elastix/issues/672), but as I use elastix from within MATLAB I wondered if there are any plans to implement this, or whether there already is a way that I'm unaware of?

Any thoughts would be much appreciated!

Thanks,
Rose

Konstantinos Ntatsis

unread,
Mar 13, 2023, 5:48:40 AM3/13/23
to elastix-imageregistration
Hi Rose,

All elastix functionality is written in C++ and, as you correctly pointed out, can be found in the following repo: https://github.com/SuperElastix/elastix. In addition to C++, elastix can be used via the python ITK wrapper (https://github.com/InsightSoftwareConsortium/ITKElastix) or for quite a few additional languages via the SimpleITK wrapper (https://simpleitk.readthedocs.io/en/master/about.html). Since MATLAB is not part of these two official wrappers, I am assuming that you are using another wrapper developed from some member(s) of the community.

I think the best would be to ask directly the maintainers of the MATLAB wrapper that you are using if they could update to the latest Elastix version (https://github.com/SuperElastix/elastix/releases/tag/5.1.0) since the functionality is already there (ie. no need to implement something specifically for MATLAB). Let me know if that helps.

Kind regards,
Konstantinos

m.st...@lumc.nl

unread,
Mar 13, 2023, 9:16:06 AM3/13/23
to elastix-imag...@googlegroups.com

If I am not mistaken, you can use python within matlab nowadays.

Best, Marius




From: elastix-imag...@googlegroups.com <elastix-imag...@googlegroups.com> on behalf of Konstantinos Ntatsis <konstantino...@gmail.com>
Sent: 13 March 2023 10:48 AM
To: elastix-imageregistration
Subject: [elastix-imageregistration] Re: Specify name for output file in elastix/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/e97a77fa-90b5-4f3c-88ef-8add4d89bc43n%40googlegroups.com.

Tom Birdsong

unread,
Mar 14, 2023, 9:35:37 AM3/14/23
to elastix-imageregistration

Hi all,

Adding on here, we recently published an Insight Toolkit blog post detailing how to use ITK Python packages in MATLAB for image processing. The same mechanics will likely allow up-to-date versions of the ITKElastix Python wrapper to be used in MATLAB. Please see https://www.kitware.com/leverage-the-powerful-insight-toolkit-itk-in-matlab-via-python/

Best,
Tom

mfk16

unread,
Apr 3, 2023, 8:11:52 AM4/3/23
to elastix-imageregistration
Hi Rose,

What MATLAB wrapper are you using? I use a matlab wrapper and it's possible to change the output name.

Thanks,

Matt

Reply all
Reply to author
Forward
0 new messages