diffMap

Purpose ^

matRad difference colormap

Synopsis ^

function colorMap = diffMap(cMapSize)

Description ^

 matRad difference colormap 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 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 = diffMap(cMapSize)
0002 % matRad difference colormap
0003 %
0004 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % Copyright 2015 the matRad development team.
0007 %
0008 % This file is part of the matRad project. It is subject to the license
0009 % terms in the LICENSE file found in the top-level directory of this
0010 % distribution and at https://github.com/e0404/matRad/LICENSES.txt. No part
0011 % of the matRad project, including this file, may be copied, modified,
0012 % propagated, or distributed except according to the terms contained in the
0013 % LICENSE file.
0014 %
0015 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0016 
0017 colorMapData = ...
0018     [0         0    1.0000
0019     0.0323    0.0323    1.0000
0020     0.0645    0.0645    1.0000
0021     0.0968    0.0968    1.0000
0022     0.1290    0.1290    1.0000
0023     0.1613    0.1613    1.0000
0024     0.1935    0.1935    1.0000
0025     0.2258    0.2258    1.0000
0026     0.2581    0.2581    1.0000
0027     0.2903    0.2903    1.0000
0028     0.3226    0.3226    1.0000
0029     0.3548    0.3548    1.0000
0030     0.3871    0.3871    1.0000
0031     0.4194    0.4194    1.0000
0032     0.4516    0.4516    1.0000
0033     0.4839    0.4839    1.0000
0034     0.5161    0.5161    1.0000
0035     0.5484    0.5484    1.0000
0036     0.5806    0.5806    1.0000
0037     0.6129    0.6129    1.0000
0038     0.6452    0.6452    1.0000
0039     0.6774    0.6774    1.0000
0040     0.7097    0.7097    1.0000
0041     0.7419    0.7419    1.0000
0042     0.7742    0.7742    1.0000
0043     0.8065    0.8065    1.0000
0044     0.8387    0.8387    1.0000
0045     0.8710    0.8710    1.0000
0046     0.9032    0.9032    1.0000
0047     0.9355    0.9355    1.0000
0048     0.9677    0.9677    1.0000
0049     1.0000    1.0000    1.0000
0050     1.0000    1.0000    1.0000
0051     1.0000    0.9677    0.9677
0052     1.0000    0.9355    0.9355
0053     1.0000    0.9032    0.9032
0054     1.0000    0.8710    0.8710
0055     1.0000    0.8387    0.8387
0056     1.0000    0.8065    0.8065
0057     1.0000    0.7742    0.7742
0058     1.0000    0.7419    0.7419
0059     1.0000    0.7097    0.7097
0060     1.0000    0.6774    0.6774
0061     1.0000    0.6452    0.6452
0062     1.0000    0.6129    0.6129
0063     1.0000    0.5806    0.5806
0064     1.0000    0.5484    0.5484
0065     1.0000    0.5161    0.5161
0066     1.0000    0.4839    0.4839
0067     1.0000    0.4516    0.4516
0068     1.0000    0.4194    0.4194
0069     1.0000    0.3871    0.3871
0070     1.0000    0.3548    0.3548
0071     1.0000    0.3226    0.3226
0072     1.0000    0.2903    0.2903
0073     1.0000    0.2581    0.2581
0074     1.0000    0.2258    0.2258
0075     1.0000    0.1935    0.1935
0076     1.0000    0.1613    0.1613
0077     1.0000    0.1290    0.1290
0078     1.0000    0.0968    0.0968
0079     1.0000    0.0645    0.0645
0080     1.0000    0.0323    0.0323
0081     1.0000         0         0];
0082 
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