Batch Processing Multiple Subjects in MNI Space with ROI Statistics

1 view
Skip to first unread message

Ibtisam Aslam

unread,
5:52 AM (13 hours ago) 5:52 AM
to dsi-s...@googlegroups.com

Dear DSI Studio Team,

I hope you are doing well.

I am working with multiple subjects reconstructed in MNI space using QSDR, and my data are saved in the _dwi.qsdr.fz format containing diffusion metrics. I also have ROIs defined in MNI space.

I would like to perform batch processing to extract ROI-based statistics for all subjects at once, rather than processing each subject individually.

Could you please advise how I can perform this batch ROI analysis using DSI Studio? Is there a command-line or scripting approach that would allow automated extraction of diffusion metrics from predefined ROIs across multiple QSDR files?

Thank you very much for your support.


--
Kind Regards,
Ibtisam Aslam (PhD)

Frank Yeh

unread,
9:53 AM (9 hours ago) 9:53 AM
to engr.i...@gmail.com, dsi-s...@googlegroups.com

You can do this directly from the CLI using --action=ana (region functions).

Option A) Your own MNI ROIs (NIfTI mask / label image)

If you have an ROI NIfTI already in MNI space (single ROI or multiple ROIs in one NIfTI), run region statistics like this: (DSI Studio Documentation)

# Example: batch over all QSDR FIB files in the folder
# (Tip: include "mni" in the ROI filename to explicitly mark it as MNI-space)
dsi_studio --action=ana --source="*_dwi.qsdr.fz" --regions="my_rois_mni.nii.gz"

DSI Studio will produce a per-subject region-statistics report for the ROIs you provided. (If your ROI file contains multiple labeled regions, it will report each region separately.) (DSI Studio Documentation)

If you want to force a clean “one-output-per-subject” naming pattern, an easy approach is to loop:

for f in *_dwi.qsdr.fz; do
  dsi_studio --action=ana --source="$f" --regions="my_rois_mni.nii.gz"
done

Option B) Use built-in atlases (no ROI file needed)

If you prefer to use DSI Studio’s built-in atlas regions, you can specify atlas regions directly and still batch over many subjects: (DSI Studio Documentation)

dsi_studio --action=ana --source="*_dwi.qsdr.fz" \
  --regions="HCP842_tractography:Cingulum_L,HCP842_tractography:Cingulum_R"

Notes / common gotchas

  • Your QSDR files (*.qsdr.fz) are already in MNI space, so your ROI NIfTI must also be in the same MNI space. The CLI docs recommend marking MNI ROIs by including “mni” in the ROI filename. (DSI Studio Documentation)

  • If you instead want “analyze all subjects in one shot” via a single database file, DSI Studio also supports building a connectometry database in MNI space and then extracting region statistics from the database, but for automation the --action=ana --regions=... route above is the simplest. (DSI Studio Documentation)



--
You received this message because you are subscribed to the Google Groups "DSI Studio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dsi-studio+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dsi-studio/CABmxmrUzfAa_G_UBsmvfp2keeZXPU1%2B8HxqeDLpfSkfPDU9JCA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages