📄 ge_series_read.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 ge_series_read</title> <meta name="keywords" content="ge_series_read"> <meta name="description" content="ge_series_read - reads a volume of images from a GE series"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="generator" content="m2html © 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> > <a href="index.html">mri_toolbox</a> > ge_series_read.m</div><!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png"> Master index</a></td><td align="right"><a href="index.html">Index for mri_toolbox <img alt=">" border="0" src="../right.png"></a></td></tr></table>--><h1>ge_series_read</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>ge_series_read - reads a volume of images from a GE series</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 [ ge, lastfile ] = ge_series_read(examPath, series) </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"> ge_series_read - reads a volume of images from a GE series
[ ge, lastfile ] = ge_series_read(examPath, seriesPath)
examPath - string path to exam directory
seriesPath - string path to series directory,
relative to examPath
reads the volume of files in seriesPath, which is stored
under examPath (it can return the name of the last file read).
The files are assumed to be arranged in series subdirectories
below the examPath, so series files would be located as such:
examPath/seriesN/*.MR or examPath/seriesN/I.*. The function
will try to find all *.MR or I.* files and determine the
correct numerical order of the image files.
The function assumes the GE files are big endian. This is
an example of the returned struct, where ge.img contains
the image volume data:
ge =
pix_hdr: [1x1 struct]
img.offset: 8432
su_hdr: [1x1 struct]
ex_hdr: [1x1 struct]
se_hdr: [1x1 struct]
hdr.image: [1x1 struct]
img: [256x256x11 double]
see also <a href="ge_hdr_read.html" class="code" title="function [ ge ] = ge_hdr_read(imageFileName)">ge_hdr_read</a>, <a href="ge_series2avw.html" class="code" title="function [ avw ] = ge_series2avw(examPath,seriesPath)">ge_series2avw</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)"><li><a href="ge_hdr_read.html" class="code" title="function [ ge ] = ge_hdr_read(imageFileName)">ge_hdr_read</a> ge_hdr_read - Reads the header info from a GE LX2 or 5.X file</li></ul>This function is called by:<ul style="list-style-image:url(../matlabicon.gif)"><li><a href="ge_series2avw.html" class="code" title="function [ avw ] = ge_series2avw(examPath,seriesPath)">ge_series2avw</a> ge_series2avw - converts a GE series to Analyze</li><li><a href="mri_open.html" class="code" title="function [mri] = mri_open(mri)">mri_open</a> mri_open - function to call various mri data tools</li></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 [ ge, lastfile ] = ge_series_read(examPath, series)</a>0002 0003 <span class="comment">% ge_series_read - reads a volume of images from a GE series</span>0004 <span class="comment">%</span>0005 <span class="comment">% [ ge, lastfile ] = ge_series_read(examPath, seriesPath)</span>0006 <span class="comment">%</span>0007 <span class="comment">% examPath - string path to exam directory</span>0008 <span class="comment">% seriesPath - string path to series directory,</span>0009 <span class="comment">% relative to examPath</span>0010 <span class="comment">%</span>0011 <span class="comment">% reads the volume of files in seriesPath, which is stored</span>0012 <span class="comment">% under examPath (it can return the name of the last file read).</span>0013 <span class="comment">%</span>0014 <span class="comment">% The files are assumed to be arranged in series subdirectories</span>0015 <span class="comment">% below the examPath, so series files would be located as such:</span>0016 <span class="comment">% examPath/seriesN/*.MR or examPath/seriesN/I.*. The function</span>0017 <span class="comment">% will try to find all *.MR or I.* files and determine the</span>0018 <span class="comment">% correct numerical order of the image files.</span>0019 <span class="comment">%</span>0020 <span class="comment">% The function assumes the GE files are big endian. This is</span>0021 <span class="comment">% an example of the returned struct, where ge.img contains</span>0022 <span class="comment">% the image volume data:</span>0023 <span class="comment">%</span>0024 <span class="comment">% ge =</span>0025 <span class="comment">%</span>0026 <span class="comment">% pix_hdr: [1x1 struct]</span>0027 <span class="comment">% img.offset: 8432</span>0028 <span class="comment">% su_hdr: [1x1 struct]</span>0029 <span class="comment">% ex_hdr: [1x1 struct]</span>0030 <span class="comment">% se_hdr: [1x1 struct]</span>0031 <span class="comment">% hdr.image: [1x1 struct]</span>0032 <span class="comment">% img: [256x256x11 double]</span>0033 <span class="comment">%</span>0034 <span class="comment">% see also ge_hdr_read, ge_series2avw</span>0035 <span class="comment">%</span>0036 0037 0038 <span class="comment">% $Revision: 1.4 $ $Date: 2004/02/07 01:41:51 $</span>0039 0040 <span class="comment">% Licence: GPL, no express or implied warranties</span>0041 <span class="comment">%</span>0042 <span class="comment">% Souheil J. Inati <souheil.inati@nyu.edu> at 03/2003</span>0043 <span class="comment">% Dartmouth College, May 2000</span>0044 <span class="comment">%</span>0045 <span class="comment">% Darren.Weber@flinders.edu.au, March 2003</span>0046 <span class="comment">% - Substantially redesigned file handling and function</span>0047 <span class="comment">% call structures for integration with mri_toolbox at</span>0048 <span class="comment">% http://eeg.sf.net</span>0049 <span class="comment">% - Requested permission to distribute code under GPL licence</span>0050 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0051 0052 0053 version = <span class="string">'[$Revision: 1.4 $]'</span>;0054 fprintf(<span class="string">'\nGE_SERIES_READ [v%s]\n'</span>,version(12:16)); tic;0055 0056 0057 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0058 <span class="comment">% --- Extract filenames and exam/series/image components</span>0059 0060 <span class="comment">% check if series is int</span>0061 <span class="keyword">if</span> isnumeric(series),0062 series = num2str(series);0063 <span class="keyword">end</span>0064 0065 seriesPath = [examPath,filesep,series,filesep];0066 0067 fprintf(<span class="string">'...searching for files in: %s\n'</span>,seriesPath);0068 0069 <span class="keyword">if</span> exist(seriesPath) ~= 7,0070 msg = sprintf(<span class="string">'...cannot find path: %s!\n'</span>,seriesPath);0071 error(msg);0072 <span class="keyword">end</span>0073
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -