Skip to content

Conversation

arokem
Copy link
Collaborator

@arokem arokem commented Sep 15, 2025

This transfers work that so far has been done in a separate repository: https://github.com/bids-standard/bids-bep016.

I believe this is not too far from ready to be reviewed by the community, but also seeking input from @Lestropie, @francopestilli, @oesteban, @PeerHerholz.

effigies and others added 30 commits September 18, 2019 10:13
This PR splits the tractography section from the diffusion derivatives
document, so that bids-standard#5 is easier to merge.
The new ``05-diffusion-derivatives-tractography.md`` file will remain
orphaned, but kept there as a base for the time we tackle tractography.
It shouldn't be merged into the derivatives branch until it is ready.
- More clarity of distinction between requisite and optional files in output directory.
- Try using 3 spaces rather than 4 in non-code indentation; partly to try to get tables within dot point lists to render correctly, partly to improve editor software syntax highlighting.
- Various small re-wordings.
- Slightly more use of hyperlinks.
- Short introductions to "parameter terminology" and "data representations" sections.
- Be more explicit about normalised vs. non-normalised 3-vectors, so that structure more clusely mimics that of description of spherical coordinate representation.
- Rename hyperlink names to "parameter terminology" section to better separate from later "intrinsic / extrinsic model parameters" sections.
Based on suggestion in bids-standard#5. If all model intrinsic parameters are incorporated into a single file, rather than dropping the "_parameter-<param>" field, instead enforce that parameter name "all" be used.
When introducing the file naming convention, give an example of the "_<model>" field.
Re-arranged descriptions of intrinsic and extrinsic model parameters within the file naming section, and corrected a discordance in one dot point that was using an intrinsic model parameter filename path but discussing extrinsic model parameters.
Provide information on specification of orientation data after the various models and model parameters have been explained.
…_restructure

[ENH] Restructuring of DWI derivatives
Revised based on MRtrix3/mrtrix3#1635.
Manual merge / cherry-pick of: c6539851, 8b278282, c6539851, ebbf0d3d, d7b4731d, 99e92e0a, 6bfc7849 due to unresolvable conflict in bids-standard/bids-bep016#8.
Conflicts:
	src/05-derivatives/05-diffusion-derivatives.md
- Provide basic instructions rather than elaborating on rare use cases.
- Remove JSON dictionary on preprocessing steps utilised as these relate to provenance and are therefore out of scope.
Proposal for addressing bids-standard/bids-bep016#25.
Lestropie and others added 11 commits May 16, 2024 11:09
- FSL bedpostx command fibre orientations stored as spherical coordinates are confirmed to use the "bvec" reference frame.
- Enforcing azimuth angle to obey the right hand rule about the zenith axis would necessitate direct modification of image intensities from bedpostx outputs to store. Therefore it would be preferable to instead define the sign of the azimuth angle based on the direction of the second reference axis.
Closes bids-standard#95.
Closes bids-standard#94.
Conflicts:
	src/derivatives/05-diffusion-derivatives.md
…_axes

DWI models: Define "bvec" orientation reference
@arokem
Copy link
Collaborator Author

arokem commented Sep 15, 2025

Forgot to tag @mattcieslak, whose input here also useful. And probably others, please tag and add to this discussion.

@francopestilli
Copy link
Collaborator

@effigies @dorahermes @jdtournier @frheault @mattcieslak We are trying to merge the current status of the DWI BEP 16. Would you guys take a look, please? @PeerHerholz

@arokem
Copy link
Collaborator Author

arokem commented Sep 15, 2025

Looking at the required deliverables for BEPs, I see that we might be at the stage to discuss whether we have 1 (the markdown component), and that discussion can lead to work on 2 and 3 (examples, relatively easy; schema, relatively hard, and where we might need some guidance/examples to follow).

@PeerHerholz
Copy link
Member

Hey @arokem and everyone,

thx @arokem! Yeah, I think once it's decided that the current markdown and respective information/proposals are in a good status we would create a couple of example datasets (I can update the conversion software respectively). I do agree that the examples should be relatively easy, especially considering that we would provide empty imaging files and focus on the metadata. The schema appears to be a different beast and having someone from the maintainers/developers involved would be great.

@arokem
Copy link
Collaborator Author

arokem commented Sep 16, 2025

One general question: does the validator currently look into the content of data files to validate that their content is sensible? The BEP proposes that data be organized in a particular way within the files (e.g., a particular order of tensor components), and I am wondering whether there is any way that this is currently being validated. If not, maybe that's fine. Ultimately, it is up to users of the spec to produce data that makes sense, but I still wonder whether we can help enforce that.

Copy link

codecov bot commented Sep 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.71%. Comparing base (73281ae) to head (4cd9b0f).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2211   +/-   ##
=======================================
  Coverage   82.71%   82.71%           
=======================================
  Files          20       20           
  Lines        1608     1608           
=======================================
  Hits         1330     1330           
  Misses        278      278           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@effigies
Copy link
Collaborator

One general question: does the validator currently look into the content of data files to validate that their content is sensible?

It validates tsv contents and NIfTI headers.

Validating NIfTI data blocks is likely to be significantly slower, and would probably make sense for a separate tool like miniQC.

What kind of check are you thinking?

@tsalo tsalo added the BEP label Sep 18, 2025
@arokem
Copy link
Collaborator Author

arokem commented Sep 18, 2025

One thing that comes to mind is to validate the shape of the data. For example, the tensor should have six elements on the last dimension; CSD coefficients would also have a certain dimensionality that can be checked. This can be done without reading the data. So, if there is precedent for this kind of check, that's good.

@arokem
Copy link
Collaborator Author

arokem commented Sep 18, 2025

Should I be using the macros___make_sidecar_table for the tables that are raising remark linting issues?

@effigies
Copy link
Collaborator

Yes, checking NIfTI shapes is doable:

BoldNot4d:
issue:
code: BOLD_NOT_4D
message: |
BOLD scans must be 4 dimensional.
level: error
selectors:
- suffix == "bold"
- type(nifti_header) != "null"
checks:
- nifti_header.dim[0] == 4

You'll want to use make_sidecar_table if it corresponds to a sidecar schema rule, but for describing deeper models, you'll probably want make_metadata_table, e.g.,

<!-- This block generates a metadata table.
The definitions of these fields can be found in
src/schema/objects/metadata.yaml
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
-->
{{ MACROS___make_metadata_table(
{
"LongName": "OPTIONAL",
"Description": (
"RECOMMENDED",
"The description of the column.",
),
"Format": "OPTIONAL",
"Levels": "RECOMMENDED",
"Units": "RECOMMENDED",
"Delimiter": "OPTIONAL",
"TermURL": "RECOMMENDED",
"HED": "OPTIONAL",
"Maximum": "OPTIONAL",
"Minimum": "OPTIONAL",
}
) }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants