Print

Print


Hi Rodrigo,
BIANCA needs a training set of segmented images (more than one) to learn the characteristics of the WMH to then segment a new one (query subject)
If, for testing purposes, the query subject is one of the subjects included in the training set (as the example in the user guide), this is automatically excluded to avoid bias and overfitting. In your case you ended up with no training data to learn from, therefore the error.

You definitely need more than one subject in your training, we would recommend at least 10.
In order to help the manual segmentation you could use the output of freesurfer as a starting point (I leave it to others to give advice on the freesurfer command line), but if you do I would recommend 2 things:
- check that you are happy with the output as it is likely that not all hyperintensities in FLAIR are detectable as hypointensities in T1 (actually usually a smaller amount), so you will probably still need to edit the masks manually.
- T1, FLAIR and manual masks need to be registered to the same space, so if you are using FLAIR as reference space, make sure you register the masks created in T1 space to FLAIR and binarise them.

Hope it helps,
Ludovica

— 
Ludovica Griffanti, PhD
Analysis Postdoctoral Research Assistant
Oxford Centre for Functional MRI of the Brain (FMRIB)
Nuffield Department of Clinical Neurosciences, University of Oxford
John Radcliffe Hospital
Oxford, OX3 9DU, UK
email: [log in to unmask]



On 3 May 2017, at 5:57 pm, Rodrigo <[log in to unmask]> wrote:

Hi all,
I am trying to run BIANCA using the information provided in: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/BIANCA/Userguide

The only difference that I see between the instructions and what I try is that I am only including one person.
My questions are:

1. Instead of manually segmenting the training set, could i use the informatio provided by freesurfer about the white matter hypointensities?   I do that by: mri_binarize --i ../FS_DIR/<SUBJ>/mri/aseg.mgz --match 77 --o WMH.nii

2. If yes (even though it shouldn't affect it at this stage of my test), I get the following error:
$bianca --singlefile=masterfile.txt --labelfeaturenum=4 --brainmaskfeaturenum=1 --querysubjectnum=1 --trainingnums=1 --featuresubset=1,2 --matfeaturenum=3 --trainingpts=2000 --nonlespts=10000 --selectpts=noborder -o sub001_bianca_output –v

Traceback (most recent call last):
 File "/usr/pubsw/packages/fsl/5.0.10/bin/bianca", line 1033, in <module>
   p_main()
 File "/usr/pubsw/packages/fsl/5.0.10/bin/bianca", line 999, in p_main
   [check_dat,querypts,_] = load_vox_data([queryfilelist],matfilelist=[querymat],labelfilelist=querylabel,mode=['allpoints'],spatial_features=GlobalOpts.spatial_features,use_labels=False)
 File "/usr/pubsw/packages/fsl/5.0.10/bin/bianca", line 576, in load_vox_data
   combdata = h_stack([make2d(combdata),mnicoords])
 File "/usr/pubsw/packages/fsl/5.0.10/bin/bianca", line 129, in h_stack
   return hstack(y)
 File "/usr/pubsw/packages/fsl/5.0.10/fslpython/envs/fslpython/lib/python3.5/site-packages/numpy/core/shape_base.py", line 280, in hstack
   return _nx.concatenate(arrs, 1)
ValueError: all the input array dimensions except for the concatenation axis must match exactly


My masterfile looks like this: $cat masterfile.txt_toemail
/WORKING_DIR//FLAIR2T1.nii /WORKING_DIR//ORIG_T1.nii /WORKING_DIR//FLAIR2MNI.mat /WORKING_DIR//WMH.nii


My OS version: lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.8 (Final)
Release: 6.8
Codename: Final


Any thoughts and what could be wrong?

Thanks in advance,
Rodrigo