[ENH] replacing CoordinateSystem replacement with space + examples#12
[ENH] replacing CoordinateSystem replacement with space + examples#12chrisgorgo merged 19 commits intoenh/derivativesfrom
CoordinateSystem replacement with space + examples#12Conversation
|
@chrisfilo - this makes me think we should either have also, if |
|
All great points! I will update the PR replacing |
space and examples
space and examplesCoordinateSystem replacement with space + examples
|
@dorahermes I'm replying here because its a better space to have this discussion: In the current state of the PR
This new |
…into enh/space_examples
|
an individual space may come from any data collection (could be diffusion b0, T1w epi, MPM scans, etc.,.). we are already using |
|
It was already using |
|
I don't have a strong opinion. |
effigies
left a comment
There was a problem hiding this comment.
Is it possible still to define your own space by using a custom string and defining ReferenceMap?
FWIW I lean more toward native than anat, if we're going to give one or the other the blessing of the spec, but I think either should be doable, and it's the responsibility of the app writer to define what the space is.
| | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | Description | RECOMMENDED. Free-form natural language description of the nature of the file. | | ||
| | Sources | OPTIONAL. A list of paths relative to dataset root pointing to the file(s) that were directly used in the creation of this derivative. For example in a chain of A->B->C, “C” should only list “B” as Sources, and “B” should only list “A” as Sources. However in case X and Y jointly contribute to Z, then “Z” should list “X” and “Y” as Sources. | | ||
| | RawSources | OPTIONAL. A list of paths relative to dataset root pointing to the BIDS-Raw file(s) that were used in the creation of this derivative. | | |
There was a problem hiding this comment.
I think there's an extra | at the end here?
| | Description | RECOMMENDED. Free-form natural language description of the nature of the file. | | ||
| | Sources | OPTIONAL. A list of paths relative to dataset root pointing to the file(s) that were directly used in the creation of this derivative. For example in a chain of A->B->C, “C” should only list “B” as Sources, and “B” should only list “A” as Sources. However in case X and Y jointly contribute to Z, then “Z” should list “X” and “Y” as Sources. | | ||
| | RawSources | OPTIONAL. A list of paths relative to dataset root pointing to the BIDS-Raw file(s) that were used in the creation of this derivative. | | | ||
| | ReferenceMap | REQUIRED when a custom template or file is used. A path to a file that was used as, or can be used as, a reference image for determining the coordinate space of this file. The path should start with a `/` and should be relative to the root of the dataset. | |
There was a problem hiding this comment.
Is it possible for this to be a list, e.g., in the case of CIFTIs?
There was a problem hiding this comment.
i would think so, and we should clarify.
There was a problem hiding this comment.
I was thinking about it and shouldn't a ReferenceMap for a CIFTI file be another single CIFTI file?
There was a problem hiding this comment.
what I call T1wfsLR is the that I think you asked about in another thread, is the hardest.
example: (for now)
sub-{subject}/anat/sub-{subject}_hemi-L_space-T1wfsLR32k_pial.surf.gii
{
ReferenceMap : ['./sub-{subject}_desc-preproc_T1w.nii.gz', 'fsLR32k']
}
is this making any sense.
P.S. I tried to list some cifti/hcp derivatives and what there space would be in this sheet https://docs.google.com/spreadsheets/d/1uJKQWoqGFD0FJE8Tm9hQVFj2-xOgo5zN1dO-ALwkT0M/edit?usp=sharing
There was a problem hiding this comment.
Also, more to the point. I don't think it makes sense to have one cifti file reference. There's 4 template files in template flow (L and R sphere + the MNI template + the subcortical parcellation template that end up being used..) I can't picture a nice what to combined those into 1 file...
There was a problem hiding this comment.
templateflow is young and still evolving so I am not sure it is the best reference.
I know that you can definitely pack the two surfaces and subcortical part of the template in a CIFTI file. I am not an expert, but I thought that in connectome workbench one could easily load such CIFTI file and use it as a background to visualize another CIFTI file in the same space. Is that correct?
Would be great to get a clarification on the T1wfsLR. Thanks in advance.
There was a problem hiding this comment.
CIFTI files hold surface mapped data (scalar and timeseries) but the geometry (surf.gii) files have always needed to be loaded as two (or more) separate files in order to work with the data. also a volume template (i.e. T1w.nii.gz) was always loaded together as a background as well.
..actually, workbench gets around this by listing all surfaces and volumes that are in the same space within a ".spec" file (that workbench reads to load all files at once). We could recommend that the .json instead points to a ".spec" file for cifti?
There was a problem hiding this comment.
urg..yeah I see. These use hybrid spaces cases probably need their own table in the spec..
There was a problem hiding this comment.
Thanks for clarifying.
The most useful case for this (correct me if I am wrong) I can see is the native hybrid space (combination of native volume and fsnative surface). I think a list is better than adding a new data type (.space). This will only work if we require that when space is set to native for a CIFTI file ReferenceMap needs to be a 4 element list that includes surfaces for two hemispheres, volumetric template, and a subcortical parcellations (all valid BIDS derivatives files). Alternatively, we can prescribe a dictionary in such a situation. WDYT?
|
these two were removed from the document. they should be added to the appendix. |
|
Are you suggesting the literal string "Custom", or using it as a stand-in for a custom string? I'm not a fan of the literal string "Custom", as it tells someone looking at the data nothing that any otherwise-unspecified string would tell you. |
|
the literal string naming the system would not give it any more specificity other than filename disambiguation. so i would be fine with |
|
The literal string What;s the option when more than two custom spaces exist within one dataset? Also I'm not realizing that |
Co-Authored-By: chrisfilo <krzysztof.gorgolewski@gmail.com>
Co-Authored-By: chrisfilo <krzysztof.gorgolewski@gmail.com>
|
@satra I am not very fond of hybrids of free and controlled vocabularies (when @edickie in my head Nonetheless, your comment highlights some missing hybrid spaces. Perhaps we should add Additional questions:
|
…ication into enh/space_examples
|
@chrisfilo - fine with me to restrict it to a controlled vocabulary but we should add the literal "custom" and unknown back in. |
|
|
|
Ok Thanks for clarifying @edickie. Followup question: what is the 3D coordinate alignment of the |
|
To clarify, what would the |
|
@edickie - one thought process would be to remove but |
|
Putting aside how we would capture information about functional volume to surface - that's the p-word again. I was more trying to figure out what the space metadata for a One other thing to consider is that (as far as i can tell) ciftify and fmriprep are both using |
|
I guess my ask is if we can leave |
|
@edickie - i would not limit the regarding your question about pointing to itself, that's a good question. this would not only be true of also the functional to surface was not completely about provenance but about the space itself. since we are defining space as (coordinate system + object), where object is some image in 3d or a mesh or streamlines, or sth else. when projecting volume to surface, often the projection is done not to a specific surface (which would be simple), but to a space in between surfaces (computed differently by different projectors). in such a situation, this intermediate surface would have to be generated alongside a derivative. currently this is not happening in fmriprep and we are simply calling it fsnative (this should perhaps change). |
For meshes ( For derivatives such as cortical thickness in @satra I was struggling to see an example of a commonly used derivative that would require more than one value in
I agree with @edickie that we should probably leave the provenance of surface mapping to another PR. |
|
To help thinking about the latest updates, here's a new conversion table for ciftify outputs: CIFTI files:
Nifti files:
|
how about the cifti output of fmriprep - since the user can choose any of the fsaverage/native as well as the mni template? |
fmriprep does not produce such outputs and as far as I know, there were no user requests to change that. Right now fmriprep creates cifti files with a rare combination of fsaverage and MNI spaces not compatible with HCP pipelines outputs. Switching to HCP compatible outputs has been under consideration (see nipreps/fmriprep#1537). |
https://github.com/poldracklab/fmriprep/blob/master/fmriprep/cli/run.py#L610 it will produce output in whatever |
|
The code might be a bit confusing - this is just a hack for the workflows to work if someone is requesting cifties, without also requesting More clarification: https://github.com/poldracklab/fmriprep/blob/7f119454adc6b20a4cfc3b14c89349c716ed7660/docs/outputs.rst In short fsnative/T1w combination is not supported - @oesteban can correct me if I am wrong. |
|
Next - and hopefully final order of business for this PR. @oesteban proposed to rename |
|
'Reference' has a very different meaning in electrophysiology. |
|
`Reference` is also easily confused with citation, which is present
elsewhere in bids metadata.
…On Mon., Mar. 25, 2019, 4:07 a.m. dorahermes, ***@***.***> wrote:
'Reference' has a very different meaning in electrophysiology.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMl59twoACKhDwyymdZ0PI19XS8OvSGTks5vaIOmgaJpZM4b380z>
.
|
|
What about `AlignedTo` or `XFMReference`
On Mon., Mar. 25, 2019, 8:07 a.m. Erin W. E. Dickie, <
erin.w.dickie@gmail.com> wrote:
… `Reference` is also easily confused with citation, which is present
elsewhere in bids metadata.
On Mon., Mar. 25, 2019, 4:07 a.m. dorahermes, ***@***.***>
wrote:
> 'Reference' has a very different meaning in electrophysiology.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#12 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AMl59twoACKhDwyymdZ0PI19XS8OvSGTks5vaIOmgaJpZM4b380z>
> .
>
|
|
|
Please note that this defined within the scope of the metadata of a transform, I hardly see a conflict. |
|
`Reference` as we are using it now. Is in the metadata of all transformed
derivatives, so it could conflict with source localization maps for EEG?
…On Mon, Mar 25, 2019 at 8:56 AM Oscar Esteban ***@***.***> wrote:
'Reference' has a very different meaning in electrophysiology.
Please note that this defined within the scope of the metadata of a
transform, I hardly see a conflict.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMl59jLUh1jTr4bJ4dqUbYpa6eiXedKVks5vaMd0gaJpZM4b380z>
.
|
|
Indeed - good point @dorahwrmes. I like AlignedTo. We could also go with IntendedFor which makes it more consistent with iEEG, but might be less intuitive. |
|
|
|
Thinking this through, Sorry but I have to reiterate |
|
On the other hand, @satra reminds me that this is not metadata of the transforms, this is metadata of one derived image. I thought we had |
|
I don't think that |
|
I've put |
CoordinateSystemdue to redundancy withspacekeywordanatvolumetric Coordinate System.ReferenceMapis mandatoryI know this does not cover all possible cases, but it should be useful for 80% of the cases and it's a start.