Limitations of internal BIDS dataset assembly in XNAT (1.8.9 / 1.9.x)

58 views
Skip to first unread message

Reda Fritet

unread,
Dec 23, 2025, 9:32:41 AM12/23/25
to xnat_discussion
Hello XNAT community,

I am working with XNAT (tested on 1.8.9 and considering 1.9.3) and I would like to clarify the current limitations regarding BIDS dataset generation inside XNAT.

Here is my current pipeline and observations:

1) I successfully use the container:
   - xnat/dcm2bids-session

This works correctly and produces:
- NIFTI files
- BIDS-style JSON sidecars
at the scan/session level (stored under scan resources in XNAT).

2) I also configured a valid bidsmap.json at the project level via the REST API, and the mapping is applied correctly
(e.g. resting-state scans mapped to task-rest_bold).

3) After this step, I have valid scan-level BIDS outputs inside XNAT
(NIFTI + JSON), which is expected and works well.

However, my goal is to generate a FULL BIDS DATASET inside XNAT, meaning:
- a proper directory hierarchy:
  sub-*/ses-*/anat|func|dwi
- stored under a session or project-level BIDS resource
- directly usable by BIDS Apps (MRIQC, fMRIPrep, etc.)

I tried using:
- xnat/xnat2bids-setup

I was able to configure and run it through Container Service, but:
- it does not assemble a complete BIDS dataset
- it either exits silently or fails without producing a structured BIDS directory
- it seems to be a setup/initialization container rather than a dataset assembler

From my experiments, it appears that:
- dcm2bids-session handles conversion and scan-level BIDS annotation
- but XNAT does not provide a native container/command to assemble a full BIDS dataset internally

My questions are therefore:

1) Is there currently (XNAT 1.8.x / 1.9.x) an officially supported way to generate a full BIDS dataset *entirely within XNAT*?
2) Is xnat2bids-setup intended to be used directly for dataset assembly, or only as a preparation step?
3) Is the recommended approach still to export data and run xnat2bids or other BIDS assembly tools externally?

I want to confirm whether this is a known and expected limitation of XNAT, or if I am missing a specific container or workflow.

Thank you very much for your guidance.
Capture d'écran 2025-12-23 111906.png

Timothy Olsen

unread,
Dec 23, 2025, 9:42:32 AM12/23/25
to xnat_di...@googlegroups.com
We've been working on a plugin that will build the FULL BIDS directory under a project resource (symlinked to the BIDS directories at the subject).  We have a prototype and should have something for you to play with in early Jan.  It works really well and is very exciting.

I'm not the biggest fan of using Project level resources for this.  If you make a project 'protected' then its project level resources are public to everyone.  The project resources were originally used for project docs.  This method is fine on Private projects, but could be problematic if projects are made protected. And that isn't always intuitive.

We'll be looking at other options.  It may be the right use case for a new extension of the 'genericData' data type that is a 'project asset'.  That way it maintains the security options of an experiment.

Tim

Timothy R Olsen 

Founder, President




--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/xnat_discussion/c4b3f783-663f-440f-9206-38d11417caf6n%40googlegroups.com.
Message has been deleted

John Flavin

unread,
Jan 5, 2026, 12:25:24 PMJan 5
to xnat_di...@googlegroups.com
This doesn't answer your question about a fully BIDS-compliant workflow and storage solution, but going back to some of your earlier questions. Particularly...

​Is xnat2bids-setup intended to be used directly for dataset assembly, or only as a preparation step? Is xnat2bids-setup intended to be used directly for dataset assembly, or only as a preparation step?

The xnat2bids-setup container and its associated Command is intended to be used as a "Setup Command". The idea is that you can take any BIDS App and quickly build an XNAT Container Service Command around it by running the inputs through the xnat2bids-setup command first; that takes the input files from the XNAT archive structure and puts them into the BIDS structure before mounting into the BIDS App container. As an example, see the bids-mriqc command json: https://github.com/NrgXnat/docker-images/blob/master/bids-mriqc/command.json#L43. You would need to run the dcm2bids-session container first to prepare the NIFTI and the sidecars, but given that the xnat2bids-setup container would do the rest of the work to prepare the files in the BIDS structure for the BIDS App. (Though only for that one container invocation; it does not store the input files back to XNAT in the BIDS structure.)

As you've pointed out, this is not full BIDS compliance. For one thing, if I wanted to run this BIDS app on a whole dataset of multiple subjects/studies, the BIDS Apps generally allow me to do this on the whole dataset in one command, whereas the Container Service version would require me to run separate containers on each session.  These can be launched in bulk, which saves some effort, but it still requires more resources and management.

John Flavin

On Dec 23, 2025 at 9:17:01 AM, Reda Fritet <frite...@gmail.com> wrote:

Thanks a lot, Tim, for the clarification.

At this stage, what is the best way to test a full DICOM → BIDS workflow?
Specifically:

  • how would you recommend converting DICOM to a complete BIDS dataset for testing purposes now?

  • should this be done entirely outside XNAT, and if so, using which approach/tool as a reference workflow?

Thanks again for your guidance.

Best regards,
Reda

Timothy Olsen

unread,
Jan 6, 2026, 4:02:55 PMJan 6
to xnat_di...@googlegroups.com
We are working on a plugin which improves XNAT's BIDS support.  It currently copies all of the BIDS files to a project resource so that you have one enormous project resource with all the files in the project's sessions (sym-linked or copied).  It's pretty awesome.  Bids apps become trivial to run.  And it will work very well for training too.

That said, I'd prefer to have it use a new 'xnat:groupAnalysis' experiment type extending xnat:genericData (which is a project experiment outside of the subject tree).  That way you'd have the additional permissions associated with it being its own experiment. 

Tim

Timothy R Olsen 

Founder, President



Reda Fritet

unread,
Jan 7, 2026, 9:18:26 AMJan 7
to xnat_discussion
Hi Tim and John,

Thank you very much for the clear explanations and guidance  , it really helped, and I’m looking forward to testing the next XNAT version.
Reply all
Reply to author
Forward
0 new messages