Hello, is it possible to export the location of the surface- and invasive-electrode in coordinates according to ACPC-system? In the tutorials, I read that in general ACPC is somehow included in the brainstorm software, but how can I convert and export into ACPC-coordinates?
Thank you so much for your time and help!
Hi @ievamzi, indeed the conversion from SCS to ACPC coordinates is built in in Brainstorm.
While exporting data directly into files ACPC is not a GUI option, it is possible to do it by loading the MRI, Surface and Channel files into Matlab, as indicated below:
- Export MRI file as Matlab variable
sMri (right-click > File > Export to Matlab)
- Export Surface file as Matlab variable
sSurf
- Export Channel file as Matlab variable
sChannel
Convert Surface vertices from SCS to ACPC
VerticesAcpc = cs_convert(sMri, 'SCS', 'ACPC', sSurf.Vertices);
- Save those vertices in a format that satisfy your needs
- See the functions
out_tess_* in out_tess.m for various mesh files formats
Convert Channel locations from SCS to ACPC
ChannelAcpc = sChannel.Channel;
for iChannel = 1 : length(ChannelAcpc)
if ~isempty(ChannelAcpc(iChannel).Loc)
ChannelAcpc(iChannel).Loc = cs_convert(sMri, 'SCS', 'ACPC', ChannelAcpc(iChannel).Loc')';
end
end
- Save those channel locations in a format that satisfy your needs
- See the functions
out_channel_* in export_channel.m for various channel files formats
Thank you for your help!
I just wanted to clarify: the Surface file - do you mean the generated head mask or isoSurface?
That depends on what you need. All surfaces in Brainstorm are saved in SCS, so the procedure is the same for all of them.