[FieldTrip] plotting open brain on source level

Xavier Vrijdag x.vrijdag at auckland.ac.nz
Thu Aug 11 23:11:31 CEST 2022


Hi Philip,

I created the following script to create the four images on the outside of your figure.


    % plot the t values on the brain surface in 4 planes

    PlotNames={'left lateral' 'left sagittal' 'right lateral' 'right sagittal'};

    for p=1:4

        cfg = [];

        cfg.method        = 'surface';

        cfg.projmethod = 'project';

        cfg.projvec = [0 5];

        if ismember(p,[1 2])

            cfg.surffile = [FIELDTRIPDIR '/template/anatomy/surface_white_left.mat'];

        else

            cfg.surffile = [FIELDTRIPDIR '/template/anatomy/surface_white_right.mat'];

        end

        cfg.funparameter  = 'stat';

        cfg.maskparameter = 'mask';

        cfg.opacitylim = [0 1];

        cfg.funcolorlim   = 'maxabs';

        cfg.camlight ='off';

        cfg.figurename    = [PlotNames{p}];

        ft_sourceplot(cfg, stat{a});



        %mirror image over x-axis

        if ismember(p,[1 3])

            set(gca, 'xdir', 'reverse')

        end



        % rotate image to show the wanted image

        if ismember(p,[3,4])

            view ([270,0])

        else

            view ([90 0])

        end



        camlight %apply lighting on the image side on view

        print(['sourceresults/' cfg.figurename '.pdf'], '-dpdf', '-fillpage');

    end

I am not sure if this will help solving your problem. I haven’t figured out a way to get them into 1 figure.

Regards,

Xavier

From: fieldtrip <fieldtrip-bounces at science.ru.nl> on behalf of philip Joadavi via fieldtrip <fieldtrip at science.ru.nl>
Reply to: FieldTrip discussion list <fieldtrip at science.ru.nl>
Date: Thursday, 11 August 2022 at 9:56 PM
To: FieldTrip discussion list <fieldtrip at science.ru.nl>
Cc: philip Joadavi <p.joadavi at gmail.com>
Subject: [FieldTrip] plotting open brain on source level

Dear all,

I want to plot my beamforming results similar to the figure below, with both the medial and lateral sides of each hemisphere.

I would appreciate it if you could let me know if I can plot it using FieldTrip.

[cid:image001.png at 01D8AE2B.7ACECE70]


Best,
Philip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220811/9610381d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 87555 bytes
Desc: image001.png
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220811/9610381d/attachment.png>


More information about the fieldtrip mailing list