SPM99 Gem 6: Reading raw data

Subject: Re: raw data
From: John Ashburner <john@FIL.ION.UCL.AC.UK&gt
Date: Thu, 10 May 2001 14:33:19 +0100
To: SPM@JISCMAIL.AC.UK

> I have a very simple question.  Where does one find and how does one go
> about extracting the raw data associated with a particular voxel?

I would write a very short script to do this.  Try modifying and copy-pasting
the following....
* * * * * * * * * * * * * * * * * * * * * * * * * * * * --
V=spm_vol(spm_get(Inf,'*.img'));
x = 32;
y = 32;
z = 32;

dat = zeros(length(V),1);
for i=1:length(dat),
        dat(i) = spm_sample_vol(V(i),x,y,z,0);
end;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * --

The vector dat will contain the raw data from the voxel at 32,32,32.

Best regards,
-John


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s