Sorry for not replying, but it was quite busy.

I was quite disconcerted about the meaning of scalefactor. I put an example to see if you can help me to clarify it:
I do some calculations and get a parametric whose values ​​are always float, between -1.5783 ... and 5.6892 ..., for example. How should use the function spm_create_vol.m to create a header for that at the time of writing my data, the values ​​are not truncated to integers? Do you need to calculate a suitable scalefactor?

Thank you,
Karl.
 
From: [log in to unmask] href="mailto:[log in to unmask]">John Ashburner
Sent: Monday, October 21, 2013 2:10 PM
To: [log in to unmask] href="mailto:[log in to unmask]">Karl Thurnhofer
Cc: [log in to unmask] href="mailto:[log in to unmask]">[log in to unmask]
Subject: Re: [SPM] spm_create_vol and spm_write_vol
 
If images are of integer types (uint8, int16, etc), the scalefactors are useful to encode integer values in the range of 0..255 or -32768..32767 into some approximate floating point values.  I'm not sure what sort of range your parametric images have, but you should consider what happens when you round these values to the nearest integer.

Best regards,
-John



On 21 October 2013 12:51, Karl Thurnhofer <[log in to unmask]> wrote:
Hi SPM users:

I'm doing some functions to create some parametric images, but I have problems when writing them.
I use spm_create_vol.m function to create a header similar to the PET study with which I work, but when I write with spm_write_vol.m the values are truncated, ie, integers appear instead of doubles.
I think the question is what values should be put in pinfo. I put [1, 0, 0] (the scale factor is one, I have certain values and those I want be reflected). However, if used as a header for example, the last frame of my study PET, where pinfo is [0.001387, 0, 0] (and do not understand why this is so) I have no problem, are double values.

I hope you can help me.
Thank you.

PD: sorry, I sent the same mail with other issue.