📄 pvc_eqw.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 PVC_eqW</title> <meta name="keywords" content="PVC_eqW"> <meta name="description" content="Partial Volume Correction"> <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> > PVC_eqW.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>PVC_eqW</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>Partial Volume Correction</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 [pvc]=PVC_eqW(b,R,PSFx,PSFy,PSFz) </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"> Partial Volume Correction
Usage : [pvc]=PVC(b,R,PSFx,PSFy,PSFz)
Inputs
b = Measured PET Data (3d matrix) b(1:xdim,1:ydim,1:zdim) (b must be in counts/voxel)
R = ROI Definitions (4d binary matrix) R(1:xdim,1:ydim,1:zdim,1:no_regions)
PSFx = Matrix Point Spread Function in x Direction. The ith row is the kernel for the ith voxel.
PSFy = Matrix Point Spread Function in y Direction. The ith row is the kernel for the ith voxel.
PSFz = Matrix Point Spread Function in z Direction. The ith row is the kernel for the ith voxel.
Outputs
These are contained in the structure pvc
pvc.xm is the mean parameter estimate for the true activity concentrations in the ROIs
pvc.xv is contains the associated variance estimates
pvc.ROIsize is size of each region.
Tensor Implementation of the weighted least squares Partial Volume Correction Problem.
PSF values are for reconstructed voxel size of b. Each number represents the recovery
coefficient in the next voxel for a point source in position 1 of the vector.
This method applies equal weighting to each voxel
(c) Roger Gunn & John Aston, 26-02-2000</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 [pvc]=PVC_eqW(b,R,PSFx,PSFy,PSFz)</a>0002 0003 <span class="comment">% Partial Volume Correction</span>0004 <span class="comment">%</span>0005 <span class="comment">% Usage : [pvc]=PVC(b,R,PSFx,PSFy,PSFz)</span>0006 <span class="comment">%</span>0007 <span class="comment">% Inputs</span>0008 <span class="comment">% b = Measured PET Data (3d matrix) b(1:xdim,1:ydim,1:zdim) (b must be in counts/voxel)</span>0009 <span class="comment">% R = ROI Definitions (4d binary matrix) R(1:xdim,1:ydim,1:zdim,1:no_regions)</span>0010 <span class="comment">% PSFx = Matrix Point Spread Function in x Direction. The ith row is the kernel for the ith voxel.</span>0011 <span class="comment">% PSFy = Matrix Point Spread Function in y Direction. The ith row is the kernel for the ith voxel.</span>0012 <span class="comment">% PSFz = Matrix Point Spread Function in z Direction. The ith row is the kernel for the ith voxel.</span>0013 <span class="comment">%</span>0014 <span class="comment">% Outputs</span>0015 <span class="comment">% These are contained in the structure pvc</span>0016 <span class="comment">% pvc.xm is the mean parameter estimate for the true activity concentrations in the ROIs</span>0017 <span class="comment">% pvc.xv is contains the associated variance estimates</span>0018 <span class="comment">% pvc.ROIsize is size of each region.</span>0019 <span class="comment">%</span>0020 <span class="comment">% Tensor Implementation of the weighted least squares Partial Volume Correction Problem.</span>0021 <span class="comment">% PSF values are for reconstructed voxel size of b. Each number represents the recovery</span>0022 <span class="comment">% coefficient in the next voxel for a point source in position 1 of the vector.</span>0023 <span class="comment">%</span>0024 <span class="comment">% This method applies equal weighting to each voxel</span>0025 <span class="comment">%</span>0026 <span class="comment">% (c) Roger Gunn & John Aston, 26-02-2000</span>0027 0028 0029 pvc.xm=[];pvc.xv=[];0030 <span class="keyword">if</span> nargin~=5 disp(<span class="string">'Usage : [xm,xv]=PVC(b,R,PSFx,PSFy,PSFz)'</span>);<span class="keyword">return</span>;<span class="keyword">end</span>0031 <span class="keyword">if</span> length(size(R))~=4;disp(<span class="string">'Error: ROI matrix should be 4D'</span>);<span class="keyword">return</span>;<span class="keyword">end</span>0032 <span class="keyword">if</span> length(size(b))~=3;disp(<span class="string">'Error: b matrix should be 3D'</span>);<span class="keyword">return</span>;<span class="keyword">end</span>0033 <span class="keyword">if</span> size(R,4)<2;disp(<span class="string">'Error: There must be at least 1 ROI'</span>);<span class="keyword">return</span>;<span class="keyword">end</span>0034 <span class="keyword">if</span> sum(size(R)==[size(b) 0])~=3;disp(<span class="string">'Error: ROI and Image volume have different dimensions'</span>);<span class="keyword">return</span>;<span class="keyword">end</span>0035 <span class="keyword">if</span> sum(size(PSFx)~=size(b,1));disp(<span class="string">'Error: Check PSFx'</span>);<span class="keyword">return</span>;<span class="keyword">end</span>0036 <span class="keyword">if</span> sum(size(PSFy)~=size(b,2));disp(<span class="string">'Error: Check PSFy'</span>);<span class="keyword">return</span>;<span class="keyword">end</span>0037 <span class="keyword">if</span> sum(size(PSFz)~=size(b,3));disp(<span class="string">'Error: Check PSFz'</span>);<span class="keyword">return</span>;<span class="keyword">end</span>0038 <span class="keyword">if</span> (size(b,1)==1|size(b,2)==1|size(b,3)==1);disp(<span class="string">'Try a 3D Volume, It''s much nicer !'</span>);<span class="keyword">return</span>;<span class="keyword">end</span>0039 0040 [xdim ydim zdim] = size(b);0041 no_regions = size(R,4);0042 PSFz = PSFz';0043 0044 0045 <span class="comment">% Blur ROI's</span>0046 <span class="keyword">for</span> r=1:no_regions0047 fprintf(<span class="string">'.'</span>);0048 <span class="keyword">for</span> x=1:size(b,3);R(:,:,x,r)=PSFx(1:xdim,1:xdim)*squeeze(R(:,:,x,r));<span class="keyword">end</span>0049 <span class="keyword">for</span> y=1:size(b,1);R(y,:,:,r)=PSFy(1:ydim,1:ydim)*squeeze(R(y,:,:,r));<span class="keyword">end</span>0050 <span class="keyword">for</span> z=1:size(b,2);R(:,z,:,r)=squeeze(R(:,z,:,r))*PSFz(1:zdim,1:zdim);<span class="keyword">end</span>0051 <span class="keyword">end</span>0052 0053 <span class="comment">% xm = inv(R'P'PR)R'Pb</span>0054 PR = reshape(R,xdim*ydim*zdim,no_regions);0055 pvc.xm = inv(PR'*PR)*PR'*reshape(b,xdim*ydim*zdim,1);0056 pvc.xv = inv(PR'*PR)*sum((reshape(b,xdim*ydim*zdim,1)-PR*pvc.xm).^2)/(xdim*ydim*zdim-no_regions);0057 0058 pvc.xm=pvc.xm';0059 <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> © 2003</address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -