python-cpbd icon indicating copy to clipboard operation
python-cpbd copied to clipboard

Compute CPBDscore on diffusion MRI 4D data

Open rosella1234 opened this issue 2 years ago • 0 comments

I would like to know how to compute CPBD score on diffusion MRI 4-D data, since the default function works on 2D images.

Moreover, I wanted to make sure I am applying the commands correctly. Diffusion MRI data are 4-D grayscale images in nifti (.nii.gz) format.

Here is the code I use -for now on a single slice of a diffusion MRI volume in order to have a 2-D image:

            # select single slice and volume from 4-D diffusion MRI data to have 2-D one
             orig = data[:, :, sli, vol]
            matplotlib.image.imsave('blur1_rev.png', orig)
             input_image1 = cv2.imread('blur1_rev.png')
             input_image1 = cv2.cvtColor(input_image1, cv2.COLOR_BGR2GRAY)
             cpbd.compute(input_image1)

thank you in advance , Rosella

rosella1234 avatar Feb 15 '23 14:02 rosella1234