My best guess is that the scans have been resliced and they are in
some kind of floating point format that supports NaN. I.e., there are
some NaN or Inf values in the data, which are causing the problems.
The following snippet of code will count the number of non-finite
values.
P=spm_select(1,'nifti');
Nii=nifti(P);
sum(~isfinite(Nii.dat(:)))
If this is the problem, the NaN or Inf values can be set to zero by:
P=spm_select(1,'nifti');
Nii=nifti(P);
Nii.dat(find(~isfinite(Nii.dat(:)))) = 0;
Note that the above snippet will write to the file, so you may want to
run it on a copy of the original (just in case it doesn't work).
Best regards,
-John
On 15 July 2011 03:51, Jacquie Kurland <[log in to unmask]> wrote:
>
> ---------- Forwarded message ----------
> From: Jacquie Kurland <[log in to unmask]>
> To: [log in to unmask]
> Date: Thu, 14 Jul 2011 22:42:06 -0400
> Subject: Error during Segmentation
> Hello,
>
> In trying to implement indirect normalization on a lesioned brain, I'm
> getting an error message during Segmentation as follows:
>
> ...
> Done 'Coregister: Estimate'
> Running 'Segment'
> Failed 'Segment'
> Attempted to access ch(1); index out of bounds because numel(ch)=0.
> In file "C:\Documents and Settings\Jacquie
> Kurland\Desktop\spm8\spm_minmax.m" (v2774), function "spm_minmax" at line
> 66.
> In file "C:\Documents and Settings\Jacquie
> Kurland\Desktop\spm8\spm_preproc.m" (v4178), function "spm_preproc" at line
> 120.
> In file "C:\Documents and Settings\Jacquie
> Kurland\Desktop\spm8\config\spm_run_preproc.m" (v4185), function
> "spm_run_preproc" at line 19.
>
> Does anyone have any thoughts on the meaning of this error message and how I
> should proceed to correct the problem?
>
> Here are the steps I was following:
> 1. Converted DICOM to NIfTI
> 2. Created lesion mask in T1 native space (using MRICron)
> 3. Used Display to re-orient T1 and mask w/ [0,0,0] on AC
> 4. Used Display to re-orient EPI images w/ [0,0,0] on AC
> 5. Checked registration betweend T1 and EPI
> 6. Realign (Estimate & Reslice) - realigned the time series (four Sessions)
> 7. Coregister (Estimate only) - used the Mean Reference from Realign; w/ the
> T1 as the Source Image and lesion mask as "Other Images"
> 8. Segment - Data is reference from the Coregistered Images
>
> There are more steps (Normalise; Smooth; Normalise), but it fails during
> Segment. Any help will be GREATLY appreciated - thanks in advance.
>
> -Jacquie
>
>
>
>
> --
> Jacquie Kurland, PhD
> Assistant Professor
> Department of Communication Disorders
> School of Public Health and Health Sciences
> University of Massachusetts Amherst
> 358 North Pleasant Street, Room 307A
> Amherst, MA 01003-9296
> Phone: (413) 545-4007
> Fax: (413) 545-0803
> Email: [log in to unmask]
>
|