Den 13. jun. 2018 kl. 04.35 skrev negar noorizadeh <[log in to unmask]>:Thanks for your response.I removed it from structure like this:Vo_BM = struct('fname' , OutName_BM ,...'dim' , V_T2.dim , ...'dt' , [2 spm_platform('bigend')] , ...'mat' , V_T2.mat ,...'descrip', V_T2.descrip);Vo_write = spm_write_vol(Vo_BM , A);but it still scales values in A for example maximum value becomes 0.996 instead of 1!!!!I would be really appreciated if SPM experts have any solution for this problem.RegardsNegarIf you remove the pinfo field from the structure (using rmfield command), spm_write_vol will automatically write a new pinfo field from information automatically detected in your matrix.Best,JonOn Tue, Jun 12, 2018 at 5:44 PM, negar noorizadeh <[log in to unmask]> wrote:Thanks for your quick response.Unfortunately, my matrix has different values in range of 0 to 1 such as 0.001,0.55,0.896 and setting pinfo to [1;0;0] will force intensity to be only 0 and 1.I don't want to have only 0 and 1.Is there any other solution to write my data with out any scaling by spm_write_vol?RegardsNeagr---------- Forwarded message ---------
From: Lalith Kumar Shiyam Sundar <[log in to unmask]>
Date: Tue, Jun 12, 2018 at 3:52 PM
Subject: Re: [SPM] Question about SPM_write_vol
To: negar noorizadeh <[log in to unmask]>Hi,The pinfo should b = [1,0,0]Cheers,LalithSent from my iPhoneDear SPM Experts,I have a question and I would be really appreciated if you can help.I have a 3D matrix (for example A) that its values are in range of [0-1].After writing A by spm_write_vol and read it again in Matlab I found that the intensity range was changed (maximum intensity is .9996 not 1).I think that pinfo has some effects in scaling data. Is there any way to write my data without any scaling to have the same intensity range as what I have in A?RegardsNeagr--Jonathan O'RaweGraduate Student in Integrative NeuroscienceDept. of PsychologyStony Brook UniversityStony Brook, NY 11794-2500Office: Psychology B 339Email: [log in to unmask]