Closed JohannesWiesner closed 1 year ago
Hi @JohannesWiesner are these from qsiprep? If so you should take a look at the DSI Studio reconstruction workflows, which will create src files. It's of course also possible to use DSI Studio directly on these outputs but be careful on how the bvecs are interpreted. The version of DSI Studio in qsiprep is a bit behind the current DSI Studio and interprets bvecs differently. The bvec file is in LPS+ world coordinates, not LAS+ voxel coordinates (the FSL convention)
There is a file named log.txt generated. Could you post its content? Frank
On Wed, Nov 16, 2022 at 8:39 AM Matt Cieslak @.***> wrote:
Hi @JohannesWiesner https://github.com/JohannesWiesner are these from qsiprep? If so you should take a look at the DSI Studio reconstruction workflows, which will create src files. It's of course also possible to use DSI Studio directly on these outputs but be careful on how the bvecs are interpreted. The version of DSI Studio in qsiprep is a bit behind the current DSI Studio and interprets bvecs differently. The bvec file is in LPS+ world coordinates, not LAS+ voxel coordinates (the FSL convention)
— Reply to this email directly, view it on GitHub https://github.com/frankyeh/DSI-Studio/issues/74#issuecomment-1317039767, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACDI4KED3KAAQJYTM4EHI3WITPZNANCNFSM6AAAAAASB6PRRI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi @JohannesWiesner are these from qsiprep? If so you should take a look at the DSI Studio reconstruction workflows, which will create src files. It's of course also possible to use DSI Studio directly on these outputs but be careful on how the bvecs are interpreted. The version of DSI Studio in qsiprep is a bit behind the current DSI Studio and interprets bvecs differently. The bvec file is in LPS+ world coordinates, not LAS+ voxel coordinates (the FSL convention)
Nope, I am using the DSI-Studio docker image. The output is from a colleague that used qsiprep, where reconstruction and fiber-tracking are still missing.
The log.txt file generated may inform whether the SRC files are generated or if there is any other issue. If still doesn't work, you may upload a sample dataset and I can help checking. Frank
Ah, didn't know that it generates a log.txt! Here is the content:
directory:/data
Process sub-INDI132M2
Process sub-INDI292BG
Process sub-INDI132M2/ses-01
DWI dim=(195,232,197)
Parsing phase encoding directions
Cannot parse phase encoding direction for /data/sub-INDI132M2/ses-01/dwi/sub-INDI132M2_ses-01_acq-multishell_dir-pa_space-T1w_desc-brain_mask.nii.gz
/data/sub-INDI132M2/ses-01/dwi/sub-INDI132M2_ses-01_acq-multishell_dir-pa_space-T1w_desc-brain_mask.nii.gz
/data/sub-INDI132M2/ses-01/dwi/sub-INDI132M2_ses-01_acq-multishell_dir-pa_space-T1w_desc-eddy_cnr.nii.gz
/data/sub-INDI132M2/ses-01/dwi/sub-INDI132M2_ses-01_acq-multishell_dir-pa_space-T1w_desc-preproc_dwi.nii.gz
/data/sub-INDI132M2/ses-01/dwi/sub-INDI132M2_ses-01_acq-multishell_dir-pa_space-T1w_dwiref.nii.gz
No reversed phase encoding direction dataset found. Create one SRC file -> ERROR: not a 4D nifti file
Process sub-INDI292BG/ses-01
DWI dim=(195,232,197)
Parsing phase encoding directions
Cannot parse phase encoding direction for /data/sub-INDI292BG/ses-01/dwi/sub-INDI292BG_ses-01_acq-multishell_dir-pa_space-T1w_desc-brain_mask.nii.gz
/data/sub-INDI292BG/ses-01/dwi/sub-INDI292BG_ses-01_acq-multishell_dir-pa_space-T1w_desc-brain_mask.nii.gz
/data/sub-INDI292BG/ses-01/dwi/sub-INDI292BG_ses-01_acq-multishell_dir-pa_space-T1w_desc-eddy_cnr.nii.gz
/data/sub-INDI292BG/ses-01/dwi/sub-INDI292BG_ses-01_acq-multishell_dir-pa_space-T1w_desc-preproc_dwi.nii.gz
/data/sub-INDI292BG/ses-01/dwi/sub-INDI292BG_ses-01_acq-multishell_dir-pa_space-T1w_dwiref.nii.gz
No reversed phase encoding direction dataset found. Create one SRC file -> ERROR: not a 4D nifti file
Process sub-INDI292BG/ses-02
DWI dim=(195,232,197)
Parsing phase encoding directions
Cannot parse phase encoding direction for /data/sub-INDI292BG/ses-02/dwi/sub-INDI292BG_ses-02_acq-multishell_dir-pa_space-T1w_desc-brain_mask.nii.gz
/data/sub-INDI292BG/ses-02/dwi/sub-INDI292BG_ses-02_acq-multishell_dir-pa_space-T1w_desc-brain_mask.nii.gz
/data/sub-INDI292BG/ses-02/dwi/sub-INDI292BG_ses-02_acq-multishell_dir-pa_space-T1w_desc-eddy_cnr.nii.gz
/data/sub-INDI292BG/ses-02/dwi/sub-INDI292BG_ses-02_acq-multishell_dir-pa_space-T1w_desc-preproc_dwi.nii.gz
/data/sub-INDI292BG/ses-02/dwi/sub-INDI292BG_ses-02_acq-multishell_dir-pa_space-T1w_dwiref.nii.gz
No reversed phase encoding direction dataset found. Create one SRC file -> ERROR: not a 4D nifti file
Apparently, it thinks that the brain mask is an image that it should preprocess. I was already thinking that this might cause problems because DSI-Studio has to automatically detect the "correct files". But I thought that this is somehow cleverly handled by finding a .bval
and a .bvec
file with the same filename (which means that only *_dwi.niig.z
is eligible because it is the only file that has the same name as the .bval
and .bvec
files
Parse all 4d NIFTI files in a folder (each of them has a bval and bvec file that shares a similar file name) and generate corresponding SRC files to a new folder
Apart from that it also thinks that the dataset contains multiple files with reversed phase-encoding which is not the case. Instead it's only one run per session.
Thanks for the information. I am revising the code and will commit an update soon. Frank
On Wed, Nov 16, 2022 at 10:24 AM JohannesWiesner @.***> wrote:
Ah, didn't know that it generates a log.txt! Here is the content:
directory:/data Process sub-INDI132M2 Process sub-INDI292BG Process sub-INDI132M2/ses-01 DWI dim=(195,232,197) Parsing phase encoding directions Cannot parse phase encoding direction for /data/sub-INDI132M2/ses-01/dwi/sub-INDI132M2_ses-01_acq-multishell_dir-pa_space-T1w_desc-brain_mask.nii.gz /data/sub-INDI132M2/ses-01/dwi/sub-INDI132M2_ses-01_acq-multishell_dir-pa_space-T1w_desc-brain_mask.nii.gz /data/sub-INDI132M2/ses-01/dwi/sub-INDI132M2_ses-01_acq-multishell_dir-pa_space-T1w_desc-eddy_cnr.nii.gz /data/sub-INDI132M2/ses-01/dwi/sub-INDI132M2_ses-01_acq-multishell_dir-pa_space-T1w_desc-preproc_dwi.nii.gz /data/sub-INDI132M2/ses-01/dwi/sub-INDI132M2_ses-01_acq-multishell_dir-pa_space-T1w_dwiref.nii.gz No reversed phase encoding direction dataset found. Create one SRC file -> ERROR: not a 4D nifti file Process sub-INDI292BG/ses-01 DWI dim=(195,232,197) Parsing phase encoding directions Cannot parse phase encoding direction for /data/sub-INDI292BG/ses-01/dwi/sub-INDI292BG_ses-01_acq-multishell_dir-pa_space-T1w_desc-brain_mask.nii.gz /data/sub-INDI292BG/ses-01/dwi/sub-INDI292BG_ses-01_acq-multishell_dir-pa_space-T1w_desc-brain_mask.nii.gz /data/sub-INDI292BG/ses-01/dwi/sub-INDI292BG_ses-01_acq-multishell_dir-pa_space-T1w_desc-eddy_cnr.nii.gz /data/sub-INDI292BG/ses-01/dwi/sub-INDI292BG_ses-01_acq-multishell_dir-pa_space-T1w_desc-preproc_dwi.nii.gz /data/sub-INDI292BG/ses-01/dwi/sub-INDI292BG_ses-01_acq-multishell_dir-pa_space-T1w_dwiref.nii.gz No reversed phase encoding direction dataset found. Create one SRC file -> ERROR: not a 4D nifti file Process sub-INDI292BG/ses-02 DWI dim=(195,232,197) Parsing phase encoding directions Cannot parse phase encoding direction for /data/sub-INDI292BG/ses-02/dwi/sub-INDI292BG_ses-02_acq-multishell_dir-pa_space-T1w_desc-brain_mask.nii.gz /data/sub-INDI292BG/ses-02/dwi/sub-INDI292BG_ses-02_acq-multishell_dir-pa_space-T1w_desc-brain_mask.nii.gz /data/sub-INDI292BG/ses-02/dwi/sub-INDI292BG_ses-02_acq-multishell_dir-pa_space-T1w_desc-eddy_cnr.nii.gz /data/sub-INDI292BG/ses-02/dwi/sub-INDI292BG_ses-02_acq-multishell_dir-pa_space-T1w_desc-preproc_dwi.nii.gz /data/sub-INDI292BG/ses-02/dwi/sub-INDI292BG_ses-02_acq-multishell_dir-pa_space-T1w_dwiref.nii.gz No reversed phase encoding direction dataset found. Create one SRC file -> ERROR: not a 4D nifti file
Apparently, it thinks that the brain mask is an image that it should preprocess. I was already thinking that this might cause problems because DSI-Studio has to automatically detect the "correct files". But I thought that this is somehow cleverly handled by finding a .bval and a .bvec file with the same filename (which means that only *_dwi.niig.z is eligible because it is the only file that has the same name as the .bval and .bvec files
See Parse all 4d NIFTI files in a folder (each of them has a bval and bvec file that shares a similar file name) and generate corresponding SRC files to a new folder https://dsi-studio.labsolver.org/doc/cli_t1.html
Parse all 4d NIFTI files in a folder (each of them has a bval and bvec file that shares a similar file name) and generate corresponding SRC files to a new folder
Apart from that it also thinks that the dataset contains multiple files with reversed phase-encoding which is not the case. Instead it's only one run per session.
— Reply to this email directly, view it on GitHub https://github.com/frankyeh/DSI-Studio/issues/74#issuecomment-1317194151, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACDI4PBZGQOT3NZTFQDSYTWIT4B7ANCNFSM6AAAAAASB6PRRI . You are receiving this because you commented.Message ID: @.***>
A new release is under build: https://github.com/frankyeh/DSI-Studio/actions/runs/3481332497 Once completed, please download DSI Studio again and see if it works. The updated version will not generate log.txt (will just output to the command line messages)
Will do! :)
I have a BIDS-like dataset (aka. I cannot guarantee that the BIDS-validator will approve it as a BIDS dataset, but it roughly follows the BIDS structure) with several subjects and several session folders for these subjects. I want to get
.src
files using each of the*-preproc_dwi.nii.gz
files (and the respective*-preproc_dwi.bval
and*-preproc_dwi.bvec
files. I also would like to make use of the recursive function of DSI-Studio, i.e. find all files for each subject and for each session process them and output them to the output folder. I wanted to use the following command to do that:dsi_studio --action=src --source=/data --output=/output
It seems that it successfully recursively searches through all the folders but then stops:
This is my folder structure: