Re: [Marsbar-users] select specific values within nifti image
Status: Beta
Brought to you by:
matthewbrett
|
From: Rick H. <r.h...@fc...> - 2008-06-16 13:52:45
|
Dear Matthew,
Thanks for your rapid response!
> I think you could do this by applying a function to the image as you do ROI
> definition->Build->Image, such as 'img == 12'. Does that work?
In the GUI mode that does seem to work, although the output image is not
strictly binarized: some of the 112 values are now replaced by values between 0
and 1 (and although most of the 12 values are now 1, some of them are also
between 0 and 1). Do you have any idea why that is? And second, how to batch
the application of a function to the image? 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?
Thanks a lot! Rick
Rick Helmich <r.helmich <at> fcdonders.ru.nl> writes:
>
> Dear Matthew and List,
>
> I am using MarsBar with SPM5 to build ROIs from a set of input images
> (segmented subcortical structures, using FSL FIRST).
>
> These input (nifti) images contain three different numbers: for instance, 0
at
> voxels where there is no subcortical structure, 12 at locations where there
is
> subcortical structure, and 112 at the border of that structure.
>
> I would like to include only one of these values in my ROI (in this case,
12),
> while excluding voxels with the value of 0 or 112. How can I indicate this in
> the batched version of marsbar?
>
> Thanks a lot for your help!
>
> Greetings, Rick
>
> =========================================
>
> Rick C.G. Helmich, MD (Ph.D student)
>
> F.C. Donders Centre for Cognitive Neuroimaging
> P.O. Box 9101
> 6500 HB Nijmegen
> The Netherlands
>
> T 00 31 (0)24 36 65077
> F 00 31 (0)24 36 10989
> E rick.helmich <at> fcdonders.ru.nl
> web: www.fcdonders.ru.nl
> =========================================
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
>
|