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

📄 emse_mri2elec.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_mri2elec</title>  <meta name="keywords" content="emse_mri2elec">  <meta name="description" content="EMSE_MRI2ELEC - Convert mri coordinates to points in head frame">  <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_mri2elec.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_mri2elec</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>EMSE_MRI2ELEC - Convert mri coordinates to points in head frame</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_mri2elec(vert,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_MRI2ELEC - Convert mri coordinates to points in head frame
 
 [Velec] = emse_mri2elec(vert,reg)
 
 vert   - the Nx3 (X,Y,Z) MRI coordinates 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 MRI frame (eg, an fMRI activation 
 overlayed onto a high res T1 volume) this function will find 
 the corresponding location in the head space of the electrodes.
 Symbolically we have P(voxel) and want to find P(head).
 
 1.  Use the offset between the MRI coordinate frame and 
     the MRI volume coordinate frame to find P(MRI-voxel).
 2.  Given P(MRI-voxel) and the voxel size, we can find 
     P(MRI-mm), which is the MRI coordinates expressed in mm
 3.  The registration file contains the matrix ImageToHeadMatrix,
     so P(head) = P(MRI-mm)*reg.mri2elec, where P(MRI-mm) is the 
     point in MRI coordinates.
 
 This function performs the last calculation.
 
 See also: <a href="emse_open_reg.html" class="code" title="function [reg] = emse_open_reg(file)">EMSE_OPEN_REG</a>, <a href="emse_elec2mri.html" class="code" title="function [V] = emse_elec2mri(elec,reg)">EMSE_ELEC2MRI</a></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_mri2elec(vert,reg)</a>0002 0003 <span class="comment">% EMSE_MRI2ELEC - Convert mri coordinates to points in head frame</span>0004 <span class="comment">%</span>0005 <span class="comment">% [Velec] = emse_mri2elec(vert,reg)</span>0006 <span class="comment">%</span>0007 <span class="comment">% vert   - the Nx3 (X,Y,Z) MRI coordinates 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 MRI frame (eg, an fMRI activation</span>0012 <span class="comment">% overlayed onto a high res T1 volume) this function will find</span>0013 <span class="comment">% the corresponding location in the head space of the electrodes.</span>0014 <span class="comment">% Symbolically we have P(voxel) and want to find P(head).</span>0015 <span class="comment">%</span>0016 <span class="comment">% 1.  Use the offset between the MRI coordinate frame and</span>0017 <span class="comment">%     the MRI volume coordinate frame to find P(MRI-voxel).</span>0018 <span class="comment">% 2.  Given P(MRI-voxel) and the voxel size, we can find</span>0019 <span class="comment">%     P(MRI-mm), which is the MRI coordinates expressed in mm</span>0020 <span class="comment">% 3.  The registration file contains the matrix ImageToHeadMatrix,</span>0021 <span class="comment">%     so P(head) = P(MRI-mm)*reg.mri2elec, where P(MRI-mm) is the</span>0022 <span class="comment">%     point in MRI coordinates.</span>0023 <span class="comment">%</span>0024 <span class="comment">% This function performs the last calculation.</span>0025 <span class="comment">%</span>0026 <span class="comment">% See also: EMSE_OPEN_REG, EMSE_ELEC2MRI</span>0027 <span class="comment">%</span>0028 0029 <span class="comment">% $Revision: 1.6 $ $Date: 2004/02/07 01:41:51 $</span>0030 0031 <span class="comment">% Licence:  GNU GPL, no express or implied warranties</span>0032 <span class="comment">% History:  06/2002, Darren.Weber@flinders.edu.au</span>0033 <span class="comment">%                    EMSE details thanks to:</span>0034 <span class="comment">%                    Demetrios Voreades, Ph.D.</span>0035 <span class="comment">%                    Applications Engineer, Source Signal Imaging</span>0036 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0037 0038 fprintf(<span class="string">'EMSE_MRI2ELEC: In development. Be careful!\n'</span>);0039 0040 <span class="comment">% elec input is Nx3 matrix that should be represented</span>0041 <span class="comment">% in homogenous coordinates:</span>0042 vert = [ vert ones(size(vert,1),1) ];0043 0044 Velec = vert * reg.mri2elec;0045 0046 <span class="comment">% Note reg.Melec ~= Velec(:,1:3) due to floating point rounding only.</span>0047 0048 <span class="comment">% reg.mri2elec 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,</span>0057 <span class="comment">% the last column is projections (usually 0),</span>0058 <span class="comment">% and the value at 4,4 is the homogenous</span>0059 <span class="comment">% coordinate scale unit, usually 1.</span>0060 0061 <span class="comment">% In homogeneous coordinates, the last column</span>0062 <span class="comment">% is the scale factor, usually 1, but in case</span>0063 <span class="comment">% it is ~= 1</span>0064 V(:,1) = Velec(:,1) ./ Velec(:,4);0065 V(:,2) = Velec(:,2) ./ Velec(:,4);0066 V(:,3) = Velec(:,3) ./ Velec(:,4);0067 0068 <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 + -