Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

outputPixelSpacing of resampled volume is hard coded at 1x1x1 #2

Open
bgeorge0 opened this issue Feb 8, 2019 · 5 comments
Open

outputPixelSpacing of resampled volume is hard coded at 1x1x1 #2

bgeorge0 opened this issue Feb 8, 2019 · 5 comments

Comments

@bgeorge0
Copy link

bgeorge0 commented Feb 8, 2019

Me again!

The harden transform bug was fixed in the latest nightly 3D Slicer build, but I've found that I can't run this module with my data as the 'outputPixelSpacing' for the resampled volume is hard coded to 1x1x1. The volumes I'm using a whole body PET/CT, so 1x1x1 mm is perhaps a bit small and it takes 10 minutes to resample the volume on my computer.

Is there a reason this spacing was chosen? Should the spacing be the same as the moving volume?

@cpinter
Copy link
Member

cpinter commented Feb 8, 2019

The reason it was hard-coded is that the original use case was an MRI-TRUS registration, and the module that SegmentRegistration uses internally poses very concrete constraints about the inputs that if not met, then the registration is unsuccessful.

If you open SegmentRegistration.py in the installed (or built) extension and change the output pixel spacing then can you achieve a good registration?
Do you have any recommendations how to proceed? I imagine we could add an input field for the spacing, but it could be confusing to users. Still, I don't see a better option right now.

@bgeorge0
Copy link
Author

bgeorge0 commented Feb 8, 2019

My initial thought would be to dynamically change the spacing so that the number of voxel in the resample volume is similar, regardless of the size of the volume. I haven't looked at the inner works of the other module, so not sure if this would work.

@cpinter
Copy link
Member

cpinter commented Feb 8, 2019

This might work. My main concern is that we have ongoing clinical projects using these modules, and changing parameter initialization may considerably change the output on those types of inputs. However I think this is worth a try.
Any contribution is welcome! If you could do a PR with this heuristics for pixel spacing, then I'm happy to review it and also test on all the clinical datasets I have.

@bgeorge0
Copy link
Author

bgeorge0 commented Feb 8, 2019

I'm happy to contribute and can look into updating the code and making a PR.

@cpinter
Copy link
Member

cpinter commented Feb 8, 2019

Awesome! Looking forward to it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants