⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 emse_open_reg.html

📁 mri_toolbox是一个工具用来MRI. 来自于SourceForge, 我上传这个软件,希望能结识对医疗软件感兴趣的兄弟.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"                "http://www.w3.org/TR/REC-html40/loose.dtd"><html><head>  <title>Description of emse_open_reg</title>  <meta name="keywords" content="emse_open_reg">  <meta name="description" content="EMSE_OPEN_REG - Read EMSE/MRVU coregistration matrices">  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">  <meta name="robots" content="index, follow">  <link type="text/css" rel="stylesheet" href="../m2html.css"></head><body><a name="_top"></a><div><a href="../index.html">Home</a> &gt;  <a href="index.html">mri_toolbox</a> &gt; emse_open_reg.m</div><!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td><td align="right"><a href="index.html">Index for mri_toolbox&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>--><h1>emse_open_reg</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>EMSE_OPEN_REG - Read EMSE/MRVU coregistration matrices</strong></div><h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>function [reg] = emse_open_reg(file) </strong></div><h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="fragment"><pre class="comment"> EMSE_OPEN_REG - Read EMSE/MRVU coregistration matrices
 
 [reg] = emse_open_reg(file)

 reg is a struct with the following fields:

 reg.translation - the translation in meters along the
                   x, y and z axes respectively, from 
                   the MRI image frame to head/elec frame.
 
 reg.rotation - The rotation vector contains the angles
                (in radians) about the x, y and z axes, 
                also from the MRI image frame to the 
                head/elec frame.
 
 reg.elec2mri - 'HeadToImageMatrix' is the 4 x 4 matrix 
                containing the electrode to MRI translation and 
                rotation transformations in homogeneous coordinates:
                * the upper left 3 x 3 submatrix is rotations
                  around z, y, x in that order;
                * the rightmost 3 x 1 column is a projection 
                  vector (all zeros here);
                * the bottom 1 x 3 row is a translation vector,
                  equal to -1 * reg.translation here; and
                * the bottom right (1 x 1) scalar is the 
                  homogenous scale unit, usually 1
 
 reg.mri2elec - 'ImageToHeadMatrix' is the inverse of elec2mri,
                ie, reg.mri2elec = inv(reg.elec2mri).
 
 This function also reads the fiducial points and the electrode
 coordinates from the registration file, they are returned into:
 reg.RPA, reg.LPA, reg.NAS, reg.Helec, and reg.Melec.  Each of
 the fiducial structs (RPA,LPA,NAS) contains the electrode
 fiducials in the head space (Hh) and the MRI space (Hm), plus the
 MRI fiducials in the head space (Mh) and the MRI space (Mm).
 
 The transformation matrices (T) multiply a column vector, so that 
 [x', y', z', 1] = [x, y, z, 1] * T;
 where x',y',z' are in the other coordinate system. For example,
 MRI coordinates into head space:
 tmp = [ reg.Melec ones(size(reg.Melec,1),1) ] * reg.mri2elec;
 Note reg.Helec ~= tmp(:,1:3) due to floating point rounding only.
 Similarly, head space (electrodes) into MRI coordinates:
 tmp = [ reg.Helec ones(size(reg.Helec,1),1) ] * reg.elec2mri;
 Note reg.Melec ~= tmp(:,1:3) due to floating point rounding only.
 
 EMSE Note: The origin in the head frame is at or near the center of 
 the skull, while the origin in the image frame is located at the 
 bottom right front corner of the bounding box (and so would be 
 located at the upper left corner of the first axial slice as 
 displayed by MR Viewer).
 
 A useful chapter on homogeneous coordinates, among other things, 
 may be found in Mortenson, M. (1985, Chpt. 8), Geometric Modelling, 
 New York: John Wiley &amp; Sons.</pre></div><!-- crossreference --><h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>This function calls:<ul style="list-style-image:url(../matlabicon.gif)"></ul>This function is called by:<ul style="list-style-image:url(../matlabicon.gif)"></ul><!-- crossreference --><h2><a name="_subfunctions"></a>SUBFUNCTIONS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><ul style="list-style-image:url(../matlabicon.gif)"><li><a href="#_sub1" class="code">function [reg] = read_reg(fid)</a></li></ul><h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [reg] = emse_open_reg(file)</a>0002 0003 <span class="comment">% EMSE_OPEN_REG - Read EMSE/MRVU coregistration matrices</span>0004 <span class="comment">%</span>0005 <span class="comment">% [reg] = emse_open_reg(file)</span>0006 <span class="comment">%</span>0007 <span class="comment">% reg is a struct with the following fields:</span>0008 <span class="comment">%</span>0009 <span class="comment">% reg.translation - the translation in meters along the</span>0010 <span class="comment">%                   x, y and z axes respectively, from</span>0011 <span class="comment">%                   the MRI image frame to head/elec frame.</span>0012 <span class="comment">%</span>0013 <span class="comment">% reg.rotation - The rotation vector contains the angles</span>0014 <span class="comment">%                (in radians) about the x, y and z axes,</span>0015 <span class="comment">%                also from the MRI image frame to the</span>0016 <span class="comment">%                head/elec frame.</span>0017 <span class="comment">%</span>0018 <span class="comment">% reg.elec2mri - 'HeadToImageMatrix' is the 4 x 4 matrix</span>0019 <span class="comment">%                containing the electrode to MRI translation and</span>0020 <span class="comment">%                rotation transformations in homogeneous coordinates:</span>0021 <span class="comment">%                * the upper left 3 x 3 submatrix is rotations</span>0022 <span class="comment">%                  around z, y, x in that order;</span>0023 <span class="comment">%                * the rightmost 3 x 1 column is a projection</span>0024 <span class="comment">%                  vector (all zeros here);</span>0025 <span class="comment">%                * the bottom 1 x 3 row is a translation vector,</span>0026 <span class="comment">%                  equal to -1 * reg.translation here; and</span>0027 <span class="comment">%                * the bottom right (1 x 1) scalar is the</span>0028 <span class="comment">%                  homogenous scale unit, usually 1</span>0029 <span class="comment">%</span>0030 <span class="comment">% reg.mri2elec - 'ImageToHeadMatrix' is the inverse of elec2mri,</span>0031 <span class="comment">%                ie, reg.mri2elec = inv(reg.elec2mri).</span>0032 <span class="comment">%</span>0033 <span class="comment">% This function also reads the fiducial points and the electrode</span>0034 <span class="comment">% coordinates from the registration file, they are returned into:</span>0035 <span class="comment">% reg.RPA, reg.LPA, reg.NAS, reg.Helec, and reg.Melec.  Each of</span>0036 <span class="comment">% the fiducial structs (RPA,LPA,NAS) contains the electrode</span>0037 <span class="comment">% fiducials in the head space (Hh) and the MRI space (Hm), plus the</span>0038 <span class="comment">% MRI fiducials in the head space (Mh) and the MRI space (Mm).</span>0039 <span class="comment">%</span>0040 <span class="comment">% The transformation matrices (T) multiply a column vector, so that</span>0041 <span class="comment">% [x', y', z', 1] = [x, y, z, 1] * T;</span>0042 <span class="comment">% where x',y',z' are in the other coordinate system. For example,</span>0043 <span class="comment">% MRI coordinates into head space:</span>0044 <span class="comment">% tmp = [ reg.Melec ones(size(reg.Melec,1),1) ] * reg.mri2elec;</span>0045 <span class="comment">% Note reg.Helec ~= tmp(:,1:3) due to floating point rounding only.</span>0046 <span class="comment">% Similarly, head space (electrodes) into MRI coordinates:</span>0047 <span class="comment">% tmp = [ reg.Helec ones(size(reg.Helec,1),1) ] * reg.elec2mri;</span>0048 <span class="comment">% Note reg.Melec ~= tmp(:,1:3) due to floating point rounding only.</span>0049 <span class="comment">%</span>0050 <span class="comment">% EMSE Note: The origin in the head frame is at or near the center of</span>0051 <span class="comment">% the skull, while the origin in the image frame is located at the</span>0052 <span class="comment">% bottom right front corner of the bounding box (and so would be</span>0053 <span class="comment">% located at the upper left corner of the first axial slice as</span>0054 <span class="comment">% displayed by MR Viewer).</span>0055 <span class="comment">%</span>0056 <span class="comment">% A useful chapter on homogeneous coordinates, among other things,</span>0057 <span class="comment">% may be found in Mortenson, M. (1985, Chpt. 8), Geometric Modelling,</span>0058 <span class="comment">% New York: John Wiley &amp; Sons.</span>0059 <span class="comment">%</span>0060 0061 0062 <span class="comment">% $Revision: 1.7 $ $Date: 2004/02/07 01:41:51 $</span>0063 0064 <span class="comment">% Licence:  GNU GPL, no express or implied warranties</span>0065 <span class="comment">% History:  06/2002, Darren.Weber@flinders.edu.au</span>0066 <span class="comment">%           09/2002, Darren.Weber@flinders.edu.au</span>0067 <span class="comment">%                    - transposed HeadToImageMatrix so it</span>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -