gammaIndex

Purpose ^

matRad gamma index colormap

Synopsis ^

function colorMap = gammaIndex(cMapSize)

Description ^

 matRad gamma index colormap  

 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 colorMap = gammaIndex(cMapSize)
0002 % matRad gamma index colormap
0003 %
0004 % References
0005 %   -
0006 %
0007 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0008 %
0009 % Copyright 2015 the matRad development team.
0010 %
0011 % This file is part of the matRad project. It is subject to the license
0012 % terms in the LICENSE file found in the top-level directory of this
0013 % distribution and at https://github.com/e0404/matRad/LICENSES.txt. No part
0014 % of the matRad project, including this file, may be copied, modified,
0015 % propagated, or distributed except according to the terms contained in the
0016 % LICENSE file.
0017 %
0018 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0019 colorMapData = [  0.2081    0.1663    0.5292
0020                     0.2336    0.1932    0.5444
0021                     0.2592    0.2201    0.5596
0022                     0.2847    0.2470    0.5748
0023                     0.3103    0.2739    0.5899
0024                     0.3358    0.3008    0.6051
0025                     0.3614    0.3277    0.6203
0026                     0.3869    0.3546    0.6355
0027                     0.4125    0.3814    0.6507
0028                     0.4380    0.4083    0.6659
0029                     0.4636    0.4352    0.6811
0030                     0.4891    0.4621    0.6963
0031                     0.5146    0.4890    0.7114
0032                     0.5402    0.5159    0.7266
0033                     0.5657    0.5428    0.7418
0034                     0.5913    0.5697    0.7570
0035                     0.6168    0.5966    0.7722
0036                     0.6424    0.6235    0.7874
0037                     0.6679    0.6504    0.8026
0038                     0.6935    0.6773    0.8178
0039                     0.7190    0.7042    0.8329
0040                     0.7445    0.7311    0.8481
0041                     0.7701    0.7580    0.8633
0042                     0.7956    0.7849    0.8785
0043                     0.8212    0.8117    0.8937
0044                     0.8467    0.8386    0.9089
0045                     0.8723    0.8655    0.9241
0046                     0.8978    0.8924    0.9393
0047                     0.9234    0.9193    0.9544
0048                     0.9489    0.9462    0.9696
0049                     0.9745    0.9731    0.9848
0050                     1.0000    1.0000    1.0000
0051                     1.0000    1.0000         0
0052                     1.0000    0.9677         0
0053                     1.0000    0.9355         0
0054                     1.0000    0.9032         0
0055                     1.0000    0.8710         0
0056                     1.0000    0.8387         0
0057                     1.0000    0.8065         0
0058                     1.0000    0.7742         0
0059                     1.0000    0.7419         0
0060                     1.0000    0.7097         0
0061                     1.0000    0.6774         0
0062                     1.0000    0.6452         0
0063                     1.0000    0.6129         0
0064                     1.0000    0.5806         0
0065                     1.0000    0.5484         0
0066                     1.0000    0.5161         0
0067                     1.0000    0.4839         0
0068                     1.0000    0.4516         0
0069                     1.0000    0.4194         0
0070                     1.0000    0.3871         0
0071                     1.0000    0.3548         0
0072                     1.0000    0.3226         0
0073                     1.0000    0.2903         0
0074                     1.0000    0.2581         0
0075                     1.0000    0.2258         0
0076                     1.0000    0.1935         0
0077                     1.0000    0.1613         0
0078                     1.0000    0.1290         0
0079                     1.0000    0.0968         0
0080                     1.0000    0.0645         0
0081                     1.0000    0.0323         0
0082                     1.0000         0         0];
0083 if nargin < 1
0084     colorMap = colorMapData;
0085 elseif size(colorMapData,1) == cMapSize
0086     colorMap = colorMapData;
0087 else
0088     %We have to interpolate the colormap
0089     newX = linspace(1,64,cMapSize);
0090     oldX = 1:64;
0091     colorMap = interp1(oldX,colorMapData,newX);
0092     %{
0093     %resample via HSV.. more color-true than above, but doesn't work with
0094     %every colormap
0095     hsv                        = rgb2hsv(cm);
0096     hsv(144:end,1)             = hsv(144:end,1)+1;
0097     ColorMap                   = interp1(linspace(0,1,size(cm,1)),hsv,linspace(0,1,cMapSize));
0098     ColorMap(cm(:,1)>1,1) = ColorMap(cm(:,1)>1,1)-1;
0099     ColorMap                   = hsv2rgb(cm);
0100     %}
0101 end
0102 
0103 end
0104

| Generated by m2html © 2005