OK for those interested here is a small script which worked for me it
is Q&D but does the job!
best
torben
Torben E. Lund
Danish Research Centre for MR
Copenhagen University Hospital
Kettegaard Allé 30
2650 Hvidovre
Denmark
email: [log in to unmask]
webpage: http://www.drcmr.dk
On 11 Jan 2005, at 19:48, Robert Welsh wrote:
> I am trying to do the same thing, but I can't seem to put nan into my
> volume.
>
> I did explicity this, and as you can see, nan is being converted back
> to zero!
>
> Any ideas,
>
> Robert
>
>>> som1 = spm_read_vols(hdr);
>>> izero = find(som1==0);
>>> size(izero)
>
> ans =
>
> 163553 1
>
>>> som1(izero) = nan;
>>> som1(1,1,1)
>
> ans =
>
> NaN
>
>>> spm_write_vol(hdr,som1);
>>> som1 = spm_read_vols(hdr);
>>> som1(1,1,1)
>
> ans =
>
> 0
>
>
>
>>>> Torben Ellegaard Lund <[log in to unmask]> 01/11/05 11:27 AM
>>>> >>>
> Sorry for this. My suggestion:
>> mycmap = colormap([gray(64); nan nan nan ;jet(63)]);
>>
>
> does not do the right thing. The solution is to put NaN in the image on
> the places where the value is not to be plotted.
>
> best
> Torben
>
>> best
>> Torben
>>
>> Torben E. Lund
>> Danish Research Centre for MR
>> Copenhagen University Hospital
>> Kettegaard Allé 30
>> 2650 Hvidovre
>> Denmark
>> email: [log in to unmask]
>> webpage: http://www.drcmr.dk
>>
>> On 11 Jan 2005, at 15:43, Jan Gläscher wrote:
>>
>>> Dear Torben,
>>>
>>> I guess that you are also hurrying to meet the HBM deadline - so am
>>> I.
>>> So, therefore just a very quick suggestion ...
>>>
>>> Check the code of spm_orthviews.m and look for the string
>>> "addtruecolourimage". There I think you'll find what you want.
>>>
>>> Then you want to call spm_orthviews from the command line, because
>>> the
>>> addtruecolourimage option is not bound to the context menu, AFAIK ...
>>>
>>> Also, make sure you create a split colormap, by using something like
>>> this:
>>>
>>> mycmap = colormap([gray(64); jet(64)]);
>>>
>>> Then you call spm_orthviews like this:
>>>
>>> retmap = 'retmap.img'; % or whatever you named it
>>> mx = 360; % maximum of data range in retmap.img
>>> mn = 0; % minimum of data range in retmap.img
>>>
>>> spm_orthviews('addtruecolourimage',1,retmap,mycmap,0.4,360,0);
>>>
>>> Cheers,
>>> Jan
>>>
>>>
>>>
>>> On 2005-01-11 (Tue) at 16:07:05 +0100, Torben Ellegaard Lund
>>> <[log in to unmask]> wrote:
>>>> Dear Volkmar
>>>>
>>>> Thanks for your suggestion I wish it was as simple a that. But in
>>>> check_reg you can only superimpose an image in different alpha
>>>> blends
>>>> of e.g. red this is of little use if you want to correlate an angle
>>>> to
>>>> a specific color. What I want is so superimpose an image in say
>>>> colormap(jet) onto a grayscale image. Much like what one gets in the
>>>> results section when choosing overlays sections, only I dont have a
>>>> statistic image rather an image of angles from a retinotopic
>>>> stimulation. I could of course use FSLview but that is almost too
>>>> easy!
>>>>
>>>> Best Torben
>>>>
>>>>
>>>>
>>>> Torben E. Lund
>>>> Danish Research Centre for MR
>>>> Copenhagen University Hospital
>>>> Kettegaard Allé 30
>>>> 2650 Hvidovre
>>>> Denmark
>>>> email: [log in to unmask]
>>>> webpage: http://www.drcmr.dk
>>>>
>>>> On 11 Jan 2005, at 15:33, Volkmar Glauche wrote:
>>>>
>>>>
>>>>> On Tue, 11 Jan 2005, Torben Ellegaard Lund wrote:
>>>>>
>>>>>
>>>>>> We have constructed some retinotopic maps and would like to
>>>>>> superimpose these
>>>>>> maps (e.g. values from 1 to 360 degrees in say colormap jet) on a
>>>>>> structural
>>>>>> image in grayscale. While this is possible on a slice-wise basis
>>>>>> using
>>>>>> display_slices, I was wondering how this could be done with
>>>>>> spm_orth_views?
>>>>>> Can anybody help?
>>>>>>
>>>>>
>>>>> Try the context menu that comes with each section of an image
>>>>> displayed
>>>>> with CheckReg. You can activate this context menu also in other
>>>>> orthogonal
>>>>> sections (Display, results overlays etc) by typing
>>>>>
>>>>> spm_orthviews addcontext
>>>>>
>>>>> at the matlab prompt when image is displayed.
>>>>>
>>>>> --
>>>>> Volkmar Glauche
>>>>> -
>>>>> Department of Neurology E-Mail [log in to unmask]
>>>>> UKE Hamburg Phone 49(0)40-42803-5781
>>>>> Martinistr. 52 Fax 49(0)40-42803-9955
>>>>> 20246 Hamburg
>>>>>
>>>>
>>>>
>>>
>>> --
>>> Jan Gläscher Neuroimage Nord
>>> +49-40-42803-7890 (office) Dept. of Neurology, Bldg S10
>>> +49-40-42803-9955 (fax) University Hospital
>>> Hamburg-Eppendorf
>>> [log in to unmask] Martinistr. 52
>>> 20246 Hamburg
>>> Germany
>>> http://www.uke.uni-hamburg.de/zentren/neuro/neurologie/mitarbeiter/
>>> glaescher_jan.html
>>> ---------------------------------------------------------------------
>>> -
>>> ----------------
>>> GnuPG/PGP key id: FEC4B55C
>>> fingerprint: 5A36 1EF6 8472 117E 805A F240 3146 A410 FEC4 B55C
>>> ---------------------------------------------------------------------
>>> -
>>> ----------------
>
>
>
> **********************************************************
> Electronic Mail is not secure, may not be read every day, and should
> not be used for urgent or sensitive issues.
|