-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error, a variable became negative. Most likely something went wrong in the QP #163
Comments
Most likely, the data has too many negative values. Check your brain mask for these cases first, and if there is an issue (ie. mask includes regions outside brain or holes, remove them). Next option could be to threshold data to not have negative values...so preoprocess it and then pass to the UKF tractography module. |
Thanks, will start with your first suggestion. Otherwise, how is thresholding the data to not have negative values accomplished? Currently running UKFTractography in the terminal from the pnlpipe docker container (not through the Slicer GUI) |
Has to be done separately using your own custom script in python or other languaget that you can write to threshold anything below 0 to be 1 (in the un-normalized dMRI data). |
Doesn't seem to be the first issue. Do you have an example script by chance for thresholding (i.e., in linux) or could you point me towards a resource? Thank you for your time |
Just looking to follow-up, thank you! |
Perhaps you can use DiPy to see if they have some functions to do it. |
No but this may be useful: import nibabel as nib
img=nib.load('image.nii.gz')
img[img.get_fdata()<0]=0
new_img=nib.Nifti1Image(img.get_fdata(), img.header.get_best_affine(), header=img.header) |
Hello,
Although UKFTractography completed without error for most of my cases, I have 3 cases that threw the following error. Any insight is appreciated - thank you!
(pnlpipe3) [root@4d78e987681f dwi]# UKFTractography --dwiFile sub-TRD24_ses-01_desc-UnXc_dwi_EdEp.nhdr --maskFile sub-TRD24_ses-01_desc-UnXc_dwi_EdEp_maskQc.nhdr --numThreads 8 --seedsPerVoxel 1 --recordTensors --freeWater --recordFreeWater --tracts ./ukf/sub-TRD24_ses-01_desc-UnXc_dwi_EdEp.vtk
Using the 2T simple model with free water estimation. Setting the default parameters accordingly:
"*": set by user
"-": default setting
Found 8 cores on your system.
Running tractography with 8 thread(s).
DWMRI_b-value 1000
Number of non-zero gradients: 64
Number of zero gradients: 1
Permuting the axis order to: 3 0 1 2
Resizing the data to: 64 128 128 63
Computing the baseline image
Dividing the signal by baseline image
Data normalization finished!
Using 2-tensor simple model with free water estimation.
Branching disabled
Using constrained filter
Error, a variable became negative. Most likely something went wrong in the QP
terminate called without an active exception
Aborted
The text was updated successfully, but these errors were encountered: