Skip to content
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

[ENH] Add sample metadata to MRI and PET #1593

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

effigies
Copy link
Collaborator

Adds BodyPart, BodyPartDetails and BodyPartDetailsOntology to MRI and PET imaging, taken from additions in BEP 031 - Microscopy. BodyPart corresponds to a DICOM tag (0018, 0015 Body Part Examined), while the others are for additional annotation when this is insufficient detail.

The more straightforward part of #1396. This complements #1586, which proposes to use the chunk-<index> entity to identify different fields of view in MRI, which we expect will most commonly be used for spinal cord imaging.

This also lays some groundwork for BEP22 (MRS), which is waiting on a release with motion before starting their final review process.

@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (51f1d1f) 87.97% compared to head (fafad25) 87.97%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1593   +/-   ##
=======================================
  Coverage   87.97%   87.97%           
=======================================
  Files          16       16           
  Lines        1356     1356           
=======================================
  Hits         1193     1193           
  Misses        163      163           

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

@effigies
Copy link
Collaborator Author

effigies commented Sep 8, 2023

@neurolabusc I would appreciate your review on this one. I understood from #1396 that this was the easy bit, but I don't want to presume too far on a couple posts from 7 months ago.

@neurolabusc
Copy link

@effigies I only have minor comments.

  1. For BodyPart I do think that any field that corresponds to a DICOM tag should have a validation dataset that includes both the source DICOM as well as the expected BIDS. Examples of source DICOMs could include UIH data where the body part is HEAD or Siemens data where the body part is BRAIN. I assume that this field is expected to be all capitals and correspond to the values in DICOM part 16 Table L1. My sense is that providing both a source DICOM and the desired BIDS provides a Rosetta Stone, providing a concrete mapping from one structure to the other.
  2. BodyPartDetails and BodyPartDetailsOntology are loosely defined - are values completely up to user, are values expected to be all capitals. Should these generally follow the style of the DICOM BodyPart?

@VisLab
Copy link
Member

VisLab commented Oct 6, 2023

I am having trouble unwinding what exactly is being proposed in this and #1569. Would it be possible for someone to recap what is being proposed in the two PRs and what is already in BIDS?

I generally support adding BodyPart and some sort of BodyPartID with a corresponding vocabulary identification. DICOM terminology is widely used but it is flat -- seems to mostly use terms from SCT (SNOMED). Also terms overlap but are not identical to those found in otherl anatomy ontologies such as Uberon. Maybe a better word than BodyPartDetailsOntology could be found? Could a list of potential vocabularies be suggested?

A second question is that BodyPart has utility not only as a designator for where imaging is being applied but in other contexts. In HED, for example, a body part tag might be used to indicate what part of the body is engaging in an participant action during the experiment. BodyPart might also be used to indicate locations affected by a diagnosis. I don't think that BodyPart should necessarily be made equivalent to DICOM Body Part Examined.

@Remi-Gau
Copy link
Collaborator

I am having trouble unwinding what exactly is being proposed in this and #1569. Would it be possible for someone to recap what is being proposed in the two PRs and what is already in BIDS?

@VisLab

This PR takes metadata terms that already exist in BIDS introduced for microscopy data:

and makes them "official" BIDS metadata for MRI and PET so they could be listed and validated in the JSON sidecar of any MRI and PET data.

From my understanding #1569 would like to introduced a new entity for body part.

I generally support adding BodyPart and some sort of BodyPartID with a corresponding vocabulary identification. DICOM terminology is widely used but it is flat -- seems to mostly use terms from SCT (SNOMED). Also terms overlap but are not identical to those found in otherl anatomy ontologies such as Uberon.

Maybe a better word than BodyPartDetailsOntology could be found?
I think that because the term is already in BIDS

Could a list of potential vocabularies be suggested?

Currently microscopy points to the DICOM terms: https://bids-specification.readthedocs.io/en/latest/modality-specific-files/microscopy.html#sample

But I see nothing wrong with allowing some flexibility as to what ontology / vocab to use.

A second question is that BodyPart has utility not only as a designator for where imaging is being applied but in other contexts. In HED, for example, a body part tag might be used to indicate what part of the body is engaging in an participant action during the experiment. BodyPart might also be used to indicate locations affected by a diagnosis. I don't think that BodyPart should necessarily be made equivalent to DICOM Body Part Examined.

See my response above.

This PR is very MRI and PET centric so that's why DICOM comes up but I don't think that we should necessarily say that when it comes to BodyPart, BIDS should cover DICOM only.

@Remi-Gau Remi-Gau added PET MRI For things that affect all MRI datatypes labels Dec 22, 2023
@effigies
Copy link
Collaborator Author

@neurolabusc:

1. For `BodyPart` I do think that any field that corresponds to a DICOM tag should have a validation dataset that includes both the source DICOM as well as the expected BIDS. Examples of source DICOMs could include [UIH](https://github.com/neurolabusc/dcm_qa_uih) data where the body part is `HEAD` or [Siemens](https://github.com/neurolabusc/dcm_qa_xa30) data where the body part is `BRAIN`.

Sounds good. Would you like a PR against the QA or dcm2niix repositories, or just an agreement that merging this means you could move in that direction?

I assume that this field is expected to be all capitals and correspond to the values in DICOM part 16 Table L1. My sense is that providing both a source DICOM and the desired BIDS provides a Rosetta Stone, providing a concrete mapping from one structure to the other.

Yes, I think directly using the values of (0018,0015) Body Part Examined makes sense, and that appears to be all capitals, corresponding to the values of part 16 table L1, column "Body Part Examined".

2. `BodyPartDetails` and `BodyPartDetailsOntology` are loosely defined - are values completely up to user, are values expected to be all capitals. Should these generally follow the style of the DICOM `BodyPart`?

My interpretation is that this would be up to an annotator (person or tool). Given that Table L1 lists SNOMED terms, it would be reasonable for dcm2niix to select https://bioportal.bioontology.org/ontologies/SNOMEDCT as its ontology and use "Code meaning" for BodyPartDetails.

@VisLab Have your questions been adequately addressed?

@VisLab
Copy link
Member

VisLab commented Jan 16, 2024 via email

@effigies effigies merged commit f90fd70 into bids-standard:master Feb 23, 2024
26 checks passed
@effigies effigies deleted the enh/body-part-metadata branch April 4, 2024 20:44
@effigies effigies changed the title ENH: Add sample metadata to MRI and PET [ENH] Add sample metadata to MRI and PET Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MRI For things that affect all MRI datatypes PET
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants