Print

Print


OK.  I now understand.  The values you see are purely the result of the way the data are visualised in Display or CheckReg via trilinear interpolation.  The actual values in the images should just be ones and zeros.

If the images are aligned voxel for voxel, then the interpolation used by imcalc is irrelevant.  It's only if they are not aligned in this way, in which case you'll see a warning message, that the choice of interpolation method will influence the output image.

Best regards,
-John



Best regards,
-John



On 5 June 2014 14:04, Aser A <[log in to unmask]> wrote:
Hi John, 

The masks were created using SPM12 by save clusters as binary. Then I checked them at when I changed the display to NN the values were 1s and 0s but when it is tri they are not.

Also when I did the ImCalc I kept all the default options as they are and so the interpolation was trillinear

I hope this information can help solving the problem

Many thanks

AS


On Thu, Jun 5, 2014 at 12:50 PM, John Ashburner <[log in to unmask]> wrote:
It looks to me like your original masks don't contain pure integer values.  I don't know where they came from, so I can not say why this is the case.  My suspicion is that it could be something to do with how scalefactors have been used.

Procedures such as ImCalc look at the max and min values in the output images and determine scalefactors appropriately.  For example, an image containing values of only 0, 1 and 7 would be written as uint8 with a scalefactor of 7/255 (=0.02745098039215686).  When read back into MATLAB, the values would become
round(0/s)*s = 0
round(1/s)*s = 0.9882352941176471
round(7/s)*s = 7

Best regards,
-John



On 5 June 2014 12:37, Aser A <[log in to unmask]> wrote:
I did this before, yet I want an image with voxels in a specific mask. 
B=i2
A=i1+1
Then, A+B=gives me C which should contain three values

Then I tried to threshold the last image to be i1==2 However this did not work.

When I look at the images I find values of 2.00002 and 2.003 and 0.999

I should not get these values but not sure what happened. 

I am sure that my masks contain 1s and 0s


On Thu, Jun 5, 2014 at 11:43 AM, sarika cherodath <[log in to unmask]> wrote:
Hello,

         You can multiply the mask 1 with a certain value and leave mask 2 as it and then add the two to make mask three and check voxel values to understand if it is mask1/2 specific.

Hope this helps


On Thu, Jun 5, 2014 at 4:03 PM, Aser A <[log in to unmask]> wrote:
Hi all,

I have two masks all bin. Can I use how can I use ImCalc to see voxels specific to mask one and then voxels specific two mask 2 ( in two separate images ). 

So I want 

Vox_only_in_mask1= ....
Vox_only_in_mask2= ....


Thanks

AS



--
Sarika Cherodath
Senior Research Fellow
Speech and Language Laboratory
National Brain Research Centre
Manesar, Gurgaon -122050
India

http://www.nbrc.ac.in/faculty/nandini/language.html