Skip to content

Commit 1b2a5e2

Browse files
committed
Starting to add metadata tables for tractography derivatives.
1 parent cb2fcde commit 1b2a5e2

2 files changed

Lines changed: 59 additions & 2 deletions

File tree

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[codespell]
22
skip = *.js,*.svg,*.eps,.git,node_modules,env,venv,.mypy_cache,package-lock.json,CITATION.cff,tools/new_contributors.tsv,./tools/schemacode/docs/build,venvs
33
ignore-regex = \bHEP\b
4-
ignore-words-list = acknowledgements,als,bu,fo,te,weill,winn
4+
ignore-words-list = acknowledgements,als,bu,fo,te,weill,winn,fixel,fixels
55
builtin = clear,rare,en-GB_to_en-US
66
# this overloads default dictionaries and I have not yet figured out
77
# how to have multiple https://github.com/codespell-project/codespell/issues/2727

src/derivatives/diffusion-derivatives.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ the [TRX file format](https://tee-ar-ex.github.io):
1515
```
1616

1717
Where `tract` is the anatomical/structural entity that is being imaged, and
18-
`track` uses as its value one of the items in a controlled vocabulary.
18+
`track` is fully specified in the sidecar as described below.
19+
20+
For the most common case, a tractogram will be generated from some DWI data, so
21+
<modality> will typically be “dwi”. In any case, the <modality> allows to
22+
unequivocally identify the data type from which the tractogram originated.
1923

2024
For example:
2125

@@ -26,3 +30,56 @@ For example:
2630
sub-01_space-MNI152NLin2009cAsym_tract-ArcuateFasciculus_hemi-L_track-eudx_tractogram.trx
2731
sub-01_space-MNI152NLin2009cAsym_tract-ArcuateFasciculus_hemi-L_track-eudx_tractogram.json
2832
```
33+
34+
The JSON sidecar accompanying the tractogram can contain the following metadata
35+
fields:
36+
37+
{{ MACROS___make_metadata_table(
38+
{
39+
"Name": ("OPTIONAL", "String", "A human-readable name corresponding to the primary tractography algorithm and/or software used to generate the streamlines data."),
40+
"Description": ("OPTIONAL", "String", "A longer description of the nature of the tractography experiment"),
41+
"URL": ("OPTIONAL", "String", "A web link to a more exhaustive description of the process by which the tractography data were generated. This could be a reference to a journal article, software, software command, documentation, or pipeline description."),
42+
"StreamlineSeeding": ("REQUIRED", "Dict", "The contents of this dictionary are described in Table 5a."),
43+
"StreamlinePropagation": ("REQUIRED", "Dict", "The contents of this dictionary are described in Table 6a."),
44+
"StreamlineTermination": ("REQUIRED", "Dict", "The contents of this dictionary are described in Table 7a."),
45+
"StreamlineAcceptanceCriteria": ("REQUIRED", "Dict", "The contents of this dictionary are described in Table 8a."),
46+
"StreamlineReconstructionDensity": ("REQUIRED", "Dict", "The contents of this dictionary are described in Table 9a."),
47+
}
48+
) }}
49+
50+
Table 5a (contents of the value for key “StreamlineSeeding”)
51+
52+
{{ MACROS___make_metadata_table(
53+
{
54+
"Sources": ("REQUIRED", "List", "A list where each item describes a mechanism by which streamline seed points were derived. The contents of the elements of this list are described in Table 5b"),
55+
"AcceptanceCriteria": ("OPTIONAL", "List", "he contents of this list are described in Table 5c"),
56+
}
57+
) }}
58+
59+
Table 5b (contents of elements within list `StreamlineSeeding[“Sources”]`):
60+
61+
{{ MACROS___make_metadata_table(
62+
{
63+
"Type": ("REQUIRED", "String", "Selection from the following: ['Random', 'Sphere', 'RandomPerElement', 'GridPerElement', 'CountPerElement', 'RejectionSampling', 'Dynamic']. 'Element' can refer to voxels, fixels, or surface vertex elements based on the filepath referenced by key 'Source'. 'CountPerElement' is interpreted as being, for example, seeding some number of streamlines from precisely the center of each image element, as opposed to other mechanisms that, for each image element, spread the seeds out within the volume ascribed to that image element."),
64+
"Source": ("REQUIRED unless Type is 'Sphere' in which case MUST NOT be specified.", "String", " Filesystem path or BIDS URI corresponding to the data source used to draw streamline seeds."),
65+
"SeedsPerElement": ("Either REQUIRED or MUST NOT be specified based on the value of 'Type'", "Int", "For seeding mechanisms that involve a fixed number of streamline seeds for every image element in the seeding source ('RandomPerElement', 'GridPerElement', 'CountPerElement'), this value dictates the number of seeds to be drawn for each such element. For 'GridPerElement', this number must be a perfect cube."),
66+
"AttemptsPerSeed": ("OPTIONAL", "Int", " If specified, it must be a positive integer. For a stochastic tracking algorithm, this is the number of attempts of initiation that are allowed in each seed."),
67+
"Unidirectional": ("OPTIONAL", "Binary", "Specifies whether streamline propagation occurred in one direction from the seed point only, or in two antipodally symmetric directions."),
68+
"InitialDirection": ("OPTIONAL", "Dict", "If absent, assume that the initial streamline tangent from the seed point was determined using the same mechanism as that used for orientation sampling during streamline propagation, but unconstrained by a prior incoming tangent. See Table 5c for possible values."),
69+
}
70+
) }}
71+
72+
Table 5c (contents of elements of dict `StreamlineSeeding[AcceptanceCriteria]`):
73+
74+
{{ MACROS___make_metadata_table(
75+
{
76+
"Metric": ("REQUIRED", "String", "Text description of the anisotropy metric mediating whether a streamline was permitted to propagate from the seed point."),
77+
"Source": ("REQUIRED", "String", "Filesystem path or BIDS URI of image data from which the corresponding anisotropy metric can be extracted/computed."),
78+
"Threshold": ("REQUIRED", "Float", "Numerical threshold applied to anisotropy metric."),
79+
}
80+
) }}
81+
82+
83+
# Tracking methods
84+
85+
{{ MACROS___make_subobject_table("metadata.Track") }}

0 commit comments

Comments
 (0)