Hi,
> My code is now as follows:
>
> ROI = maroi_image('image.nii');
> saveroi(ROI, 'name_roi.mat');
> save_as_image(ROI, 'name.img');
>
> addding: ROI = (ROI==12) doesn't work (i.e. it gives me exactly the same image
> as before, including both voxels with values 12 and 112). Save_as_image
> (ROI==12,'name.img') also does not work, that gives me an empty image. Any
> other advice?
I think this might work:
V = spm_vol('image.nii');
ROI = maroi_image(struct('vol', V, 'func', 'img==12');
Using the SPM display option to display images, the image by default
is resampled using trilinear interpoloation, do you still get the
intermediate 0,1 values if you select NN (nearest neighbour)
interpolation in the SPM GUI, bottom right panel in the image
interface?
Best,
Matthew
|