marksgraham / DW-POSSUM

Simulate realistic diffusion-weighted MR data
MIT License
19 stars 7 forks source link

Error running step 3 - postprocess #4 (2) #9

Closed 15thai closed 1 year ago

15thai commented 2 years ago

Dear Marks Graham,

I have to reopen this issue since I am trying to understand how to run the FSL-POSSUM. As reference issue #4 I have the same problem. Even if I change my environment variable FSLDIR to /fsl5.0 I still can not work through step 3. Here is my output of step 2: ./runPossum.py Test 3

subjectdir is /qmi_home/anht/Desktop/workspace/BIG_protocol/fslPOSSUM/DWPOSSUM_master/Test/Direction0 Making possum directory structure Preprocessing stage /raid1b/STBBapps/fsl5.0/bin/possum_matrix -p /qmi_home/anht/Desktop/workspace/BIG_protocol/fslPOSSUM/DWPOSSUM_master/Test/Direction0/pulse -m /qmi_home/anht/Desktop/workspace/BIG_protocol/fslPOSSUM/DWPOSSUM_master/Test/Direction0/motion --seg=1000 -o /qmi_home/anht/Desktop/workspace/BIG_protocol/fslPOSSUM/DWPOSSUM_master/Test/Direction0/matrix Processing stage

Now going to step 3: ./postProcess.py Test 3 --noise_levels 0 0.0081 0.0165

qmi_home/anht/anaconda3/lib/python3.6/site-packages/dicom/init.py:53: UserWarning: This code is using an older version of pydicom, which is no longer maintained as of Jan 2017. You can access the new pydicom features and API by installing pydicom from PyPI. See 'Transitioning to pydicom 1.x' section at pydicom.readthedocs.org for more information. warnings.warn(msg) [0.0, 0.0081, 0.0165] nx,ny,nz 72 86 1 dx,dy,dz 2.5 2.5 2.5 Reshaping the signal... error: Mat::operator(): index out of bounds terminate called after throwing an instance of 'std::logic_error' what(): Mat::operator(): index out of bounds mv: cannot stat '/qmi_home/anht/Desktop/workspace/BIG_protocol/fslPOSSUM/DWPOSSUM_master/Test/Direction0/imageNoise_abs.nii.gz': No such file or directory Image Exception : #63 :: No image files match: /qmi_home/anht/Desktop/workspace/BIG_protocol/fslPOSSUM/DWPOSSUM_master/Test/Results/diff_sigma0.0_image0 terminate called after throwing an instance of 'std::runtime_error' what(): No image files match: /qmi_home/anht/Desktop/workspace/BIG_protocol/fslPOSSUM/DWPOSSUM_master/Test/Results/diff_sigma0.0_image0

I am currently using python 3.7. Is there any way to work around it. Thank you.

marksgraham commented 2 years ago

Hi,

To seperate out a python vs a FSL issue could you try running the FSL commands directly? so: signal2image -p /path/to/pulse -i /path/to/signal

and tell me if that works? And could you tell me the exact FSL version you're using?

15thai commented 2 years ago

Hi, Here it is.

signal2image -i DWPOSSUM_master/Test/Direction0/signalNoise -p DWPOSSUM_master/Test/Direction0/pulse -o DWPOSSUM_master/Test/Direction0/imageNoise -a

And here is the error:

nx,ny,nz 72 86 1 dx,dy,dz 2.5 2.5 2.5 Reshaping the signal...

error: Mat::operator(): index out of bounds

terminate called after throwing an instance of 'std::logic_error'

what(): Mat::operator(): index out of bounds Abort (core dumped)

The FSL version that I am using is: echo $FSLDIR

/ STBBapps/fsl6/fsl

flirt -version

FLIRT version 6.0

marksgraham commented 2 years ago

It seems like you are still running FSL 6... can you explicitly call the FSL5 version of signal2image?

15thai commented 2 years ago

/raid1b/STBBapps/fsl5.0/bin/signal2image -i DWPOSSUM_master/Test/Direction0/signalNoise -p DWPOSSUM_master/Test/Direction0/pulse -o DWPOSSUM_master/Test/Direction0/imageNoise -a

Here is the output of fsl5.0:

nx,ny,nz 72 86 1 dx,dy,dz 2.5 2.5 2.5 Reshaping the signal... terminate called after throwing an instance of 'NEWMAT::IndexException' Aborted (core dumped)

marksgraham commented 2 years ago

Is this FSL 5.0.0? Are you able to try using 5.0.10? This is the only version the code has been tested on

15thai commented 2 years ago

Hi, I have only FSL 5.0.0 and FSL 6. I could not find the package of FSL5.0.10 on the FSL-package installation. I tried this site: http://neuro.debian.net/pkgs/fsl-complete.html

marksgraham commented 2 years ago

I think you need to patch your FSL 5.0.0 version in order to upgrade. Patches are here: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation/Patches