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

Use Cases should avoid resampling until the last possible time #660

Closed
cchriste opened this issue Aug 19, 2020 · 4 comments · Fixed by #1708
Closed

Use Cases should avoid resampling until the last possible time #660

cchriste opened this issue Aug 19, 2020 · 4 comments · Fixed by #1708

Comments

@cchriste
Copy link
Contributor

cchriste commented Aug 19, 2020

This will reduce accumulation of errors inherent in that operation.

This was discussed in detail during ShapeWorks meeting on 8/18, and more details can be found in slide 6 https://docs.google.com/presentation/d/1c5WnpLbfU8FtbDhGu3CWMFchSrsaGQyu7DFA26qKEfA/edit#slide=id.g8a7032bcf8_0_176

Though bounding boxes were the narrow topic of discussion, this more general issue is to simply avoid any resampling until absolutely necessary, likely not until Image::resample is explicitly called (also see issue #659) or until optimization work is completed (in theory optimization doesn't require images with the same dims).

@cchriste
Copy link
Contributor Author

Many of the operations that resample can be found by searching Commands.cpp for resample and Image.cpp for applyTransform.

After this issue is resolved, the user will have to explicitly call resample before writing an image if that's their intended result, since all the commands that now do this by default (e.g., Image::translate), Image::rotate, etc) will now no longer do so, but instead they will probably set a separate transform member of the class which will be applied by applyTransform.

@sheryjoe sheryjoe added this to the 6.0 Release milestone Oct 12, 2020
@sheryjoe sheryjoe modified the milestones: 6.0 Release, 6.0 Leftover Dec 13, 2020
@sheryjoe sheryjoe modified the milestones: 6.0 Leftover, 6.1 Release (May 2021) Feb 15, 2021
@sheryjoe
Copy link
Contributor

Use cases should be updated to enable passing pre-alignment transformation to the optimizer. We can put together an example use case to demonstrate/visualize intermediate steps. We could also add an optional arugment to the use case to export groomed files in case needed for subsequent steps. For example, DeepSSM use case would need prealigned images and shapes.

@jadie1 @riddhishb we could consider adding a spatial transformer to DeepSSM to handle misalignments in the shape cohort. thoughts?

Related to #865
@akenmorris please add other issues related to this one.

@akenmorris
Copy link
Contributor

This is going to require some fairly significant rewriting of the grooming pipelines of the python use cases. Let's push this to 6.3 since no one is actively working on it.

@archanasri
Copy link
Contributor

This issue will be closed when use cases are refactored. No change in the back-end is needed.

@cchriste cchriste changed the title avoid resampling until the last possible time, thus reducing errors inherent in that operation Use Cases should avoid resampling until the last possible time Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment