If you copy and paste the following into MATLAB, it should provide clues about
what went wrong.
N = nifti('/data/neurad/ana.nii');
N.dat
size(N.dat)
tmp=dir(P)
I can't figure out why the DICOM conversion is failing in SPM. If there are
no issues of confidentiality (subject names etc are stored in the DICOM
headers) then you could email me one or two of the DICOM files to see if I
can determine the cause of the problem.
Best regards,
-John
On Saturday 20 October 2007 09:35, Joerg Magerkurth wrote:
> Hi,
>
> In the past I used SPM5 and FSL for my calculations using the analyze
> format. Recently I try to switch to NIFTI. But now I have several Problems:
>
> Normaly, I want to use MRI_CONVERT (freesurfer) to get nifti-files from the
> dicoms (Siemens TRIO). FSL reads them. Opening with smp5 fails:
>
> #
> ###########################
> Running "Display Image"
> Image "/data/neurad/ana.nii" can not be resampled
> Image "/data/neurad/ana.nii" can not be resampled
> ###########################
> #
>
> The Dispplay window opens with the headerinformations but the images are
> completly white. Clicking in the images produces the following output:
>
> #
> ###########################
> ??? Bad image handle dimensions.
>
> Error in ==> spm_image at 106
>
> set(st.in,'String',sprintf('%g',spm_sample_vol(st.vols{1},pos(1),pos(2),pos
>(3),st.hld)));
>
> Error in ==> spm_orthviews at 258
> eval(st.callback);
>
> ??? Error using ==> if
> strcmp(get(gcf,'SelectionType'),'normal'),spm_orthviews('Reposition');elsei
>f
> strcmp(get(gcf,'SelectionType'),'extend'),spm_orthviews('reposition');spm_o
>rthviews('context_menu','ts',1);end; Bad image handle dimensions.
>
> ??? Error while evaluating axes ButtonDownFcn
> ############################
> #
>
> To exclude conversion errors, I try to convert the dicoms with spm, but
> that is also impossible:
>
> #
> #############################
> SPM present working directory:
> /data/nifti-test
> --------------------------
> Running "DICOM Import"
> Changing directory to: /data/nifti-test/
> ??? Subscripted assignment dimension mismatch (2).
>
> Error in ==> file_array.subsasgn>subfun at 125
> mat2file(sobj,dat,va{:});
>
> Error in ==> file_array.subsasgn at 63
> subfun(sobj,double(dat),args{:});
>
> Error in ==> nifti.subsasgn>fun at 74
> val = subsasgn(obj.dat,subs(2:end),val);
>
> Error in ==> nifti.subsasgn at 20
> obji = fun(obji,subs,val);
>
> Error in ==> spm_dicom_convert>write_volume at 587
> N.dat(:,:,:) = volume;
>
> Error in ==> spm_dicom_convert>convert_standard at 207
> write_volume(hdr{i},root_dir,format);
>
> Error in ==> spm_dicom_convert at 44
> convert_standard(standard,root_dir,format);
>
> Error in ==> spm_config_dicom>convert_dicom at 130
> spm_dicom_convert(hdr,'all',root_dir,job.convopts.format);
>
> Error in ==> spm_jobman>run_struct1 at 1585
> feval(prog,val);
>
> Error in ==> spm_jobman>run_struct1 at 1595
> run_struct1(c.val{i},gui);
>
> Error in ==> spm_jobman>run_struct1 at 1595
> run_struct1(c.val{i},gui);
>
> Error in ==> spm_jobman>run_job at 480
> run_struct1(c,gui);
>
> Error in ==> spm_jobman>serial at 2174
> run_job(jobs);
>
> Error in ==> spm_jobman at 80
> serial(varargin{2:nargin});
>
> ??? Error using ==> spm_jobman('serial','','jobs.util.dicom');
> Subscripted assignment dimension mismatch (2).
>
> ??? Error while evaluating uicontrol Callback
> ######################
> #
>
> I can reproduce the errors with matlab R2006b and R2007a, current and older
> versions of spm5. Trying this with other dicom series fails too.
>
> Any advices?
>
>
> Best regards,
>
> Joerg
|