Print

Print


Thanks for the advice. Adding 1/1000 to the priors seems to have solved the issue.  Bill



From: John Ashburner <[log in to unmask]>
Date: Tuesday, September 20, 2016 at 1:25 PM
To: Bill Hopkins <[log in to unmask]>
Cc: "[log in to unmask]" <[log in to unmask]>
Subject: Re: [SPM] Segmentation in SPM8

It depends on the tissue probability maps and an element of chance.  Sometimes you get lucky, and sometimes you don't.  It all depends which parts of the tissue priors happen to be sampled during the affine registration.

The tissue priors should sum to 1 at each voxel.  The values in the tissue priors should also be greater than zero.  I'd guess that the instabilities are occurring when using the gradients of the logs of the tissue priors.  For tissue probabilities very close to zero, these logs are very large negative numbers.

Rather than simply using the average of a load of warped binary segmentations, I use a couple of tricks to make the tissue priors better behaved:
1) Apply a tiny bit of spatial smoothing.
2) Add a small constant value to the tissue probabilities (eg 1/1000).

Following these fudges, I re-normalise by dividing each tissue map by the sum over all the tissue maps (so that everything sums to 1 again).

Best regards,
-John


On 20 September 2016 at 17:38, William Donald Hopkins <[log in to unmask]> wrote:
Hi John-

Thanks for your response. Indeed, I am working with a large sample of chimpanzee MRI scans and had to modify custom probability maps to accommodate their brains; however, why would the segmentation process work for most scans but crash on others? Any thoughts? 

Thank you again, Bill Hopkins



From: John Ashburner <[log in to unmask]>
Date: Tuesday, September 20, 2016 at 12:09 PM
To: Bill Hopkins <[log in to unmask]>
Cc: "[log in to unmask]" <[log in to unmask]>
Subject: Re: [SPM] Segmentation in SPM8

The only time I've heard about this error was when someone was using custom tissue probability maps (which I assume had problems because it contained some zero or negative probabilities, which screws up computing log probabilities ).  If this is not the case for you, then I have no idea what the cause of the problem is. I'd suggest trying a Check Reg against some of the images released with SPM.  This can sometimes give clues (eg from totally inappropriate voxel sizes, image orientation etc).

Best regards,
-John


On 20 September 2016 at 16:01, William Donald Hopkins <[log in to unmask]> wrote:
Hello All-

I am trying run VBM in SPM8.   Out of the batch, I am running the “New Segment” function and am getting the following error:


Failed  'New Segment'
Error using sqrtm (line 35)
Expected input to be finite.
In file "/Applications/MATLAB_R2016a.app/toolbox/matlab/matfun/sqrtm.m" (???), function "sqrtm" at line 35.
In file "/Users/bill/Desktop/spm8/toolbox/Seg/spm_maff8.m" (v4152), function "M2P" at line 250.
In file "/Users/bill/Desktop/spm8/toolbox/Seg/spm_maff8.m" (v4152), function "affreg" at line 111.
In file "/Users/bill/Desktop/spm8/toolbox/Seg/spm_maff8.m" (v4152), function "spm_maff8" at line 27.
In file "/Users/bill/Desktop/spm8/toolbox/Seg/spm_preproc_run.m" (v4677), function "run_job" at line 88.
In file "/Users/bill/Desktop/spm8/toolbox/Seg/spm_preproc_run.m" (v4677), function "spm_preproc_run" at line 30.
In file "/Users/bill/Desktop/spm8/toolbox/Seg/tbx_cfg_preproc8.m" (v4337), function "spm_local_preproc_run" at line 363.

What is strange that is that the segmentation program works fine on 90% of my brain scans but crashes with this error on about 10% and I have no idea why given that all the brains have been similarly preprocessed. 

Any suggestions? 

Thank you, Bill Hopkins