8.    NIfTI画像の表示

DisplayImagesをクリックします。

作成された*.nii, 1をクリックし、Doneをクリックします。

結果が表示されました。

画像が暗いので輝度を調整します。

Auto Windowをクリックし、Percentile windowをクリックします。

そのままEnterキーを押します。

輝度が調整されました。

以下の方法でNIfTI画像を表示させることができます。

addpath('e:\spm\spm12');% @file_array@niftiのあるフォルダ

filename='e:\spm\akira\s20000001-0002-00001-000001-01.nii';

N=nifti(filename);

scale=diag(N.mat);

figure;

for n=1:3

    subplot(2,2,n);

    switch n

        case 1;dat=N.dat(:,128,:);sc=scale([3,1,2]);

        case 2;dat=N.dat(128,:,:);sc=scale([3,2,1]);   

        case 3;dat=N.dat(:,:,43); sc=scale([2,1,3]);  

    end;

    imagesc(rot90(squeeze(dat)',2));

    daspect(abs(sc));

end;

colormap(gray);