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

[FIX] Data formats clarification #1720

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

nbeliy
Copy link

@nbeliy nbeliy commented Mar 5, 2024

Changes:

In common principles/image format, removed reference to Nifti, and removed Nifti specific content. Rephrased the rest.

In MRI, added Data format section with Nifti requirements.

To do:

  • To add your name, please edit our Contributors wiki and add your name with the type of contribution.

@nbeliy
Copy link
Author

nbeliy commented Mar 5, 2024

@bids-maintenance

Added explicit mentioning of:

  • incompatibility of ANALYZE 7.5 files with BIDS
  • Concatenation of multi-volume acquisitions (e.g. for 4D fmri)

I'm not sure that this is actual requirements from BIDS, can you confirm or dis-confirm?

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.93%. Comparing base (05f64ed) to head (7f15ae8).
Report is 70 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1720   +/-   ##
=======================================
  Coverage   87.93%   87.93%           
=======================================
  Files          16       16           
  Lines        1351     1351           
=======================================
  Hits         1188     1188           
  Misses        163      163           

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

@@ -409,20 +409,22 @@ datasets and non-compliant derivatives.

### Imaging files
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if this heading should not be renamed now that this section has become more generic.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used Imaging files as generic file, including for example EEG. I can't find a good name, data file will also incompass the tabular files. But I'm open for suggestions.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I was more making a note also for other reviewers

src/common-principles.md Outdated Show resolved Hide resolved
src/common-principles.md Outdated Show resolved Hide resolved
of Nibabel package.

Due to the important size of MRI imaging data, we RECOMMEND using compressed NIfTI files
by [gzip](https://www.gzip.org/) algorithm (.nii.gz).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
by [gzip](https://www.gzip.org/) algorithm (.nii.gz).
by [gzip](https://www.gzip.org/) algorithm.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I wanted to stress that compressed files should conserve their original extension and have .gz additional extension (in case if gzip can support several ones). But if it obvious, I agree with changes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

Pinging @effigies and @sappelhoff to get second opinions.

Can briefly talk about this at the maintainers meeting tomorrow.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷 I think it's fine to mention .nii.gz in brackets here.

Copy link
Collaborator

@Remi-Gau Remi-Gau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have the energy, implementing our soft rules would be nice:

  • mostly starting every new sentence on a new line

@Remi-Gau Remi-Gau marked this pull request as ready for review March 6, 2024 17:57
@Remi-Gau Remi-Gau marked this pull request as draft March 6, 2024 17:57
@Remi-Gau Remi-Gau changed the title [Fix] Data formats clarification (#1713) [FIX] Data formats clarification Mar 7, 2024
@nbeliy
Copy link
Author

nbeliy commented Mar 8, 2024

@Remi-Gau , did you got news from maintainers meeting? Should I go with PET format too?

@nbeliy
Copy link
Author

nbeliy commented Mar 11, 2024

Added section for PET. Essentially a copy-paste of MRI, with a minimum-recommended version of dcm2niix, and additional sub-sections to better fit into structure of page.

I'll put specific remarks into a review of code.


All PET imaging data MUST be stored using the
[NIfTI-1 or NIFTI-2](https://nifti.nimh.nih.gov/) file format (`.nii`).
The ANALYZE-7.5 file format (`.hdr`/`.img`), despite being very similar to NIFTI-1,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's still needed. Is .hdr/.img popular in PET?

Copy link
Collaborator

@Remi-Gau Remi-Gau Mar 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea but I am starting to think we should NOT mention things that are NOT allowed, because it could get very long.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mnoergaard might know :-)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For MRI is needed -- just saying NIFTI includes the .hdr/.img. And I know at least one attempt to bidsify such format.

.all-contributorsrc Outdated Show resolved Hide resolved
In addition to the imaging data (`*.nii`) a `_pet.json` sidecar file MUST be provided.
The included metadata are divided into sections described below.
-->
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented this paragraph, as it appears in incorrect section (JSON must be present no matter if it's pure PET of PET-MRI dataset). Also, the same information appears directly below.

Comment on lines +419 to +421
We RECOMMEND that the imaging file will be accompanied with a additional meta
information extracted from source image and/or external sources in a sidecar
JSON file.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For certain file the sidecar is REQUIRED so I would actually remove this sentence.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would agree if JSON sidecars was properly introduced in common principles. It is mentioned in several places, but without a proper definition. This paragraph tried to provide such definition.

src/common-principles.md Outdated Show resolved Hide resolved
Dynamic (multi-volume) PET imaging data SHOULD be stored in 4D,
in chronological order (the order they were acquired in).

Due to the important size of PET imaging data, we RECOMMEND using compressed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do not actually officialy recommend (meaning that the validator would throw a warning if people use .nii and not .nii.gz)

Maybe "we suggest" or "we enourage".

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommendation was carried from common principles:

We RECOMMEND using compressed NIfTI files

volumes of functional MRI) MUST be concatenated into single image (3D or 4D,
respectively).

Due to the important size of MRI imaging data, we RECOMMEND using compressed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment about PET and recommending zipped data.

@Remi-Gau Remi-Gau marked this pull request as ready for review April 18, 2024 16:31
@nbeliy
Copy link
Author

nbeliy commented May 14, 2024

Hi @Remi-Gau , just to know is there any developments on this merge request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants