Include JSON metadata created by SCT #105
Merged
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.
Description
As SCT v6.4+ produces JSON sidecars for some outputs that track the provenance of the function, models, etc. (details: spinalcordtoolbox/spinalcordtoolbox#4466), we want to include this information in the final JSON sidecar produced by
manual_correction.py. This PR implements this feature.How to test this PR
{ "SpatialReference": "orig", "GeneratedBy": [ { "GeneratedBy": [ { "Name": "spinalcordtoolbox: sct_deepseg -task seg_sc_contrast_agnostic -i sub-05_T2w.nii.gz -qc qc -qc-subject sub-05", "Version": "git-master-64f55fdf022659db5d5c779f01c605d91ca7d052", "CodeURL": "https://github.com/spinalcordtoolbox/spinalcordtoolbox/blob/64f55fdf022659db5d5c779f01c605d91ca7d052/spinalcordtoolbox/scripts/sct_deepseg.py", "ModelURL": "https://github.com/sct-pipeline/contrast-agnostic-softseg-spinalcord/releases/download/v2.5/model_contrast-agnostic_20240930-1002.zip" } ] }, { "Name": "Manual", "Author": "Jan Valosek", "Date": "2024-12-10 18:05:31" } ] }As you can see above, the output JSON sidecar under derivatives now includes information about the SCT model and the manual rater who made manual corrections.
Resolves: #103
Relevant to: #102