Doxygen Source Code Documentation
MakeColorMap.m File Reference
Go to the source code of this file.
Functions | |
the function will suggest a good number closest to the one you chose Such a mighty function Opt is a structure containing the following fields | Range (225/1) This specifies if RGB values are specified%in both Fiducials and M form 0-255(integers)%or 0-1 floats.%.SkipLast(0/1) if set to 0 |
the function will suggest a good number closest to the one you chose Such a mighty function Opt is a structure containing the following fields then the last color specified in Fiducials is the last color in M If set the last color in M represents the color that would come right before the last one in Fifucials This last option is usefull when you re crating cyclical color maps where the last color in Fiduciasl is like the first | Showme (0/1) optional parameter to show a display of the map%.Write optional string.If supplied |
if (~isfield(Opt,'Range')|~isfield(Opt,'SkipLast')) | |
fprintf (2, 'Error%s:Range or SkipLast fields missing.\n', FuncName) | |
end | if (~isfield(Opt,'verbose')) |
end | if (~isfield(Opt,'Write')) |
else | if (filexist(Opt.Write)) |
return end end | if (~isfield(Opt,'Showme')) |
end | if (size(Fiducials, 2)~=3) |
return end | if (size(Fiducials, 1) > Ncols) |
if (~isempty(tmp)) | |
number of fiducial colours | if (~Opt.SkipLast) |
if (Npergap~=round(Npergap)) | |
if (Opt.SkipLast) Ncolsgood | |
for (i=1:1:Ngap) | |
if (Fiducials(i, 1)~=Fiducials(i+1, 1)) | |
end | if (Fiducials(i, 2)~=Fiducials(i+1, 2)) |
end | if (Fiducials(i, 3)~=Fiducials(i+1, 3)) |
if (i< Ngap|~Opt.SkipLast) | |
M (im:im2,:) | |
else | M (im:im2-1,:) |
end | colormap (Mrgb) |
image ([1:1:length(Mrgb(:, 1))]) | |
pie (ones(1, length(Mrgb(:, 1)))) | |
end | if (~isempty(Opt.Write)) |
end | wryte2 (M, 3, Opt.Write,'on') |
Variables | |
function [err, M] | |
the function will suggest a good number closest to the one you chose Such a mighty function Opt is a structure containing the following fields then the last color specified in Fiducials is the last color in M If set | to |
the function will suggest a good number closest to the one you chose Such a mighty function Opt is a structure containing the following fields then the last color specified in Fiducials is the last color in M If set the last color in M represents the color that would come right before the last one in Fifucials This last option is usefull when you re crating cyclical color maps where the last color in Fiduciasl is like the first M is written to the file specified by Write Output | Parameters |
the function will suggest a good number closest to the one you chose Such a mighty function Opt is a structure containing the following fields then the last color specified in Fiducials is the last color in M If set the last color in M represents the color that would come right before the last one in Fifucials This last option is usefull when you re crating cyclical color maps where the last color in Fiduciasl is like the first M is written to the file specified by Write Output default is More | Info |
Opt | Range = 255 |
Opt | SkipLast = 1 |
Opt | Write = '' |
you ll | get [err, M] = MakeColorMap (Fiducials,7,Opt) |
M | |
and ScaleToMap | Author |
initailize return variables | err = 1 |
return | |
end Opt | verbose = 0 |
return end end Opt | Showme = 1 |
return end Check for some weird input | tmp = find (Fiducials < 0) |
serr = sprintf('Err_Values in Fiducials should not exceed Opt.Range (%g).',Opt.Range) | |
Nfid = size (Fiducials,1) | |
number of fiducial colours | Ninter = Ncols - Nfid |
end | Ngap = Nfid - 1 |
total number of gaps to fill You must have an equal number of colours in each gap | Npergap = Ninter ./ Ngap |
else | Ncolsgood = round(Npergap) .* Ngap + Nfid |
end Start forming M | cnt = 0 |
im = 1 | |
M1 = linspace(Fiducials(i,1),Fiducials(i+1,1),Npergap+2)' | |
end | M2 = linspace(Fiducials(i,2),Fiducials(i+1,2),Npergap+2)' |
end | M3 = linspace(Fiducials(i,3),Fiducials(i+1,3),Npergap+2)' |
end | im2 = im+Npergap+1 |
end | figure |
Mrgb = M ./ 255 | |
subplot |
Function Documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Variable Documentation
|
Definition at line 53 of file MakeColorMap.m. |
|
Definition at line 143 of file MakeColorMap.m. |
|
Definition at line 199 of file MakeColorMap.m. |
|
|
|
Initial value: MakeColorMap (Fiducials,Ncols,Opt) % % [err,M] = MakeColorMap (Fiducials,Ncols,Opt) % %Purpose: % returns the RGB colormap containing Ncols that vary linearily % from the first color in Fiducials to the last. % %Input Parameters: % Fiducials : Nx3 matix specifying the RGB values (0-255) or % (0-1) depending on the value of Opt.Range. Those % fiducial colours will be equally spaced on the map % Ncols : Total number of colours in the map % You are somewhat restricted in the total number of % colours you choose. You must choose a number that % allows you to have the same number of colours between % each successive fiducials. Do not worry Definition at line 1 of file MakeColorMap.m. |
|
Definition at line 52 of file MakeColorMap.m. |
|
|
Definition at line 165 of file MakeColorMap.m. Referenced by main(), mri_2dalign_one(), mri_2dalign_setup(), mri_align_dfspace(), and TFIM_getopts(). |
|
Definition at line 37 of file MakeColorMap.m. |
|
Initial value: % % 255 0 0 % 128 128 0 % 0 255 0 % 0 128 128 % 0 0 255 % 128 0 128 % 255 0 0 % % see also rgbdectohex Definition at line 178 of file MakeColorMap.m. |
|
Definition at line 149 of file MakeColorMap.m. |
|
Definition at line 155 of file MakeColorMap.m. |
|
Definition at line 161 of file MakeColorMap.m. |
|
Definition at line 186 of file MakeColorMap.m. |
|
Definition at line 136 of file MakeColorMap.m. Referenced by SUMA_MakeColorMap(). |
|
Definition at line 121 of file MakeColorMap.m. Referenced by SUMA_MakeColorMap(), and SUMA_MakeColorMap_v2(). |
|
Definition at line 129 of file MakeColorMap.m. Referenced by SUMA_MakeColorMap(). |
|
Definition at line 126 of file MakeColorMap.m. Referenced by SUMA_MakeColorMap(). |
|
Definition at line 132 of file MakeColorMap.m. Referenced by SUMA_MakeColorMap(). |
|
Definition at line 37 of file MakeColorMap.m. |
|
Definition at line 41 of file MakeColorMap.m. Referenced by SUMA_ScaleToMap_Interactive(). |
|
Definition at line 200 of file MakeColorMap.m. |
|
Definition at line 137 of file MakeColorMap.m. Referenced by RCREND_state_to_widgets(), REND_state_to_widgets(), SUMA_IV_FaceSetsextract(), and SUMA_IV_XYZextract(). |
|
Definition at line 95 of file MakeColorMap.m. |
|
Definition at line 41 of file MakeColorMap.m. Referenced by SUMA_MakeColorMap(), and SUMA_MakeColorMap_v2(). |
|
Definition at line 191 of file MakeColorMap.m. |
|
Definition at line 112 of file MakeColorMap.m. |
|
|
|
Definition at line 87 of file MakeColorMap.m. |