Hasan, Khader M wrote:
> On my Matlab 7.0:
>
>>> min([1 2 3 4 5 NaN])
> ans =
> 1
... yes, you're right, I did not check all Matlab versions :) This
default functionality changed some time back
(http://stackoverflow.com/questions/19696158/which-is-the-difference-between-min-and-nanmin-max-and-nanmax-in-matlab)
so I am still used to making sure NaNs are explicitly dealt with (as
using standard Matlab functions on an array including NaN is at least
potentially dangerous). But you are right, I should have given
mean([1 2 3 4 5 NaN])
as an example...
Cheers,
Marko
> From: SPM (Statistical Parametric Mapping) [[log in to unmask]] On Behalf Of Marko Wilke [[log in to unmask]]
> Sent: Friday, December 13, 2013 9:37 AM
> To: [log in to unmask]
> Subject: Re: [SPM] intensities values after deformation
>
> ... in addition to what Donald said, Matlab's min and max functions
> don't handle NaN values all too well:
>
> min([1 2 3 4 5 NaN])
>
> will return NaN. Hence, the values in the image may still make sense,
> but the calculation is screwed up. If you do
>
> vol = spm_read_vols(spm_vol(spm_select));
> vol(isnan(vol)) = [];
> vol(vol==0) = [];
>
> then
>
> min(vol(:))
>
> should give you the "real" minimum value. There are dedicated nanmin and
> nanmax functions, but I am not sure they are included in the standard
> Matlab installation.
>
> Hope this helps,
> Marko
>
> MCLAREN, Donald wrote:
>> There are still values in the image; however,the image now contains NaN
>> values. This is expected as your new bounding box is larger than the old
>> bounding box. With no possible value, the program uses NaN.
>>
>> If you want to use "subject space", it would be preferable to use
>> "native space" which is the size and location of your functional data,
>> rather than the size and location of your anatomical data.
>>
>> Best Regards, Donald McLaren
>> =================
>> D.G. McLaren, Ph.D.
>> Research Fellow, Department of Neurology, Massachusetts General Hospital and
>> Harvard Medical School
>> Postdoctoral Research Fellow, GRECC, Bedford VA
>> Website: https://urldefense.proofpoint.com/v1/url?u=http://www.martinos.org/~mclaren&k=yYSsEqip9%2FcIjLHUhVwIqA%3D%3D%0A&r=VXYVcWGQQcUORtwYSaJEEMSDYpJQjErvHTp2xHsOge8%3D%0A&m=q6HDVcm%2BL0eBAkDkgO584kbCFG1iJ0C9kywY2rXUme0%3D%0A&s=16379fcad8d32c8e894505d3f3c18c3b9300cd98c1155275fe089d0125087336
>> Office: (773) 406-2464
>> =====================
>> This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
>> HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
>> intended only for the use of the individual or entity named above. If the
>> reader of the e-mail is not the intended recipient or the employee or agent
>> responsible for delivering it to the intended recipient, you are hereby
>> notified that you are in possession of confidential and privileged
>> information. Any unauthorized use, disclosure, copying or the taking of any
>> action in reliance on the contents of this information is strictly
>> prohibited and may be unlawful. If you have received this e-mail
>> unintentionally, please immediately notify the sender via telephone at (773)
>> 406-2464 or email.
>>
>>
>> On Fri, Dec 13, 2013 at 8:20 AM, [log in to unmask]
>> <mailto:[log in to unmask]> <[log in to unmask]
>> <mailto:[log in to unmask]>> wrote:
>>
>> Hi all,
>> I have an image with zscores obtained after running an ICA (Icasso).
>> This
>> image is in MNI space and the voxels have different intensities values:
>> Zvol:: Size = (121,145,121)
>> Zvol:: ROI Size = (121,145,121)
>> Zvol:: Dims = (1.5,1.5,1.5)
>> Zvol:: Minimum and maximum intensities are: -5.36202 and 11.2541
>>
>> I need the image to be in subject space, so I run an inverse
>> deformation with
>> SPM8. After that the intensities values of the voxels became NaN:
>> Zvol:: Size = (224,256,192)
>> Zvol:: ROI Size = (224,256,192)
>> Zvol:: Dims = (0.859375,0.859375,1.1)
>> Zvol:: Minimum and maximum intensities are: nan and nan
>>
>> Is there a way to keep the intensities values? I need these
>> informations in
>> order to separate the clusters in the image.
>>
>>
>
> --
> ____________________________________________________
> PD Dr. med. Marko Wilke
> Facharzt für Kinder- und Jugendmedizin
> Leiter, Experimentelle Pädiatrische Neurobildgebung
> Universitäts-Kinderklinik
> Abt. III (Neuropädiatrie)
>
>
> Marko Wilke, MD, PhD
> Pediatrician
> Head, Experimental Pediatric Neuroimaging
> University Children's Hospital
> Dept. III (Pediatric Neurology)
>
>
> Hoppe-Seyler-Str. 1
> D - 72076 Tübingen, Germany
> Tel. +49 7071 29-83416
> Fax +49 7071 29-5473
> [log in to unmask]
>
> https://urldefense.proofpoint.com/v1/url?u=http://www.medizin.uni-tuebingen.de/kinder/epn/&k=yYSsEqip9%2FcIjLHUhVwIqA%3D%3D%0A&r=VXYVcWGQQcUORtwYSaJEEMSDYpJQjErvHTp2xHsOge8%3D%0A&m=q6HDVcm%2BL0eBAkDkgO584kbCFG1iJ0C9kywY2rXUme0%3D%0A&s=f7fe655c4d7f73f603da1133ae6f8f77c6bf3b43bb7b436348c87155a8025991
> ____________________________________________________
>
--
____________________________________________________
PD Dr. med. Marko Wilke
Facharzt für Kinder- und Jugendmedizin
Leiter, Experimentelle Pädiatrische Neurobildgebung
Universitäts-Kinderklinik
Abt. III (Neuropädiatrie)
Marko Wilke, MD, PhD
Pediatrician
Head, Experimental Pediatric Neuroimaging
University Children's Hospital
Dept. III (Pediatric Neurology)
Hoppe-Seyler-Str. 1
D - 72076 Tübingen, Germany
Tel. +49 7071 29-83416
Fax +49 7071 29-5473
[log in to unmask]
http://www.medizin.uni-tuebingen.de/kinder/epn/
____________________________________________________
|