cwmok / Conditional_LapIRN

Conditional Deformable Image Registration with Convolutional Neural Network
MIT License
79 stars 16 forks source link

Is worth adding a few lines to handle different image sizes? #14

Closed ignaciobartol closed 3 months ago

ignaciobartol commented 5 months ago

Hi,

Not really an issue but when calling Test_cLapIRN.py for inference, if the user gives an input other than the input size you used to train your model it will rise an error.

From your conference paper "We resample all MR scans with isotropic voxel sizes of $1\ mm^3$ and center-cropped all the pre-processed image scans to 144×192×160".

I added a few lines to reshape and interpolate the deformation field in the test() function. It will preserve the Laplacian of the vector field since I used harmonic interpolation. Let me know if you think is worth it and I will submit a PR.

Thanks!

cwmok commented 5 months ago

Hi @ignaciobartol,

Sounds good! Feel free to submit a PR. I will give it a try.

Thanks a lot.

ignaciobartol commented 5 months ago

Thanks! Just opened the PR, feel free to adapt it or not. I have been using it so far to downscale 512x512xM CT scans and it worked pretty well on the registration. Will test on chest CT scans after retraining with the appropriate dataset and will follow up.

ignaciobartol commented 4 months ago

Hello,

Just checking in if you had time to review the PR. Thanks.

Best, Ignacio

cwmok commented 4 months ago

It is approved. Sorry for the delay. I overlooked the notification. Thanks for your PR!

ignaciobartol commented 3 months ago

Thank you! I see the PR approved.