PeerHerholz / bids_bep16_conv

A small package to implement conversions between BEP-16 (Diffusion Derivatives) compliant datasets and other/existing software outputs.
https://peerherholz.github.io/bids_bep16_conv
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

DIPY CSD conversion #4

Open arokem opened 1 year ago

arokem commented 1 year ago

Same as #2, but with CSD instead of DTI.

PeerHerholz commented 1 year ago

Added dipy_fit_CSD function via this commit. We now need to add the conversion function that adapts the output to BEP16-conform files.

PeerHerholz commented 1 year ago

Hi @arokem,

after changing the example dataset, the CSD analysis through DIPY is now working. When running it like this:

dipy_fit_csd preproc_dwi.nii.gz preproc_dwi.bval preproc_dwi.bvec desc-brain_mask.nii.gz --out_dir outdir

we get one file as a result: peaks.pam5. Is this expected/accurate or should the command be adapted?

arokem commented 1 year ago

Yes - this is not surprising, but will make the conversion a bit more tricky. That file format is an hdf5 format that stores information about the locations of peaks in the ODF and other metrics, such as spherical harmonic coefficients (hence "pam", for "peaks and metrics"). Some more information about this file is available here: https://github.com/dipy/dipy/blob/master/dipy/direction/peaks.py#L210