Closed tmedani closed 3 years ago
BDP is not able to find a bounding box for the images. My guess is that there is a severe artifact or the data is blank for some directions.
Putting yesterday's discussion here as a note:
The problem can be reproduced exactly the same on Ubuntu18.04 with the command lines. On Mac's GUI it will throw the error "BFC cannot process data of type float64" during BSE.
(Together with Clio) we find the output of the first step (BSE) on this T1 image is just problematic, it outputs masks and boundaries of the whole head instead of the brain, and converting the T1 data from 64 bit to 16 and 32 bit did not help. Output snapshots attached below.
Hi @snapfinger,
Thanks for reporting the discussion here, this is much better.
After some investigation, it seems that the intensities of the voxel of this MRI are not common. I mean, by comparing this MRI to the others that were processed correctly with Brainsuite.
the range of this MRI is from [-41.8075 to 65535] where the others are between 0 and 255
@ajoshiusc & @snapfinger does this make sense for you.
Maybe this is the problem, I will check this direction and come back to you.
btw, do you have or know any method to "normalize" the voxel intensities?
Hmm, I think MRI is not calibrated like CT and it's pretty common to have extreme values. I don't think it should be the problem, but I have no experience with developing skull-stripping algorithms of brain MRI. However speaking of normalization, one quick and dirty way is linear normalization, I once used it in some retinal images to reduce the effect of intensity variance, maybe you can try that? Let's also see what Anand says.
Hi, just an update, this error is solved by @ajoshiusc this error may appear in very specific cases (limited cases), where the MRI has big FOV where the neck and its bottom are included.
@ajoshiusc will document how to solve this problem on the BrainSuite web site and we will add the link to the Brainstorm tutorial in the troubleshooting section. https://neuroimage.usc.edu/brainstorm/FemTensors?highlight=%28Troubleshooting%29
@ajoshiusc were you able to document this issue and how to solve it with Brainsuite? we will add the link to the documentation here and on the Brainstorm tutorial https://neuroimage.usc.edu/brainstorm/FemTensors#Troubleshooting
@tmedani Is this issue still up-to-date?
yes, @ajoshiusc should write a report about this error and put it in the Brainsuite website, and then we will refer to it if this issue appears, it's mainly due to the neck.
let's wait for Anand input,
Any update with this issue?
This is a specific case that appeared only with Ernie subject.
Hello,
This thread reports an error with BDP while applying it to the SimNIbs dataset example (Ernie).
with @ajoshiusc, we are going to investigate the problem, and this discussion will track the solution that could be helpful for future users.
here is the output :
BST> System call: bse -i "C:\Users\33649.brainstorm\tmp\brainsuite\ErnieT1.nii" --auto -o "C:\Users\33649.brainstorm\tmp\brainsuite\skull_stripped_mri.nii.gz" --mask "C:\Users\33649.brainstorm\tmp\brainsuite\bse_smooth_brain.mask.nii.gz" --hires "C:\Users\33649.brainstorm\tmp\brainsuite\bse_detailled_brain.mask.nii.gz" --cortex "C:\Users\33649.brainstorm\tmp\brainsuite\bse_cortex_file.nii.gz"
BDP Version: 19b (build #0077), released 2019-12-31
================================================================================ Setting up dataset and inputs ================================================================================ Reading input flags...
Checking input files...
Processing data with fileprefix: C:\Users\33649.brainstorm\tmp\brainsuite\output_mri
================================================================================ Co-registration and Distortion Correction ================================================================================ Reading the input parameters for co-registration...
Total usable memory found: 6.28GB
Checking orientation information...Done Extracting 0-diffusion (b=0) image from input DWIs...
DWI mask is not defined in input flags. BDP will try to estimate a (pseudo) mask from 0-diffusion (b=0) image. Automatic mask estimation may not be accurate in some sitations and can affect overall quality of co-registration. In case co-registration is not accurate, you can define a DWI mask by using flag --dwi-mask. The mask can be generated and hand edited in
BrainSuite interface. This mask would be used only for registration purposes
(and not for statistics computation).
Saved (pseudo) masks: C:\Users\33649\.brainstorm\tmp\brainsuite\output_mri.dwi.RAS.mask.nii.gz
Starting Registration based distortion Correction... Loading data...
Starting rigid registration of input images... Reading input data... Setting/generating masks... Matching centroids (approx. align)... Matching resolution of the images... Normalizing intensity of images...
Performing affine registration with 6 degrees of freedom... Search-based initialization...
Scale 1 of 6 running... Scale 2 of 6 running... Scale 3 of 6 running... Scale 4 of 6 running... Scale 5 of 6 running... Scale 6 of 6 running...
Refine: Scale 1 of 2 running...Warning: check this case.
Refine: Scale 2 of 2 running...Warning: check this case.
Saving output files...
Rigid registration done.
Setting up data for non-rigid registration based distortion correction... Correcting intensity non-uniformity in b=0 image...Index exceeds the number of array elements (0).
Error in find_bounding_box (line 16)
Error in EPI_correct_files_registration_INVERSION>trim_msk_PED (line 513)
Error in EPI_correct_files_registration_INVERSION (line 271)
Error in coregister_diffusion_mprage_pipeline (line 219)
Error in BrainSuite_Diffusion_pipeline (line 26)
MATLAB:badsubscript
Error: Cannot convert files: C:\Users\33649\Downloads\simnibs_examples\ernie\org\ernie_dMRI.nii C:\Users\33649\Downloads\simnibs_examples\ernie\org\ernie_dMRI.bval C:\Users\33649\Downloads\simnibs_examples\ernie\org\ernie_dMRI.bvec BrainSuite failed at step 3/3 (BDP). Check the Matlab command window for more information.