Print

Print


WOW. This is awesome!

Thanks a bazillion times! This will be super useful!

@+

Rémi



On 17/06/2019 14:34, Flandin, Guillaume wrote:
> Dear Remi,
>
> I slightly modified spm_mesh_contour to also be able to compute isolines
> as the underlying algorithm is actually the same, see attachment. The
> calling syntax might evolve but, for now, you can try it out with the
> following script:
>
> M = gifti(fullfile(spm('Dir'),'canonical','cortex_20484.surf.gii'));
> M = export(M,'patch');
> M = spm_mesh_inflate(M);
> T = randn(size(M.vertices,1),1);
> T = spm_mesh_smooth(M,T,100);
> H = spm_mesh_render('Disp',M);
> H = spm_mesh_render('Overlay',H,T);
> hold on
> t = linspace(min(T),max(T),20);
> for i=1:numel(t)
>    C = spm_mesh_contour(M,struct('T',T,'t',t(i)));
>    for j=1:numel(C)
>      plot3(C(j).xdata,C(j).ydata,C(j).zdata,'k-');
>    end
> end
>
> Best regards,
> Guillaume.
>
>
> On 01/06/2019 09:16, Remi gau wrote:
>> Hey SPMers,
>>
>> I have been playing around trying to figure out how display brain
>> activation on a brain surface render by having both the beta values and
>> the contour of the significant cluster.
>>
>> Ideally the end product would look something like the b in this figure
>> <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.sciencedirect.com%2Fscience%2Farticle%2Fpii%2FS089662731200428X%23fig3&data=02%7C01%7Cg.flandin%40UCL.AC.UK%7Cef9751f1a5624887844f08d6e66987b6%7C1faf88fea9984c5b93c9210a11d9a5c2%7C0%7C0%7C636949738268432184&sdata=EpveTKBnJ4GR2Ry2OvsrtW8XurOzi0krnwQXtAQBLuY%3D&reserved=0>
>> (*) but for surfaces.
>>
>> I suspect that this will involve using spm_mesh_render (or at least this
>> is what I have tried) but I am not entirely sure. Would fieldtrip be
>> better for this?
>>
>> @+
>>
>> Rémi
>>
>>
>> * no comment on the fact that a (good) paper on data vizualisation uses
>> a jetcolormap. :-)
>>