matRad_computeVoiContours

Purpose ^

matRad function that computes all VOI contours

Synopsis ^

function cst = matRad_computeVoiContours(ct,cst)

Description ^

 matRad function that computes all VOI contours

 call
   cst = matRad_computeVoiContours(ct,cst)

 input
   ct  matRad ct struct
   cst matRad cst struct

 output
   cst the new cst with the column containing the precomputed contours

 References
   -

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 Copyright 2015 the matRad development team. 
 
 This file is part of the matRad project. It is subject to the license 
 terms in the LICENSE file found in the top-level directory of this 
 distribution and at https://github.com/e0404/matRad/LICENSES.txt. No part 
 of the matRad project, including this file, may be copied, modified, 
 propagated, or distributed except according to the terms contained in the 
 LICENSE file.

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Cross-reference information ^

This function calls: This function is called by:

Source code ^

0001 function cst = matRad_computeVoiContours(ct,cst)
0002 % matRad function that computes all VOI contours
0003 %
0004 % call
0005 %   cst = matRad_computeVoiContours(ct,cst)
0006 %
0007 % input
0008 %   ct  matRad ct struct
0009 %   cst matRad cst struct
0010 %
0011 % output
0012 %   cst the new cst with the column containing the precomputed contours
0013 %
0014 % References
0015 %   -
0016 %
0017 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0018 %
0019 % Copyright 2015 the matRad development team.
0020 %
0021 % This file is part of the matRad project. It is subject to the license
0022 % terms in the LICENSE file found in the top-level directory of this
0023 % distribution and at https://github.com/e0404/matRad/LICENSES.txt. No part
0024 % of the matRad project, including this file, may be copied, modified,
0025 % propagated, or distributed except according to the terms contained in the
0026 % LICENSE file.
0027 %
0028 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0029 
0030 matRad_cfg = MatRad_Config.instance();
0031 matRad_cfg.dispInfo('Precomputing Contours for Display... ');
0032 
0033 mask = zeros(ct.cubeDim); % create zero cube with same dimeonsions like dose cube
0034 for s = 1:size(cst,1)
0035     matRad_progress(s,size(cst,1));
0036     cst{s,7} = cell(max(ct.cubeDim(:)),3);
0037     mask(:) = 0;
0038     mask(cst{s,4}{1}) = 1;    
0039     for slice = 1:ct.cubeDim(1)
0040         if any(any(mask(slice,:,:) > 0))
0041              cst{s,7}{slice,1} = contourc(squeeze(mask(slice,:,:)),.5*[1 1]);
0042         end
0043     end
0044     for slice = 1:ct.cubeDim(2)
0045         if any(any(mask(:,slice,:) > 0))
0046              cst{s,7}{slice,2} = contourc(squeeze(mask(:,slice,:)),.5*[1 1]);
0047         end
0048     end
0049     for slice = 1:ct.cubeDim(3)
0050         if any(any(mask(:,:,slice) > 0))
0051              cst{s,7}{slice,3} = contourc(squeeze(mask(:,:,slice)),.5*[1 1]);
0052         end
0053     end
0054 end

| Generated by m2html © 2005