machadoL
(Leonardo Ferreira Machado)
December 9, 2019, 2:46pm
1
Hey Guys!
I’d like to hear form you if it is possible to apply itk similarity metrics (derived from itkImagetoImageMetric.h
) directly for two images.
The thing is: I’d like to used different similarity metrics to measure the similarity degree between tow images registered with different techniques.
I tried something like creating a metric, setting moving image and fixed image, and triggering Update()
, but did not work.
Any clue?
Thanks
dzenanz
(Dženan Zukić)
December 9, 2019, 2:54pm
2
How about calling GetValue()
?
machadoL
(Leonardo Ferreira Machado)
December 9, 2019, 3:14pm
3
I tried… But did not work…
In fact, ImageToImageMetrics
do no have Update()
methods.
I then called GetValue()
directly.
It outputs the following error:
terminate called after throwing an instance of 'itk::ExceptionObject'
what(): /home/leonardo/General-Sources/ITK-
5.0.0/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx:415:
itk::ERROR: MachadoMutualInformationImageToImageMetricv4(0x3155770): m_VirtualImage is
undefined. Cannot return region.
The program has unexpectedly finished.
dzenanz
(Dženan Zukić)
December 9, 2019, 4:14pm
4
You might need to set some transform(s), even if it is identity.
dzenanz
(Dženan Zukić)
December 9, 2019, 4:19pm
5
Also these topics might be interesting:
I am using image registration for some time now but I am still trying to understand things in more deep. It seems tracing ITK code is not that easy.
What is the math behind the metric derivative and where can I find the implementation part i.e the update function of the transform parameters? it would be nice if someone provide explanation or some simple-to-read references.
Assuming a 2D rigid transformation with only 3 parameters translation in x and y, and a rotation angle; assuming also a me…
Hello,
I am a newbie to ITK registration. Currently, I am implementing intra-subject registration of 3D PET (moving image) into 3D MRI (fixed image) using ITK. I want to check the registration accuracy which is the error in distance between transformed PET and fixed MRI images. How can I do that in ITK C++? Are there any available examples? Thanks in advance.
Thanks for the reply Dženan,
When I take a single image and translate/rotate a copy, then run registration, the mean square reported goes from a high at the start of 650,000 to a fitted value of 300,000. You can see this in the images below, showing the metric as well as the fitted image overlaid the “original”.
So these images are identical - except for translation/rotation. So I would expect that a mean squares metric would be essentially zero. (assuming its a mean squared difference that…
1 Like
machadoL
(Leonardo Ferreira Machado)
December 9, 2019, 5:11pm
7
Great!!!
I guess that is exactly what I was looking for.
Thanks guys!
1 Like
machadoL
(Leonardo Ferreira Machado)
December 9, 2019, 5:40pm
8
It worked… Uhul!
In the RegistrationV4
examples, usually, they do not set interpolator
. Does the default interpolator
is the linear one?
dzenanz
(Dženan Zukić)
December 9, 2019, 7:23pm
9
Linear interpolator is the default one, if there is a default.
2 Likes