matRad_plotIsoDose3D

Purpose ^

matRad function that plots isolines in 3d

Synopsis ^

function hpatch = matRad_plotIsoDose3D(axesHandle,xMesh,yMesh,zMesh,doseCube,isoLevels,cMap,window,alpha)

Description ^

 matRad function that plots isolines in 3d

 call
   hpatch = matRad_plotIsoDose3D(axesHandle,xMesh,yMesh,zMesh,doseCube,isoLevels,cMap,window,alpha)

 input
   axesHandle  handle to axes the slice should be displayed in
   x/y/zMesh   meshs
   doseCube    dose cube
   isoLevels   levels for computation
   cMap        colormap
   window      window for dose display
   alpha       transparency

 output
   hpatch: handle to the patch object

 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 hpatch = matRad_plotIsoDose3D(axesHandle,xMesh,yMesh,zMesh,doseCube,isoLevels,cMap,window,alpha)
0002 % matRad function that plots isolines in 3d
0003 %
0004 % call
0005 %   hpatch = matRad_plotIsoDose3D(axesHandle,xMesh,yMesh,zMesh,doseCube,isoLevels,cMap,window,alpha)
0006 %
0007 % input
0008 %   axesHandle  handle to axes the slice should be displayed in
0009 %   x/y/zMesh   meshs
0010 %   doseCube    dose cube
0011 %   isoLevels   levels for computation
0012 %   cMap        colormap
0013 %   window      window for dose display
0014 %   alpha       transparency
0015 %
0016 % output
0017 %   hpatch: handle to the patch object
0018 %
0019 % References
0020 %   -
0021 %
0022 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0023 %
0024 % Copyright 2015 the matRad development team.
0025 %
0026 % This file is part of the matRad project. It is subject to the license
0027 % terms in the LICENSE file found in the top-level directory of this
0028 % distribution and at https://github.com/e0404/matRad/LICENSES.txt. No part
0029 % of the matRad project, including this file, may be copied, modified,
0030 % propagated, or distributed except according to the terms contained in the
0031 % LICENSE file.
0032 %
0033 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0034 
0035 matRad_cfg = MatRad_Config.instance();
0036 
0037 if nargin < 9
0038     alpha = 0.1;
0039 end
0040 
0041 if nargin < 8
0042     window = [min(doseCube(:)) max(doseCube(:))];
0043 end
0044 
0045 if nargin < 7
0046     cMap = jet(64);
0047 end
0048 
0049 if nargin < 6
0050     isoLevels = linspace(window(1),window(2),5);
0051 end
0052 
0053 cMapScale = size(cMap,1) - 1;
0054 
0055 isoColorLevel = uint8(cMapScale*(isoLevels - window(1))./(window(2)-window(1)));
0056 
0057 %This circumenvents a bug in Octave when the index in the image hase the maximum value of uint8
0058 if matRad_cfg.isOctave
0059     isoColorLevel(isoColorLevel == 255) = 254;
0060 end
0061 
0062 colors = squeeze(ind2rgb(isoColorLevel,cMap));
0063 
0064 for isoValIx = 1:numel(isoLevels)
0065     hpatch = patch(axesHandle,isosurface(xMesh,yMesh,zMesh,doseCube,isoLevels(isoValIx)));
0066     reducepatch(hpatch);
0067     isonormals(xMesh,yMesh,zMesh,doseCube,hpatch);
0068     hpatch.FaceColor = colors(isoValIx,:);
0069     hpatch.EdgeColor = 'none';
0070     hpatch.FaceAlpha = alpha;
0071 end
0072 end
0073

| Generated by m2html © 2005