gift-surg / NiftyMIC

NiftyMIC is a research-focused toolkit for motion correction and volumetric image reconstruction of 2D ultra-fast MRI.
BSD 3-Clause "New" or "Revised" License
139 stars 35 forks source link

Output image for registration saved in Temporary files #21

Closed Aureleane closed 2 years ago

Aureleane commented 2 years ago

Hello,

I have started using Niftymic very recently, more precisely the registration. The output file given contains the transformation. The transformed image itself, which is the one I need, was a bit harder to find, as it is sent to the temporary files. I was wondering if it would be possible to implement a solution to choose in which file to send the registered image instead of the transformation.

Thanks !

renbem commented 2 years ago

Hi Aureleane, can you describe in a bit more detail which registration you refer to and what application/executable you are using?

renbem commented 2 years ago

If you refer to niftymic_register_image, then this is on purpose. The temporary output is a resampled version of the SRR to the reference grid (e.g. template space). However, to prevent the resampling from affecting the image quality, a subsequent SRR step with updated transformations in reference space (e.g. template space) is recommended. See here for the follow-up steps.

Aureleane commented 2 years ago

Hello Renbem,

Thank you for your answer. I am indeed using niftymic_register_image, to register an SRR outcome (from niftymic_reconstruct_volume) to a template so it can have the same anatomical space. I am not sure I understand the subsequent SRR steps with the update transformations. Is it niftymic_reconstruct_volume_from_slices that has to be appplied to the output images of the registration?

renbem commented 2 years ago

Hi, That's correct, niftymic_reconstruct_volume_from_slices needs to be applied with a pointer to transformations as described here. You could also run all steps automatically based on the information provided here.

Aureleane commented 2 years ago

Great, thanks. The first option worked.

renbem commented 2 years ago

Great. I'm glad to hear.