Before you start, Please read below very carefully.Tags: tutorialploteegmegecoglayout
Okay as we all know, the drivers are using specific helmet models in this years game.
I have put in many many hours putting this together mainly due to the fact that everything had to be re-mapped by hand so the textures would work correctly.
Still reading??? Good!
I have seperated all the models in the download folder.
Stage 1 (see pic above) is a 3D Photoshop file that has the visor, screws and all fins and vents removed, making it a cleaner model to design the base of the helmet on.
Stage 2 (see pic) is a model within the driver specific file which has the visor parts and fin added (if finned) this is to finish off your design on the fin once the base is done. You just drag this into an opened Photoshop program and open the layer in the palettes menu. Change the image size to your own desired size and paste your finished design onto this layer. Now you can finish off the design on the fin.
If Stage 2 helmets do not show with a rear fin, this is simply because it is transparent in the game so I have removed them in advance, same goes for the vents.
Stage 3 (see pic) is a full model to import into Keyshot or 3DS Max for those who use them. On this model I have left all the individual parts seperate, for greater control for things like gloss finish or matte finsh within the same model. Example main paint would be a gloss finish, whilst the cloth parts you may wish to leave as a matte finish. Also in game most if not all of the air vents are transparent, by me leaving the model in seperate parts, you can make these transparent for display purposes.
Also the Vettel helmet rear fin may not be 100% perfect...it was a beeyatch to map.
If you have got through this and read it all....well done!
I have also included the bespokehelmet model.
My templates are basically from last year, you may have to disable a few shading and parts layers for the driver helmets, but I have left the in the template for the use basically the bespoke helmet model.
This was the easiest solution I could come up with for the 20+ different helmet shapes being used this year.
Hope you use it wisely..took me long enough to put it together.
Let the helmet painting begin!!!
The 2D channel layout is a representation of the channel positions, together with the outline of the head or other anatomical features, that allows data to be plotted in a topographically consistent manner on a 2D computer screen (or piece of paper). The 2D channel layout is not an exact representation of the channel positions, just a projection for the purpose of visualization.
Constructing a layout
Many of the FieldTrip plotting functions use a 2D layout of the channels for plotting. The layout is a schematic 2D representation for displaying the data on the computer screen or in print on paper. The layout results from ft_prepare_layout and can be constructed from
- position of the sensor positions in 3D space
- existing (template) layout on disk
- photo or drawing of the sensor positions
- schematic representation
3D sensor positions
The geometrically most accurate layout representation can be obtained from a 3D representation of the sensor positions as a grad/elec/opto structure. However, projecting 3D sensor positions to a 2D plane always incurs distortion, especially at the edges where the surface is “bending” away from view. Consider for example how the North pole is distorted on a map of the world.
Template layout from disk
A template layout from disk is easy to use. Furthermore, it has the advantage that care has been taken to add an outline of geometric features (e.g. the ears and nose, or the outline of the MEG helmet) and that a well-fitting interpolation mask (i.e. the region in which the topoplot functions should interpolate) is present. For example the CTF helmet layouts looks much more realistic than what you would get by projecting the 3D sensors onto a 2D place and drawing a circle with nose and ears around it.
From a picture
If you do not have a measurement of the 3D positions of your sensors, but do have a 2D representation of the sensor array as picture, you can use that to make a layout. Schematic pictures of the electrode arrangements are often available from the website of the vendor of EEG systems or caps.
Schematic layout
Sometimes a schematic layout is more convenient, since it “flattens” the head and allows to see all channels better. In the case of iEEG (either sEEG and/or ECoG) electrodes, it can also save a lot of work to locate the electrodes in 3D as explained in the human iEEG tutorial. Furthermore, for sEEG electrodes it can be difficult to come up with a geometrically accurate representation of the channels in 2D space.
Making a layout for MEG sensors
Using a template layout
Since MEG sensors are in generally fixed in a rigid helmet inside the dewar, and since the arrangement of sensors is the same for all MEG systemsof the same type (e.g. CTT275, Neuromag306), it is not common to construct individual-subject MEG layouts. Instead, most people will simply use one of the template layouts.
For future OPM-based MEG systems it is more likely that MEG sensor layouts will differ from one subject to another subject. Constructing 2D layouts for OPM based systems can be done similar to the way that they are constructed for EEG systems. If you have the 3D description of the MEG sensors, you can also specify that as
cfg.grad
into ft_prepare_layout to make a 3D layout.Creating a layout from sensor positions
Customized MEG layouts can be useful to avoid the distortion due to the projection of sensors in 3D space. For example if you present auditory stimuli to both ears and want to compare the AEF responses on the left and right, you can use the following code to make a layout.
In a similar way you can make a layout that combines a left, right, top, front and back view of the MEG sensors in a fold-out arrangement.
For the Neuromag/Elekta/Megin MEG system - which consists of sensor-triplets with a combination of planar gradiometers in the horizontal direction, planar gradiometers in the vertical direction, and magnetometers - you can make a layout that separates the different channel types.
Since the magnetometers and planar gradiometers have different units (T and T/m), the magnitude of the channel level data is quite different. Combined plotting therefore requires that you scale the channels to a similar magnitude. FIXME
Making a layout for EEG electrodes
Using a template layout
Many labs use identical (or very similar) EEG caps. Consequently, the template EEG layouts included in FieldTrip cover many cases.
Creating a layout from 3D electrode positions
If you have recorded electrode positions, you can use the ft_prepare_layout function to make a layout by projecting the electrodes on the 2D plane.
Creating a layout from an image
You can also make a layout based on a bitmap image with the electrode arrangement. For example, the following image from the EasyCap website shows the equidistant M10 electrode arrangement.
You can specify cfg.image in ft_prepare_layout and subsequently click on the location of each electrode. After specifying each electrode location, you’ll be asked to specify the outlines of the head (i.e. the circle around the head, the nose and ears and optionally some lines representing other important landmarks). Finally you will have to specify the mask for the topographic interpolation, this is the same circle around the head (without ears and nose).
Making a layout for iEEG electrodes
Creating a layout from 3D electrode positions
The sEEG and ECoG electrodes can be localized in 3D from a CT and/or MRI scan as explained in the human iEEG tutorial. Following the electrode localization, you can make layouts using the orthographic projection method described in step 47 of that tutorial.
The procedure for anatomical coregistration and subsequent localizing of the electrodes explained in the ECoG and sEEG tutorial is based on the paper by Stolk, Griffin et al., Integrated analysis of anatomical and electrophysiological human intracranial data, Nature Protocols, 2018.
Creating a layout from an image
The placement of iEEG electrodes differs from one patient to the next patient. It is common that the neurosurgeon makes a sketch (on paper) of the electrode placement in relation to anatomical landmarks, such as the central sulcus. Or sometimes a surgical photo is taken of the EGoC grid that was just placed on the cortex (see for example Dalal et al. in Journal of Neuroscience Methods 174 (2008) 106–115)).
As in the EEG case, you can specify cfg.image in ft_prepare_layout and subsequently click on the location of each electrode. Instead of specifying the complete outline of the head as we usually do in EEG (as a circle), you may want to identify other important landmarks such as the major sulci and the outline of the trepanation.
You can also specify the mask for the topographic interpolation. If you have a large trepanation with multiple smaller grids without coverage in-between, you probably want to make a mask for the topographic interpolation around each grid, to avoid the ECoG potential from being interpolated in the gaps between the grids.
After creating the layout, you should check and/or manually assign the correct name of the channel labels in the label cell-array. Furthermore, you can place the SCALE and COMNT locations at a convenient place in the figure and modify the width and height of the boxes that are used for multiplotting. You can use ft_layoutplot for a visual inspection of the complete layout.
or including the original photo as black-and-white background image like this
Once you are happy with the result, you can save it to a MATLAB file like this:
The MATLAB file can subsequently be specified as cfg.layout=’layout_ecog.mat’ whenever you need a layout for plotting. Alternatively, you can load the layout in memory and specify the layout like cfg.layout=layout_ecog.
3d Layout Of A Helmet Pattern
The advantage of the MATLAB file over the ASCII file, is that the MATLAB file can also contain a user-specified outline of the head and user-specified mask, whereas for the ASCII layout file the same circle with nose and ears will be used.
Creating a schematic iEEG layout
Sometimes you want to construct an iEEG layout prior to doing the full anatomical pipeline, e.g. to check the iEEG data quality and/or whether the expected experimental effects are present in the functional data. You can use ft_prepare_layout in combination with the ft_appendlayout function.
A schematic layout can also be convenient, since it “flattens” the head and allows to see all channels better. Furthermore, for sEEG shafts it can be difficult to come up with a geometrically accurate representation of the electrode contacts in 2D space.
Creating a schematic layout for the sEEG shafts
3d Printable Helmet
The ft_prepare_layout function has the horizontal and vertical option for making an N*1 layout. For example
The direction of the electrode contacts along the shaft can be specified as ‘LR’(left-to-right) or RL for horizontal, and ‘TB’ (top-to-bottom) and ‘BT’ forvertical.
You can also use the raw or processed iEEG data to specify channel names. Forexample the dataset used in the ECoG and sEEG tutorial hassEEG electrode shafts that start with the letters LAM, LHH, LTH, RAM, RHH, RTH andROC. You can download the spectrally analyzed data from the FieldTrip ftp server(SubjectUCI29_freq.mat)and use the following
In the same way you can make layouts for all other shafts
You can combine the layouts using ft_appendlayout like this
And subsequently combine the left- and right-hemisphere layouts for the sEEG shafts with
Creating a schematic layout for the ECoG grids
The example dataset includes an 8x8 ECoG grid over the left parietal cortex, and a4x8 grid over the left temporal cortex, as displayed in this schematic drawing provided bythe neurosurgeon.
You can construct a layout for these ECoG grids by specifying ‘ordered’ and thenumber of rows and columns. The channel numbering starts in the upper right corner,hence we specify the direction ‘RLTB’ for right-left-top-bottom.
Combine the ECoG and sEEG layouts
We can now append the two ECoG grids vertically, and combine the layout of theECoG grids with the layout of the sEEG shafts.
Subsequently you can use the combined layout of the shafts and grids to visualize the results of the ERP or TFR analysis.
The figure created like this is interactive, like all multiplot figures, and youcan make a selection of channels using your mouse and subsequently select atime-frequency range for which a topopgraphy is shown. Please be aware that thetopoplot function will interpolate all channels as if they form a continuum. Theinterpolated values will only be shown withing the masked regions (the dashed linesin the layout plots) around each grid or shaft, but the interpolation will actuallycause the values of one shaft to spill over to the next.
The topographic interpretation of the color-coded interpolated values on the ECoG grids is quite OK (althoughbe aware of the interpolation artefacts where the two grids are close to each other),but the color-coded interpolated values on the shafts should be interpreted with caution.
Functions that make use of a 2D layout for visualization
Layouts are used in all 2D plotting functions in FieldTrip:
Furthermore, the ft_prepare_neighbours function allows you to specify a channel layout to determine neighboring channels. Please note that it is more accurate to determine neighbors from the 3D representation of the channel positions, you should only use the layout if you don’t have actual 3D channel positions.
The format of layout files
The layout is represented on disk in ASCII file with the extension .lay, or in MATLAB files that contain a variable with the name “layout” or “lay”. In general, MATLAB layout files are preferred since they allow a detailed specification of the outlines of the head shape (EEG) or helmet (MEG). For ASCII layout files a standard head shape that consists of a circle (for the head) with ears and the nose at the top will be drawn around the normalized channel positions.
Here is a small snippet of an ASCII layout file:
The format of the layout file is described in more detail in this frequently asked question.
- Used by architects, engineers, and other professionals, 3D CAD provides an extra dimension to precisely visualize and share designs.
- 3D modeling—using software to creating 3D models—is used broadly across many industries to visualize, simulate, and render graphic designs.
- Visual effects (VFX) artists create compelling effects, believable 3D characters, and stunning environments for film, TV, and games.
- Virtual reality (VR) replaces the real world with a simulated one in 3D, transforming a 2D design into an interactive, immersive digital model.
- Manufacturers and product designers use 3D design tools to design products, automobiles, factories, buildings, and industrial equipment.
- BIM (Building Information Modeling) is a 3D model-based process that helps professionals more efficiently plan, design, construct, and manage buildings and infrastructure.
- Generative design uses computer algorithms to make thousands of optimized designs, along with the data to prove which designs perform best.
- CAD/CAM uses computer software to both design a product and program manufacturing processes, specifically, CNC milling and machining.