elastix
elastix copied to clipboard
Groupwise MI metric - "PCA-based groupwise image registration for quantitative MRI"
I have read the article “PCA-based groupwise image registration for quantitative MRI“. For my project, I am using the groupwise registration approach. For a comparison, I would like to use the groupwise mutual information metric that has been used in the above mentioned article (https://doi.org/10.1016/j.media.2015.12.004). However, it is not implemented in the current elastix version, nor am I able to build it with Cmake. Could anyone tell me where to find it or could somebody provide me the corresponding exe file?
@stefanklein is this implemented in the develop branch?
I am doing my final evaluations ATM, it would be great if I can use this metric aswell!
Hi, thanks for your interest in this method. It's in the Master actually. It's called PCAMetric. Isn't it available in the release binaries? Cheers, Stefan
I was trying to use "LinearGroupwiseMI" as a metric. This is a different one than the "PCAmetric", isn't it?
So when I try to run it, I get the following error:
Error: LinearGroupwiseMI(index 4) - This component is not installed!
yes LinearGroupwiseMI is a different metric, which was probably developed by @MathiasPolfliet . Is that right Mathias? @felixvh , so does the PCAMetric work for you? best, stefan
Yea, the PCAmetric works perfectly fine! For this one I also do have the results.
I tried running
elastix -f input.nii -m input.nii -p config.txt -out output
with config.txt obtained from https://raw.githubusercontent.com/SuperElastix/ElastixModelZoo/master/models/Par0039/par_groupwise/par_real_data/par_groupwise_DTI-BRAIN.txt
I tried a few different versions (including 4.8 and 5.0.1) of both the Linux and MacOS binaries, but I always get this error:
Running elastix with parameter file 0: "config.txt".
Current time: Wed Apr 7 12:05:06 2021.
Reading the elastix parameters from file ...
Installing all components.
InstallingComponents was successful.
ERROR:
FixedImageType: 4D float
MovingImageType: 4D float
elastix was not compiled with this combination of ImageTypes!
You have two options to solve this:
1. Add the combination to the CMake parameters ELASTIX_IMAGE_nD_PIXELTYPES and ELASTIX_IMAGE_DIMENSIONS, re-cmake and re-compile.
2. Change the parameters FixedInternalImagePixelType and/or MovingInternalImagePixelType in the elastix parameter file.
ERROR:
Something went wrong in the ComponentDatabase
Errors occurred!
Does this mean I have to build elastix from source in order to be able to use the PCA-based groupwise image registration?
Hi Ben, If you change these lines (FixedInternalImagePixelType "float") (MovingInternalImagePixelType "float") To (FixedInternalImagePixelType "short") (MovingInternalImagePixelType "short") It should work without recompilation. Just make sure that the intensity range of your input images is well represented by a signed 16bit integer. (so don't use floating point images scaled between 0 and 1 for example). The altnerative is to recompile with the correct settings indeed. Best, Stefan
From: Ben Jeurissen @.> Sent: Wednesday, April 7, 2021 2:59 PM To: SuperElastix/elastix @.> Cc: S. Klein @.>; Mention @.> Subject: Re: [SuperElastix/elastix] Groupwise MI metric - "PCA-based groupwise image registration for quantitative MRI" (#242)
I tried running
elastix -f input.nii -m input.nii -p config.txt -out output
with config.txt obtained from https://raw.githubusercontent.com/SuperElastix/ElastixModelZoo/master/models/Par0039/par_groupwise/par_real_data/par_groupwise_DTI-BRAIN.txthttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fraw.githubusercontent.com%2FSuperElastix%2FElastixModelZoo%2Fmaster%2Fmodels%2FPar0039%2Fpar_groupwise%2Fpar_real_data%2Fpar_groupwise_DTI-BRAIN.txt&data=04%7C01%7Cs.klein%40erasmusmc.nl%7Cb7c911a88a9843172d1908d8f9c4f62b%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C637533971632574987%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=A2W%2BaeZtBJ9iZ5KanUJx2tpjefDRtJrJtRQruWzvUww%3D&reserved=0
I tried a few different versions (including 4.8 and 5.0.1) of both the Linux and MacOS binaries, but I always get this error:
Running elastix with parameter file 0: "config.txt".
Current time: Wed Apr 7 12:05:06 2021.
Reading the elastix parameters from file ...
Installing all components.
InstallingComponents was successful.
ERROR:
FixedImageType: 4D float
MovingImageType: 4D float
elastix was not compiled with this combination of ImageTypes!
You have two options to solve this:
-
Add the combination to the CMake parameters ELASTIX_IMAGE_nD_PIXELTYPES and ELASTIX_IMAGE_DIMENSIONS, re-cmake and re-compile.
-
Change the parameters FixedInternalImagePixelType and/or MovingInternalImagePixelType in the elastix parameter file.
ERROR:
Something went wrong in the ComponentDatabase
Errors occurred!
Does this mean I have to build elastix from source in order to be able to use the PCA-based groupwise image registration?
You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSuperElastix%2Felastix%2Fissues%2F242%23issuecomment-814892829&data=04%7C01%7Cs.klein%40erasmusmc.nl%7Cb7c911a88a9843172d1908d8f9c4f62b%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C637533971632584940%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3s7kAguEgQyfC2szXRw6BBrq7wPqlQnNU%2FBohGKWuP4%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAF2LNIE6452ZXN5W5GQMRDTHRJKPANCNFSM4MO7BPFQ&data=04%7C01%7Cs.klein%40erasmusmc.nl%7Cb7c911a88a9843172d1908d8f9c4f62b%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C0%7C637533971632584940%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=tmX5TymFeEl%2FnW0ky%2F9r3UKt6K%2FV9YjPjqyrR4mhcLs%3D&reserved=0.
Thanks for reporting. I assume that this issue is addressed by the reply of @stefanklein at https://github.com/SuperElastix/elastix/issues/242#issuecomment-816665028 so I'll close it. Please reopen if you think otherwise.