Skip to content

In-database BIDS file information#1443

Draft
MaximeBICMTL wants to merge 4 commits into
aces:mainfrom
MaximeBICMTL:bids-info
Draft

In-database BIDS file information#1443
MaximeBICMTL wants to merge 4 commits into
aces:mainfrom
MaximeBICMTL:bids-info

Conversation

@MaximeBICMTL

@MaximeBICMTL MaximeBICMTL commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

WIP: to be discussed at the imaging meeting.

This PR is a proof-of-concept that aims to solve the "retain information about the source of a BIDS file" problem raised during the last imaging meeting. The solution is designed to be simple but also provide a base to iterate on for future BIDS-related database features.

BIDS database design

  • Two new tables:
    • bids_dataset: A BIDS dataset in LORIS, which may be imported using the BIDS importer or generated using the LORIS DICOM to BIDS converter.
    • bids_file: A BIDS file in a LORIS BIDS dataset, no matter its type.
      • Notably stores the source path of the file (before it was renamed).
      • Both the source and LORIS paths are relative to the BIDS dataset (not the LORIS data directory).
  • Data-type-specific file tables now have a nullable foreign

BIDS importer design

  • Rename BidsImportEnv to BidsImporter.
  • BidsImporter is the central object for BIDS import, which contains:
    • Arguments passed to the BIDS importer.
    • State of the BIDS importer (successed/skipped/failed files).
    • Custom importers hooked to the LORIS BIDS importer.

Open design questions

  • Should the BIDS dataset tables be used for the assembly BIDS (IMO yes).
  • Store how each BIDS file was added to LORIS (importer/converter)?
  • Add a script to generate BIDS dataset/files table from an already-imported BIDS dataset present on the file system?
  • Many others!

@github-actions github-actions Bot added the Language: Python Issue or PR related to the Python codebase label Jun 17, 2026
@github-actions github-actions Bot added the Package: BIDS importer PR or issue related to the BIDS importer label Jun 17, 2026
@MaximeBICMTL MaximeBICMTL force-pushed the bids-info branch 2 times, most recently from b1400ce to 40953c6 Compare June 22, 2026 13:30
@MaximeBICMTL MaximeBICMTL added this to the 30.0.0 milestone Jun 22, 2026
@MaximeBICMTL MaximeBICMTL force-pushed the bids-info branch 3 times, most recently from abe7fbd to 7ebbfbe Compare June 23, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language: Python Issue or PR related to the Python codebase Package: BIDS importer PR or issue related to the BIDS importer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant