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

📄 avw_hdr_make.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 avw_hdr_make</title>  <meta name="keywords" content="avw_hdr_make">  <meta name="description" content="AVW_HDR_MAKE - Create Analyze format data header (avw.hdr)">  <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; avw_hdr_make.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>avw_hdr_make</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>AVW_HDR_MAKE - Create Analyze format data header (avw.hdr)</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 [ avw ] = avw_hdr_make </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"> AVW_HDR_MAKE - Create Analyze format data header (avw.hdr)
 
 [ avw ] = avw_hdr_make
 
 avw.hdr - a struct, all fields returned from the header.
           For details, find a good description on the web
           or see the Analyze File Format pdf in the 
           mri_toolbox doc folder or see avw_hdr_read.m
 
 See also, <a href="avw_hdr_read.html" class="code" title="function [ avw, machine ] = avw_hdr_read(fileprefix, machine)">AVW_HDR_READ</a> <a href="avw_hdr_write.html" class="code" title="function avw_hdr_write(avw, fileprefix, machine)">AVW_HDR_WRITE</a>           <a href="avw_img_read.html" class="code" title="function [ avw, machine ] = avw_img_read(fileprefix,IMGorient,machine)">AVW_IMG_READ</a> <a href="avw_img_write.html" class="code" title="function avw_img_write(avw, fileprefix, IMGorient, machine)">AVW_IMG_WRITE</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)"><li><a href="avw_hdr_write.html" class="code" title="function avw_hdr_write(avw, fileprefix, machine)">avw_hdr_write</a>	AVW_HDR_WRITE - Write Analyze header file (*.hdr)</li><li><a href="cor2avw.html" class="code" title="function [ avw, machine ] = cor2avw(path,machine)">cor2avw</a>	cor2avw - Read Freesurfer MRI data (COR-001 to COR-256)</li><li><a href="cor_img_read.html" class="code" title="function [ avw, machine ] = cor_img_read(path,machine)">cor_img_read</a>	COR_IMG_READ - Read Freesurfer format data (COR-001 to COR-256)</li><li><a href="ge_hdr2avw.html" class="code" title="function [ avw ] = ge_hdr2avw(ge)">ge_hdr2avw</a>	ge_hdr2avw - extract Analyze header from ge struct</li></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 [ hdr ] = make_header</a></li><li><a href="#_sub2" class="code">function [hk] = header_key</a></li><li><a href="#_sub3" class="code">function [ dime ] = image_dimension</a></li><li><a href="#_sub4" class="code">function [ hist ] = data_history</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 [ avw ] = avw_hdr_make</a>0002 0003 <span class="comment">% AVW_HDR_MAKE - Create Analyze format data header (avw.hdr)</span>0004 <span class="comment">%</span>0005 <span class="comment">% [ avw ] = avw_hdr_make</span>0006 <span class="comment">%</span>0007 <span class="comment">% avw.hdr - a struct, all fields returned from the header.</span>0008 <span class="comment">%           For details, find a good description on the web</span>0009 <span class="comment">%           or see the Analyze File Format pdf in the</span>0010 <span class="comment">%           mri_toolbox doc folder or see avw_hdr_read.m</span>0011 <span class="comment">%</span>0012 <span class="comment">% See also, AVW_HDR_READ AVW_HDR_WRITE</span>0013 <span class="comment">%           AVW_IMG_READ AVW_IMG_WRITE</span>0014 <span class="comment">%</span>0015 0016 <span class="comment">% $Revision: 1.8 $ $Date: 2004/02/07 01:41:51 $</span>0017 0018 <span class="comment">% Licence:  GNU GPL, no express or implied warranties</span>0019 <span class="comment">% History:  06/2002, Darren.Weber@flinders.edu.au</span>0020 <span class="comment">%           02/2003, Darren.Weber@flinders.edu.au</span>0021 <span class="comment">%                    date/time bug at lines 97-98</span>0022 <span class="comment">%                    identified by Bennett.Landman@ieee.org</span>0023 <span class="comment">%</span>0024 <span class="comment">%                    The Analyze format is copyright</span>0025 <span class="comment">%                    (c) Copyright, 1986-1995</span>0026 <span class="comment">%                    Biomedical Imaging Resource, Mayo Foundation</span>0027 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0028 0029 version = <span class="string">'[$Revision: 1.8 $]'</span>;0030 fprintf(<span class="string">'\nAVW_HDR_MAKE [v%s]\n'</span>,version(12:16));  tic;0031 0032 0033 <span class="comment">% Comments</span>0034 <span class="comment">% The header format is flexible and can be extended for new</span>0035 <span class="comment">% user-defined data types. The essential structures of the header</span>0036 <span class="comment">% are the header_key and the image_dimension.  See avw_hdr_read</span>0037 <span class="comment">% for more detail of the header structure</span>0038 avw.hdr = <a href="#_sub1" class="code" title="subfunction [ hdr ] = make_header">make_header</a>;0039 0040 t=toc; fprintf(<span class="string">'...done (%5.2f sec).\n'</span>,t);0041 0042 <span class="keyword">return</span>0043 0044 0045 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0046 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0047 <a name="_sub1" href="#_subfunctions" class="code">function [ hdr ] = make_header</a>0048     0049     hdr.hk   = <a href="#_sub2" class="code" title="subfunction [hk] = header_key">header_key</a>;0050     hdr.dime = <a href="#_sub3" class="code" title="subfunction [ dime ] = image_dimension">image_dimension</a>;0051     hdr.hist = <a href="#_sub4" class="code" title="subfunction [ hist ] = data_history">data_history</a>;0052     0053 <span class="keyword">return</span>0054 0055 0056 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0057 <a name="_sub2" href="#_subfunctions" class="code">function [hk] = header_key</a>0058     0059     hk.sizeof_hdr       = int32(348);   <span class="comment">% must be 348!</span>0060     hk.data_type(1:10)  = sprintf(<span class="string">'%10s'</span>,<span class="string">''</span>);0061     hk.db_name(1:18)    = sprintf(<span class="string">'%18s'</span>,<span class="string">''</span>);0062     hk.extents          = int32(16384);0063     hk.session_error    = int16(0);0064     hk.regular          = sprintf(<span class="string">'%1s'</span>,<span class="string">'r'</span>);  <span class="comment">% might be uint8</span>0065     hk.hkey_un0         = uint8(0);0066     0067 <span class="keyword">return</span>0068 0069 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0070 <a name="_sub3" href="#_subfunctions" class="code">function [ dime ] = image_dimension</a>0071     0072     dime.dim(1:8)       = int16([4 256 256 256 1 0 0 0]);0073     dime.vox_units(1:4) = sprintf(<span class="string">'%4s'</span>,<span class="string">'mm'</span>);0074     dime.cal_units(1:8) = sprintf(<span class="string">'%8s'</span>,<span class="string">''</span>);0075     dime.unused1        = int16(0);0076     dime.datatype       = int16(2);0077     dime.bitpix         = int16(8);0078     dime.dim_un0        = int16(0);0079     dime.pixdim(1:8)    = single([0 1 1 1 1000 0 0 0]);0080     dime.vox_offset     = single(0);0081     dime.funused1       = single(0);0082     dime.funused2       = single(0);0083     <span class="comment">% Set default 8bit intensity scale (from MRIcro), otherwise funused3</span>0084     dime.roi_scale      = single(1);0085     dime.cal_max        = single(0);0086     dime.cal_min        = single(0);0087     dime.compressed     = int32(0);0088     dime.verified       = int32(0);0089     dime.glmax          = int32(255);0090     dime.glmin          = int32(0);0091     0092 <span class="keyword">return</span>0093 0094 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0095 <a name="_sub4" href="#_subfunctions" class="code">function [ hist ] = data_history</a>0096     0097     datime = clock;0098     0099     hist.descrip(1:80)      = sprintf(<span class="string">'%-80s'</span>,<span class="string">'mri_toolbox @ http://eeg.sf.net/'</span>);0100     hist.aux_file(1:24)     = sprintf(<span class="string">'%-24s'</span>,<span class="string">''</span>);0101     hist.orient             = uint8(0); <span class="comment">% sprintf( '%1s',''); % see notes in avw_hdr_read</span>0102     hist.originator(1:10)   = sprintf(<span class="string">'%-10s'</span>,<span class="string">''</span>);0103     hist.generated(1:10)    = sprintf(<span class="string">'%-10s'</span>,<span class="string">'mri_toolbx'</span>);0104     hist.scannum(1:10)      = sprintf(<span class="string">'%-10s'</span>,<span class="string">''</span>);0105     hist.patient_id(1:10)   = sprintf(<span class="string">'%-10s'</span>,<span class="string">''</span>);0106     hist.exp_date(1:10)     = sprintf(<span class="string">'%02d-%02d-%04d'</span>,datime(3),datime(2),datime(1));0107     hist.exp_time(1:10)     = sprintf(<span class="string">'%02d-%02d-%04.1f'</span>,datime(4),datime(5),datime(6));0108     hist.hist_un0(1:3)      = sprintf( <span class="string">'%-3s'</span>,<span class="string">''</span>);0109     hist.views              = int32(0);0110     hist.vols_added         = int32(0);0111     hist.start_field        = int32(0);0112     hist.field_skip         = int32(0);0113     hist.omax               = int32(0);0114     hist.omin               = int32(0);0115     hist.smax               = int32(0);0116     hist.smin               = int32(0);0117     0118 <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 + -