package_for_correction.py
- move to SCT?
#16
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I needed to package data for manual correction for the INSPIRED project. I did not want to duplicate scripts; thus, I used the
package_for_correction.py
from this CanProCo repo. To make the script compatible with INSPIRED's filenames (e.g.,sub-torontoDCM001_acq-cspineAxial_T2w.nii.gz
), I had to makeget_subject
andget_ses
functions more robust. Namely, I used regular expressions instead of the.split
method in 2f06bf4.Also, for the
INSPIRED
project, I'm currently using the_label-SC_mask.nii.gz
suffix instead of_seg.nii.gz
(as discussed here). For this reason, I added an optional argument to thepackage_for_correction.py
script in 5c5e2ac.Since the
package_for_correction.py
script is more universal and can be used for any project, maybe, we could implement that into the SCT?For the context,
package_for_correction.py
was first introduced for spine-generic.Note: I realize that this PR is not relevant to CanProCo itself, but I wanted to discuss this somewhere. After talking about it, the PR can be closed without merging.