Anoop
con images are the images containing the contrast values ie C*Betas
the spm_T images are the one containing the T values
in those images, 0 or NaN are in lots of cells .. ie in all of cells
which are not brain (defined by the mask image)
now to read the images, easiest would be to use P = spm_select(...);
followed by V = spm_vol(P); and finally my_images_as_a_martrix =
spm_read_vol(V);
then save your matrix and import it in Python - the other option is look
into nipy, they have lots of objects allowing to read images
Cyril
> Hi,
>
> I have estimated one data set and it generated a set of .img and .hdr
> files. The list of .img files (ls *.img) it has generated is attached
> in the file ls_img.txt. I want to work with the t-values and thinking
> that con_0001.img has the t-values I tried reading the file. But the
> file (my code used float32 values) contains NaN values, most of the
> cells appeared as NaN in both Python and MATLAB, so I replaced the NaN
> values with zeros
> (http://en.wikibooks.org/wiki/SPM/Programming_intro#Reading_and_writing_a_volume_.28to_replace_NaNs_with_zeros.29).
> Is values represented as NaN values normal, if not how can I get the
> actual values. Also which file should I be working with if I want to
> work with the t-values, con_0001.img is what I thought it would be.
> Also it will be great if you could tell me what other .img images
> represent, there are several beta_###.img in the folder.
>
>
> Thanks in advance.
>
--
Dr Cyril Pernet,
Academic Fellow
Brain Research Imaging Center
http://www.bric.ed.ac.uk/
Division of Clinical Neurosciences
University of Edinburgh
Western General Hospital
Crewe Road
Edinburgh
EH4 2XU
Scotland, UK
[log in to unmask]
tel: +44(0)1315373661
http://www.sbirc.ed.ac.uk/LCL/
http://www.sbirc.ed.ac.uk/cyril
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
|