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

[ENH] Automatic reference/stacks ordering #34

Merged
merged 60 commits into from
Nov 24, 2020
Merged

Conversation

pdedumast
Copy link
Member

No description provided.

@pdedumast pdedumast self-assigned this Nov 10, 2020
@pdedumast pdedumast added the enhancement New feature or request label Nov 10, 2020
@sebastientourbier
Copy link
Member

sebastientourbier commented Nov 11, 2020

@pdedumast After thinking more about the way to reorder scans I think the best way would be to create a new interface which will be inserted right after the DataGrabber. It will takes as input an ordered list of stacks stack_order, a list of input_images (and inputs_masks if manual brain masks are used) and will generate the appropriate list of output_images and output_masks. These outputs could then be connected to the rest of the workflow.

@pdedumast
Copy link
Member Author

@sebastientourbier after performing multiple tests (as you can partially see), I understaood that the different interfaces indeed mess up the order of the stacks between inputs and outputs. I will add a quick sorting of the inputs of each module, as it is done here.

Apart from that, we mentioned that all retrieved stacks by the DataGrabber are preprocessed even though they are not used in the reconstruction. They are even involved in the histogram normalization which does influence the reconstruction...
I can easily "clean" this to preprocess only useful stacks. However, I'm afraid this will mess up all the tests... Any idea to fix this easily?

Copy link
Member

@sebastientourbier sebastientourbier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pdedumast Had time to review your PR and check CircleCI. Very nice work 👏
I just let a few comments for typos that should be corrected and then, I guess you are all good to merge 👍

.gitignore Outdated Show resolved Hide resolved
pymialsrtk/interfaces/postprocess.py Outdated Show resolved Hide resolved
pymialsrtk/interfaces/utils.py Outdated Show resolved Hide resolved
pymialsrtk/interfaces/utils.py Outdated Show resolved Hide resolved
@sebastientourbier sebastientourbier changed the title Automatic reference/stacks ordering [ENH] Automatic reference/stacks ordering Nov 19, 2020
@sebastientourbier
Copy link
Member

sebastientourbier commented Nov 24, 2020

@pdedumast I just merged PR #47 that integrates the script wrapping call to the Docker command with updated doc.

I also managed to solve:

  1. Issue Issue with code coverage #45 for code coverage (seems it was due to running nipype with the MultiProc plugin) and
  2. Issue Bad memory allocation issue #48 for bad memory allocation error, i.e the message corrupted size vs. prev_size: 0x000055d4457176f0 *** at the end of the BIDS App execution, by using tcmalloc instead of malloc.

Note
By fixing code coverage, I also disabled Nipype to generate provenance PROVN reports; it was causing issues with non-existing user/group id inside the container. But by doing that, it reduced the number of output files and so, I am sorry to tell you but you will need to update the test-XX_outputs.txt again. 😬

@pdedumast
Copy link
Member Author

@sebastientourbier seems like our milestone for pymialsrtk v2.0.0 is ready! ;)

Copy link
Member

@sebastientourbier sebastientourbier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems all good to me!
Very nice work @pdedumast !
I like the refactoring and the way you output the json file for Super-Resolution. Indeed they might a space in BIDS to add this specification when it gonna get refined by practice.
You can merge 🥳

@sebastientourbier
Copy link
Member

Then, I would take of making the release 👍

@pdedumast pdedumast merged commit 730db38 into master Nov 24, 2020
@pdedumast pdedumast deleted the 28_reference_stack branch November 24, 2020 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implements module that estimates an optimal and ordered list of stacks to be used for reconstruction
2 participants