Plotting Registration Evaluation Results

283 views
Skip to first unread message

HodaGH

unread,
Feb 11, 2021, 10:46:02 AM2/11/21
to elastix-imageregistration
Hi Elastix professionals,

I have CT scans and MRI of 10 patients that I want to register with Elastix. So I get some text files as a result of registration, I want to plot metric values over iterations and x, y, z translations. Also I want to combine metric values for these translations and plot them. I don't know how to achieve this. can I plot them while the registration is happening or is it done after I have all of the files of registrations. 
I wonder what information can I gain if I compare registrations of different patients ?


Thank you,
Hoda

M.St...@lumc.nl

unread,
Feb 15, 2021, 10:56:02 AM2/15/21
to elastix-imag...@googlegroups.com
Dear Hoda,

You would need to set (WriteTransformParametersEachIteration "true") to get the translations for every iteration.

The metric value you can get from the elastix.log file. Note however that these are the stochastic metric values, so they contain noise. You can choose to also calculate the exact metric values at the cost of computation time, using (ShowExactMetricValue "true").

Both the transformparameters file and log file are updated after every iteration, so you could continuously poll them in your script.

HTH, Marius


From: elastix-imag...@googlegroups.com <elastix-imag...@googlegroups.com> on behalf of HodaGH <hoda.gh...@gmail.com>
Sent: 11 February 2021 4:46 PM
To: elastix-imageregistration
Subject: [elastix-imageregistration] Plotting Registration Evaluation Results
 
--
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/91ef69bb-afb9-4cab-b9c3-e0b1f107fb1en%40googlegroups.com.

HodaGH

unread,
Feb 16, 2021, 3:33:49 PM2/16/21
to elastix-imageregistration
Thanks very much for your reply. I have a confusion about my registration so I set the  (WriteTransformParametersEachIteration "true") and found that in all 500 iterations the translations only vary about 2 mm in y and z direction. I wanted to fix this by using FullSearchSpace:  Full syntax: (FullSearchSpace<r> <parameter_name> <parameter_nr> <min> <max> <stepsize> [...] )

I want to have around 40 mm of translation in the y direction and 200 mm in the z direction so wrote :
(FullSearchSpace0 "translation_y" 2 35 45 1  "translation_z" 3 200 206 1 ) but I get an exception 

itk::ERROR: itk::ERROR: AdvancedMattesMutualInformationMetric(0x7f9023817800): Too many samples map outside moving image buffer: 3968914 / 16327173

Am I using this method wrong? I'm also attaching my log file. 
elastix.log

sara sharifi

unread,
Feb 22, 2021, 1:34:51 PM2/22/21
to elastix-imag...@googlegroups.com
.Hi, I have an example file from Elastics and I want to know how to add two images instead of images of these examples to this program that have nii format
thanks

‫<‪M.St...@lumc.nl‬‏> در تاریخ دوشنبه ۱۵ فوریهٔ ۲۰۲۱ ساعت ۱۹:۲۶ نوشت:‬
matlab_elastix-master.zip
Reply all
Reply to author
Forward
0 new messages