<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
Sorry if I was unclear Alex, with ‘figure 3’ I meant the first figure in your e-mail, i.e. the one which correctly uses the inverse of the transformation matrix, to express the fiducials in voxel coordinates, and then correctly updates the mri’s transformation
 matrix.
<div><br>
</div>
<div>Best wishes,</div>
<div>Jan-Mathijs</div>
<div><br id="lineBreakAtBeginningOfMessage">
<div><br>
<blockquote type="cite">
<div>On 15 Nov 2024, at 13:13, Alex Williams <alexanderwil2024@my.fit.edu> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div>
<table border="0" cellspacing="0" cellpadding="0" width="100%" style=" aspect-ratio: revert !important; background: revert !important; block-size: revert !important; border: revert !important; bottom: revert !important; color: revert !important; color-scheme: revert !important; content-visibility: revert !important; cursor: revert !important; direction: revert !important; display: revert !important; font-size: revert !important; height: revert !important; hyphens: revert !important; letter-spacing: revert !important; line-height: revert !important; margin: revert !important; opacity: revert !important; order: revert !important; outline: revert !important; overflow: revert !important; padding: revert !important; position: revert !important; resize: revert !important; rotate: revert !important; scale: revert !important; tab-size: revert !important; table-layout: revert !important; text-align: revert !important; text-indent: revert !important; text-orientation: revert !important; text-overflow: revert !important; text-shadow: revert !important; text-transform: revert !important; text-wrap: revert !important; top: revert !important; transition: revert !important; user-select: revert !important; vertical-align: revert !important; visibility: revert !important; white-space: revert !important; width: revert !important; word-break: revert !important; word-spacing: revert !important; writing-mode: revert !important; zoom: revert !important; cellpadding: 0 !important; border: 0 !important; cellspacing: 0 !important; display: table !important; width: 100% !important; table-layout: fixed !important; border-collapse: seperate !important; float: none !important; border-spacing: 0px 0px !important; " align="left">
<tbody style=" aspect-ratio: revert !important; background: revert !important; block-size: revert !important; border: revert !important; bottom: revert !important; color: revert !important; color-scheme: revert !important; content-visibility: revert !important; cursor: revert !important; direction: revert !important; display: revert !important; font-size: revert !important; height: revert !important; hyphens: revert !important; letter-spacing: revert !important; line-height: revert !important; margin: revert !important; opacity: revert !important; order: revert !important; outline: revert !important; overflow: revert !important; padding: revert !important; position: revert !important; resize: revert !important; rotate: revert !important; scale: revert !important; tab-size: revert !important; table-layout: revert !important; text-align: revert !important; text-indent: revert !important; text-orientation: revert !important; text-overflow: revert !important; text-shadow: revert !important; text-transform: revert !important; text-wrap: revert !important; top: revert !important; transition: revert !important; user-select: revert !important; vertical-align: revert !important; visibility: revert !important; white-space: revert !important; width: revert !important; word-break: revert !important; word-spacing: revert !important; writing-mode: revert !important; zoom: revert !important; display: block !important; ">
<tr style=" aspect-ratio: revert !important; background: revert !important; block-size: revert !important; border: revert !important; bottom: revert !important; color: revert !important; color-scheme: revert !important; content-visibility: revert !important; cursor: revert !important; direction: revert !important; display: revert !important; font-size: revert !important; height: revert !important; hyphens: revert !important; letter-spacing: revert !important; line-height: revert !important; margin: revert !important; opacity: revert !important; order: revert !important; outline: revert !important; overflow: revert !important; padding: revert !important; position: revert !important; resize: revert !important; rotate: revert !important; scale: revert !important; tab-size: revert !important; table-layout: revert !important; text-align: revert !important; text-indent: revert !important; text-orientation: revert !important; text-overflow: revert !important; text-shadow: revert !important; text-transform: revert !important; text-wrap: revert !important; top: revert !important; transition: revert !important; user-select: revert !important; vertical-align: revert !important; visibility: revert !important; white-space: revert !important; width: revert !important; word-break: revert !important; word-spacing: revert !important; writing-mode: revert !important; zoom: revert !important; ">
<td valign="middle" width="1px" bgcolor="#A6A6A6" cellpadding="7px 2px 7px 2px" style=" aspect-ratio: revert !important; background: revert !important; block-size: revert !important; border: revert !important; bottom: revert !important; color: revert !important; color-scheme: revert !important; content-visibility: revert !important; cursor: revert !important; direction: revert !important; display: revert !important; font-size: revert !important; height: revert !important; hyphens: revert !important; letter-spacing: revert !important; line-height: revert !important; margin: revert !important; opacity: revert !important; order: revert !important; outline: revert !important; overflow: revert !important; padding: revert !important; position: revert !important; resize: revert !important; rotate: revert !important; scale: revert !important; tab-size: revert !important; table-layout: revert !important; text-align: revert !important; text-indent: revert !important; text-orientation: revert !important; text-overflow: revert !important; text-shadow: revert !important; text-transform: revert !important; text-wrap: revert !important; top: revert !important; transition: revert !important; user-select: revert !important; vertical-align: revert !important; visibility: revert !important; white-space: revert !important; width: revert !important; word-break: revert !important; word-spacing: revert !important; writing-mode: revert !important; zoom: revert !important; padding: 7px 2px 7px 2px !important; background-color: #A6A6A6 !important; valign: middle !important; width: 0px !important; ">
</td>
<td valign="middle" width="100%" bgcolor="#EAEAEA" cellpadding="7px 5px 7px 15px" style=" aspect-ratio: revert !important; background: revert !important; block-size: revert !important; border: revert !important; bottom: revert !important; color: revert !important; color-scheme: revert !important; content-visibility: revert !important; cursor: revert !important; direction: revert !important; display: revert !important; font-size: revert !important; height: revert !important; hyphens: revert !important; letter-spacing: revert !important; line-height: revert !important; margin: revert !important; opacity: revert !important; order: revert !important; outline: revert !important; overflow: revert !important; padding: revert !important; position: revert !important; resize: revert !important; rotate: revert !important; scale: revert !important; tab-size: revert !important; table-layout: revert !important; text-align: revert !important; text-indent: revert !important; text-orientation: revert !important; text-overflow: revert !important; text-shadow: revert !important; text-transform: revert !important; text-wrap: revert !important; top: revert !important; transition: revert !important; user-select: revert !important; vertical-align: revert !important; visibility: revert !important; white-space: revert !important; width: revert !important; word-break: revert !important; word-spacing: revert !important; writing-mode: revert !important; zoom: revert !important; width: 100% !important; background-color: #EAEAEA !important; padding: 7px 5px 7px 15px !important; font-family: wf_segoe-ui_normal, Segoe UI, Segoe WP, Tahoma, Arial, sans-serif !important; font-size: 12px !important; font-weight: normal !important; color: #212121 !important; text-align: left !important; word-wrap: break-word !important; ">
<div style=" aspect-ratio: revert !important; background: revert !important; block-size: revert !important; border: revert !important; bottom: revert !important; color: revert !important; color-scheme: revert !important; content-visibility: revert !important; cursor: revert !important; direction: revert !important; display: revert !important; font-size: revert !important; height: revert !important; hyphens: revert !important; letter-spacing: revert !important; line-height: revert !important; margin: revert !important; opacity: revert !important; order: revert !important; outline: revert !important; overflow: revert !important; padding: revert !important; position: revert !important; resize: revert !important; rotate: revert !important; scale: revert !important; tab-size: revert !important; table-layout: revert !important; text-align: revert !important; text-indent: revert !important; text-orientation: revert !important; text-overflow: revert !important; text-shadow: revert !important; text-transform: revert !important; text-wrap: revert !important; top: revert !important; transition: revert !important; user-select: revert !important; vertical-align: revert !important; visibility: revert !important; white-space: revert !important; width: revert !important; word-break: revert !important; word-spacing: revert !important; writing-mode: revert !important; zoom: revert !important; ">
You don't often get email from alexanderwil2024@my.fit.edu. <a href="https://aka.ms/LearnAboutSenderIdentification" style="background: revert !important;color: revert !important;content-visibility: revert !important;direction: revert !important;display: revert !important;font-size: revert !important;opacity: revert !important;rotate: revert !important;scale: revert !important;visibility: revert !important;">
Learn why this is important</a> </div>
</td>
<td valign="middle" align="left" width="75px" bgcolor="#EAEAEA" cellpadding="7px 5px 7px 5px" style=" aspect-ratio: revert !important; background: revert !important; block-size: revert !important; border: revert !important; bottom: revert !important; color: revert !important; color-scheme: revert !important; content-visibility: revert !important; cursor: revert !important; direction: revert !important; display: revert !important; font-size: revert !important; height: revert !important; hyphens: revert !important; letter-spacing: revert !important; line-height: revert !important; margin: revert !important; opacity: revert !important; order: revert !important; outline: revert !important; overflow: revert !important; padding: revert !important; position: revert !important; resize: revert !important; rotate: revert !important; scale: revert !important; tab-size: revert !important; table-layout: revert !important; text-align: revert !important; text-indent: revert !important; text-orientation: revert !important; text-overflow: revert !important; text-shadow: revert !important; text-transform: revert !important; text-wrap: revert !important; top: revert !important; transition: revert !important; user-select: revert !important; vertical-align: revert !important; visibility: revert !important; white-space: revert !important; width: revert !important; word-break: revert !important; word-spacing: revert !important; writing-mode: revert !important; zoom: revert !important; width: 75px !important; background-color: #EAEAEA !important; padding: 7px 5px 7px 5px !important; font-family: wf_segoe-ui_normal, Segoe UI, Segoe WP, Tahoma, Arial, sans-serif !important; font-size: 12px !important; font-weight: normal !important; color: #212121 !important; text-align: left !important; word-wrap: break-word !important; align: left !important; ">
</td>
</tr>
</tbody>
</table>
<div>
<div dir="auto">
<div>Hi Jan-Mathijs,
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">   Thanks so much for your response! So the third image uses both volumerealigns but uses a non-inverted transform from mriread. The only image that uses only one call to volumerealign applying the fiducial method is image two, but it applies
 an inverted transform from mriread. But was hoping to confirm that the third image would be the best for coregistration in this case. </div>
<div dir="auto"><br>
</div>
<div dir="auto">-Alex</div>
<div dir="auto"><br>
</div>
<br>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Nov 15, 2024, 05:32 Schoffelen, J.M. (Jan Mathijs) via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="line-break:after-white-space">Hi Alex,
<div><br>
</div>
<div>To be honest, I have the impression that what you plotted in ‘figure 3’ makes sense.</div>
<div><br>
</div>
<div>The other ones don’t make sense, because the sensors are expressed in neuromag space (I assume) so the ‘brain’ needs to be brought into neuromag space as well, which is what you do with your first call to ft_volumerealign. Unless I am missing something.</div>
<div><br>
</div>
<div><br>
</div>
<div>Best wishes,</div>
<div>Jan-Mathijs<br id="m_8005329100694820415lineBreakAtBeginningOfMessage">
<div><br>
<blockquote type="cite">
<div>On 14 Nov 2024, at 19:26, Alex Williams via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" target="_blank" rel="noreferrer">fieldtrip@science.ru.nl</a>> wrote:</div>
<br>
<div>
<div dir="ltr">Hi there FieldTrip community,
<div><br>
</div>
<div>  I was curious if anyone would be familiar with an issue I came across within my study. I'm currently using an lcmv beamformer for source reconstruction of several subjects within the CamCan data set using their MEEG data. Right now, I'm currently looking
 back into the process of coregistration once more. The meeg data and headshape data I have use neuromag coordinates and I believe the coordinates of the fiducials are in voxel-coordinates. For all of the subjects, I get a coregistered orientation that seems
 to be tilted relative to the sensor array.</div>
<div><br>
</div>
<div> I'm unsure if this would be the correct orientation based on what I've seen from previous head model orientations. However, since I'm unfamiliar with how the head would be oriented within a neuromag system, I was wondering if there was any way to confirm
 that this orientation would be correct or if there may be something that needs to be rectified in the code for proper orientation. </div>
<div><br>
</div>
<div>Here is the code I used for coregistration to acquire the image above:<br>
<br>
<div style="padding:30px">
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><span style="color:rgb(0,128,19)">%% Realign Coord Sys.</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><span style="color:rgb(14,0,255)">function </span>
mrialign=coregistration(Path1,Path2,mriread,S,job)</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">addpath <span style="color:rgb(167,9,245)">/Users/alexanderwil2024/MATLAB-Drive/Research/MATLAB code/Beamformer Pipeline</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg=[];</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">headshape=ft_read_headshape([Path1 Path2]);</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">headshape=ft_convert_coordsys(headshape,<span style="color:rgb(167,9,245)">'neuromag'</span>);</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">vox2vox = inv(mriread.transform);</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">nas_voxel_mriread = ft_warp_apply(vox2vox, headshape.fid.pos(2,:),
<span style="color:rgb(167,9,245)">'homogenous'</span>); <span style="color:rgb(0,128,19)">
% nasion</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">lpa_voxel_mriread = ft_warp_apply(vox2vox, headshape.fid.pos(1,:),
<span style="color:rgb(167,9,245)">'homogenous'</span>); <span style="color:rgb(0,128,19)">
% Left preauricular</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">rpa_voxel_mriread = ft_warp_apply(vox2vox, headshape.fid.pos(3,:),
<span style="color:rgb(167,9,245)">'homogenous'</span>); <span style="color:rgb(0,128,19)">
% Right preauricular</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><br>
</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg=[];</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">nas1=nas_voxel_mriread; </span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">lpa1=lpa_voxel_mriread; </span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">rpa1=rpa_voxel_mriread;</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.fiducial.nas=nas1; </span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.fiducial.lpa=lpa1;</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.fiducial.rpa=rpa1; </span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.coordsys=<span style="color:rgb(167,9,245)">'neuromag'</span>;</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.method=<span style="color:rgb(167,9,245)">'fiducial'</span>;</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">mrialign = ft_volumerealign(cfg, mriread);</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">ft_sourceplot([],mrialign);</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><br>
</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg=[];</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.method=<span style="color:rgb(167,9,245)">'headshape'</span>;</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.spmversion=<span style="color:rgb(167,9,245)">'spm12'</span>;</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.headshape.headshape=headshape;</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.headshape.interactive = <span style="color:rgb(167,9,245)">
'no'</span>;</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">mrialign=ft_volumerealign(cfg, mrialign);</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><br>
</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><span style="color:rgb(0,128,19)">% ********FOR VISUALIZING CO-REGISTRATION: IMPORTANT FOR FIDUCIALS!!!</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><span style="color:rgb(0,128,19)">% cfg=[];</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><span style="color:rgb(0,128,19)">% cfg.method='headshape';</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><span style="color:rgb(0,128,19)">% cfg.spmversion='spm12';</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><span style="color:rgb(0,128,19)">% cfg.headshape.headshape=headshape;</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><span style="color:rgb(0,128,19)">% cfg.headshape.interactive = 'yes';</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><span style="color:rgb(0,128,19)">% ft_volumerealign(cfg, mrialign);</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><span style="color:rgb(0,128,19)"><br>
</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg=[];</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.parameter=<span style="color:rgb(167,9,245)">'anatomy'</span>;</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.filename=[<span style="color:rgb(167,9,245)">'/Volumes/My Book/coreg_mri_niftis/mrialign '</span>,S,<span style="color:rgb(167,9,245)">' for job '</span>,job];</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">cfg.filetype=<span style="color:rgb(167,9,245)">'nifti'</span>;</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">ft_volumewrite(cfg,mrialign);</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
</div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">close <span style="color:rgb(167,9,245)">all</span></span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap">o=1;</span></div>
<div style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace">
<span style="white-space:pre-wrap"><span style="color:rgb(14,0,255)">end</span></span></div>
</div>
  In this code, mriread refers to the subject's raw MRI nifti data after being read in. tably, after the first use of volumerealign within the code to apply the fiducials from the mri nifti (mrialign = ft_volumerealign(cfg, mriread)), I use it again to apply
 a headshape-based method. I obtain this sagitally tilted positioning when using this setup:</div>
<div><br>
</div>
<div><span id="m_8005329100694820415cid:ii_m3hm5z504"><Both volumerealigns.png></span><br>
</div>
<div><br>
</div>
<div>  For additional reference, if I were to only use the first instance of the volumerealign function to apply the fiducials to mriread without using the second instance to apply the headshape method, I would obtain this coregistered model, which seem properly
 oriented but slightly removed from the sensor array:<br>
<br>
<span id="m_8005329100694820415cid:ii_m3hlls3j3"><Only fiducial volumerealign.png></span></div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="line-break:after-white-space">
<div>
<div>
<blockquote type="cite">
<div>
<div dir="ltr">
<div><br>
Additionally, the vox2vox transform matrix inverts mriread's transform matrix to create the following coregistered positions. However, when the vox2vox transform doesn't use the inverted transform (vox2vox =mriread.transform) and applies the full code with
 both volumerealign methods, it leads to a coronally tilted positioning:<br>
<br>
<span id="m_8005329100694820415cid:ii_m3hmjvov5"><image.png></span><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>-Alex</div>
<div><br>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C96c0a6c5167a471866a708dd05713214%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638672705901496422%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=dF9Kp2cG%2FJt0Zx7NXoyBx6kPF7j9bEdOnXhgB3dF7DY%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="YOorCOEvxjl+2CMZ/2Y5G7yu8mxhtKXaVgd73K07iTjI4zEHFXRwYz37rSJ4eMKJhYgCOr6068XFMygw1lG5q+x/GhUzWr+yMyQm5gjg7U3c2a7D2UHLisj8SoSDdIf6QqoiQEqQM+giDFzB8unP1zWnJc0cfeE12HUbhOtVY7w=" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="RJmuBjCKpkTk+paPJSt2bsYbr/AeN88/jL8Tm3aR9rNKSe9JeRFRueYeCXXt0l4G7miyh7BMkGHFgXeq9AWSnwGXs4+cTdcjPwXLImSHr3pNf0QWz23qsH9sQIQflMa0cbNPr6DFVxzSDjHw2eztGLDz0Pjn6JyogYBazWpYgEs=" target="_blank" rel="noreferrer">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C96c0a6c5167a471866a708dd05713214%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638672705901652665%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=NIJnAxgGiaiUu4eEoxvjvgtSS2C%2BsxCNoQDzvx7P8Mk%3D&reserved=0" originalsrc="https://doi.org/10.1371/journal.pcbi.1002202" shash="T43jmxvrdj4+xw9NmXPwbjRj2HohOkf/Q6YDCw1AsulNq7b7GeVB7wLzJcVIPAp0iL7Io5yrnKSJeIsck152G32L/zusY6YsXpvqa8dWcIfh7ysnfWBJw0Uk5S32sxPbKa0qDtpU6DY2wvMDzc3qSz9RF0lNSoQXw8/SnT8i0iI=" originalsrc="https://doi.org/10.1371/journal.pcbi.1002202" shash="vQm57D9FfxQ54rzk4r3RZDeosVV7W4TniJUQLFb/Mne/8pfoO5uOmXSftbtx3D5+ANZY2sj51Ydid0SV56n1HCp4fvg+8/1uFupI5V1g5sxAKlSekyuHxsTFpYnSINfxFtEZA35N87Dj7bVRqblXHKYBQSY1J/ukJE9Irgxdg6M=" target="_blank" rel="noreferrer">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C96c0a6c5167a471866a708dd05713214%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638672705901652665%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=J89fCc2hy19y7SLxubJebs5gKfW%2FYJUBUM6kg7m7J0s%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="eVP+toChzxxPFkdona1J1l8MTZhK8DB5+zOTy/PhEY53LYvNhseFtYzv25S88wJDR5H/z7hgL5+yxt04bwX1Kj6M60+3iLuzYw+nN+DKA+ZC1jPIWlkh6aENURgBcZQRfORMdYA4RJihF3Q4ptYuqNmUpdPiRmPbQpUTB2mK4zQ=" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="jOUvI47PjEwpl/Qe1QgCdt7CwKXvUHw+fN/1Wh/9iqsW8Y8OU4gPQOPcRl0DmvMFdMokP3WURB63LGPOtHIJ54XdK4u/wuPqZh3c1zIpav5ILO14lAdtvZ2LfkmoBUkofJ0kad20yGSNdyQUS6MDPTj6HlzY9ur6pfuB/yDpMuA=" rel="noreferrer noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C96c0a6c5167a471866a708dd05713214%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638672705901652665%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=NIJnAxgGiaiUu4eEoxvjvgtSS2C%2BsxCNoQDzvx7P8Mk%3D&reserved=0" originalsrc="https://doi.org/10.1371/journal.pcbi.1002202" shash="T43jmxvrdj4+xw9NmXPwbjRj2HohOkf/Q6YDCw1AsulNq7b7GeVB7wLzJcVIPAp0iL7Io5yrnKSJeIsck152G32L/zusY6YsXpvqa8dWcIfh7ysnfWBJw0Uk5S32sxPbKa0qDtpU6DY2wvMDzc3qSz9RF0lNSoQXw8/SnT8i0iI=" originalsrc="https://doi.org/10.1371/journal.pcbi.1002202" shash="Z42BNvonXZOhofblG3j9rDO5wk/02o29DeagSHUIYoTfq2zzX/sxc+zJvBQqmp6aVFS5yKQbf8TUuNTlrd1bKmh1DYoCSjprhOtYCqqCfmJfCaigMb/jz8a82T0iDu3SApN440+Bn937K2MrqZBkGuhdPhF5C6UHapJz9F+DxAQ=" rel="noreferrer noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</body>
</html>