wiktorowski211 / deeds-registration

Python wrapper around DEEDS - efficient algorithm for 3D discrete deformable image registration, reaching the highest accuracy in several benchmarks
MIT License
9 stars 3 forks source link

Save the parameters of registration operation #2

Open zhenweishi opened 1 year ago

zhenweishi commented 1 year ago

Hi, developers

Thanks for your efforts to make it work in python. I have a practical question. If your package allows users to save the parameters used in the previous registration, then use it in the next step. Let me give an instance as follows:

I have three files (fixed image, moving image, and a region mask in moving image). I want to firstly register moving image to fixed image, then the mask to fixed image using the same parameters. Then I will have a pair of registered images, and also a correct mask. Is it possible in your package? it is the same as described in DeedsBCV:

4) Run deformable deeds We will use the affine matrix "affine_2_4_matrix.txt" to initialise the deformable registration. The output filenames are generated using the base "nonlinear_2_4".

Note that the input images are the same as before, but we can optionally pass the segmentation of the moving image with -S. We will therefore obtain two transformed scans nonlinear_2_4_deformed.nii.gz (the CT scan) and nonlinear_2_4_deformed_seg.nii.gz (the warped segmentation). The displacements are stored (for all control points) in _displacements.dat: ./deedsBCV -F img2_res.nii.gz -M img4_res.nii.gz -O nonlinear_2_4 -A affine_2_4_matrix.txt -S seg4_res.nii.gz

Looking forward to your reply.

wiktorowski211 commented 1 year ago

Good morning, that is a fairly common scenario, but as it was not needed for the experiments we were conducting it was not implemented. But we heavy appreciate any kind of contribution.

Regards