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

📄 emse_elec2mri.html

📁 mri_toolbox是一个工具用来MRI. 来自于SourceForge, 我上传这个软件,希望能结识对医疗软件感兴趣的兄弟.
💻 HTML
字号:
<!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_elec2mri</title>  <meta name="keywords" content="emse_elec2mri">  <meta name="description" content="EMSE_ELEC2MRI - Convert point in head frame to mri coordinates">  <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_elec2mri.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_elec2mri</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>EMSE_ELEC2MRI - Convert point in head frame to mri coordinates</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 [V] = emse_elec2mri(elec,reg) </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_ELEC2MRI - Convert point in head frame to mri coordinates
 
 [vert] = emse_elec2mri(elec,reg)
 
 elec   - the Nx3 (X,Y,Z) points in a head frame to be converted
 reg    - a structure containing coordinate transform matrices,
          which is read using emse_open_reg
 
 Given a point P(x,y,z) in head frame (eg, an activation point on a 
 cortical mesh) this function will find the corresponding voxel in a 
 vmi file.  Symbolically we have P(head) and want to find P(voxel).
 
 1.  The registration file contains the matrix HeadToImage,
     so P(MRI-mm) = P(head)*HeadToImage, where P(MRI-mm) is the 
     point in MRI coordinates.
 2.  From the voxel size, you can find P(MRI-voxel), which 
     is the MRI coordinates expressed in voxels
 3.  Use the offset between the MRI coordinate frame and 
     the Image coordinate frame to find P(voxel).</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="_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 [V] = emse_elec2mri(elec,reg)</a>0002 0003 <span class="comment">% EMSE_ELEC2MRI - Convert point in head frame to mri coordinates</span>0004 <span class="comment">%</span>0005 <span class="comment">% [vert] = emse_elec2mri(elec,reg)</span>0006 <span class="comment">%</span>0007 <span class="comment">% elec   - the Nx3 (X,Y,Z) points in a head frame to be converted</span>0008 <span class="comment">% reg    - a structure containing coordinate transform matrices,</span>0009 <span class="comment">%          which is read using emse_open_reg</span>0010 <span class="comment">%</span>0011 <span class="comment">% Given a point P(x,y,z) in head frame (eg, an activation point on a</span>0012 <span class="comment">% cortical mesh) this function will find the corresponding voxel in a</span>0013 <span class="comment">% vmi file.  Symbolically we have P(head) and want to find P(voxel).</span>0014 <span class="comment">%</span>0015 <span class="comment">% 1.  The registration file contains the matrix HeadToImage,</span>0016 <span class="comment">%     so P(MRI-mm) = P(head)*HeadToImage, where P(MRI-mm) is the</span>0017 <span class="comment">%     point in MRI coordinates.</span>0018 <span class="comment">% 2.  From the voxel size, you can find P(MRI-voxel), which</span>0019 <span class="comment">%     is the MRI coordinates expressed in voxels</span>0020 <span class="comment">% 3.  Use the offset between the MRI coordinate frame and</span>0021 <span class="comment">%     the Image coordinate frame to find P(voxel).</span>0022 <span class="comment">%</span>0023 0024 <span class="comment">% $Revision: 1.7 $ $Date: 2004/02/07 01:41:51 $</span>0025 0026 <span class="comment">% Licence:  GNU GPL, no express or implied warranties</span>0027 <span class="comment">% History:  06/2002, Darren.Weber@flinders.edu.au</span>0028 <span class="comment">%                    EMSE details thanks to:</span>0029 <span class="comment">%                    Demetrios Voreades, Ph.D.</span>0030 <span class="comment">%                    Applications Engineer, Source Signal Imaging</span>0031 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0032 0033 fprintf(<span class="string">'EMSE_ELEC2MRI: In development. Be careful!\n'</span>);0034 0035 <span class="comment">% elec input is Nx3 matrix that should be represented</span>0036 <span class="comment">% in homogenous coordinates:</span>0037 elec = [ elec ones(size(elec,1),1) ];0038 0039 <span class="comment">% 1.  The registration file contains the matrix HeadToImage,</span>0040 <span class="comment">%     so P(MRI) = HeadToImage*P(head), where P(MRI-mm) is the</span>0041 <span class="comment">%     point in MRI coordinates.</span>0042 0043 <span class="comment">% However, I've translated HeadToImage, so we now right-multiply,</span>0044 <span class="comment">% which is consistent with a text book account of the subject.</span>0045 0046 vert = elec * reg.elec2mri;0047 0048 <span class="comment">% reg.elec2mri is a 4x4 matrix, eg:</span>0049 <span class="comment">%</span>0050 <span class="comment">%  -0.9525    0.0452    0.3012         0</span>0051 <span class="comment">%  -0.0522   -0.9985   -0.0154         0</span>0052 <span class="comment">%   0.3000   -0.0304    0.9534         0</span>0053 <span class="comment">%  -0.1295    0.1299    0.0756    1.0000</span>0054 <span class="comment">%</span>0055 <span class="comment">% The first 3x3 cells are the rotations,</span>0056 <span class="comment">% the last row is the translations, and</span>0057 <span class="comment">% the last column is the scale, if any</span>0058 0059 <span class="comment">% In homogeneous coordinates, the last column</span>0060 <span class="comment">% is the scale factor, usually 1</span>0061 V(:,1) = vert(:,1) ./ vert(:,4);0062 V(:,2) = vert(:,2) ./ vert(:,4);0063 V(:,3) = vert(:,3) ./ vert(:,4);0064 0065 <span class="keyword">return</span></pre></div><hr><address>Generated on Fri 21-May-2004 12:38:21 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address></body></html>

⌨️ 快捷键说明

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