-
Notifications
You must be signed in to change notification settings - Fork 0
Fix nested GeneratedBy key in JSON sidecar
#109
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
Fix nested GeneratedBy key in JSON sidecar
#109
Conversation
|
Don't miss this #108 (comment) or maybe this is already what you suggested |
|
I tested it and I only get this output: Is the aim of the PR #105 to automatically fetch the metadata without supplying the flag |
|
Thanks for testing the PR, @NathanMolinier! It's weird; the script is supposed to automatically read (no need for the {
"SpatialReference": "orig",
"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"
}
]
} |
|
I removed the folders and redo the commands and it worked, maybe I did something wrong previously: {
"SpatialReference": "orig",
"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-1671e1ff4a54f0228743feb621f68bc84a80024e",
"CodeURL": "https://github.com/spinalcordtoolbox/spinalcordtoolbox/blob/1671e1ff4a54f0228743feb621f68bc84a80024e/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": "Nathan",
"Date": "2025-01-08 09:03:47"
}
]
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a lot of modification, seems to work great. Thank @valosekj for the PR !
|
Thank you for your review, @NathanMolinier! |

Description
This PR removes redundant nested
GeneratedBykey in the output JSON sidecar.main:{ "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" } ] }This branch:
{ "SpatialReference": "orig", "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" } ] }How to test this PR
Resolves: #108