-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Output JSON sidecar files after processing a la BIDS #3394
Comments
We came across this point again with @tzebre and @jcohenadad when discussing if segmentations produced by the nnU-Net framework should be accompanied by JSON sidecar (see discussion here). Since this point is periodically repeated from time to time (#2807, #4023), I am increasing its priority. |
At first I thought that this might be possible to do using our But, there are two main issues with this:
In theory, we could fix both of these problems by propagating the output files/output directory back to
However, fetching a return value would require us to change how
But, maybe this would be a welcome change? Does using a subprocess incur a performance hit right now? ((Changing the Otherwise, if these changes are too broad in scope, then we could just as easily make a simple function and call it at the end of each script, too. I guess it just depends on how badly we want a within-process wrapper for executing code before and after each CLI script? 🤔 |
My first thoughts are that:
|
@mguaypaq I'm not sure I understand that argument. Are you referring to users who write SHELL scripts that consist of a sequence of SCT commands to process their data (eg: batch_processing.sh)? If so, I don't see how generating the sidecar in the launcher (vs. in individual SCT's CLI scripts) will encourage people to use scripts (because for them, it will be opaque where the sidecars are actually generated). Overall, this discussion is related to the long "-o/-ofolder" debate. I am wondering if we could think of a -obids flag, that would output things in the derivatives according to BIDS. And if it is on, it would generate the sidecar. Then, we could implement the -obids flag in the appropriate CLIs, and so we would not worry about the launcher generating sidecars for scripts like |
Sorry for being unclear, I meant writers of new |
Small update: I'm going to start experimenting with a |
In our 2024-02-21 SCT Meeting, we discussed JSON sidecars and how they should be implemented. We came to the following conclusions:
This should limit the scope of this feature and make it much more straightforward to implement, as we only need to ensure compatibility with |
In the context processing pipeline and databases, in order to keep track of the software and version used to generate derivatives, it would be useful if SCT would output a JSON sidecar (following BIDS convention). E.g.:
Would output:
And the content of the JSON could be the following (inspired by this link):
Another useful link: https://hackmd.io/@effigies/bids-derivatives-readme
The text was updated successfully, but these errors were encountered: