Code covered by the BSD License  

Highlights from
Volume Browser, Release 1.03

image thumbnail
from Volume Browser, Release 1.03 by Eike Rietsch
GUI for visualization of data volumes via slices, contour lines, isosurfaces, and animation.

contour_edgecolor_callback(h, eventdata, handles) %#ok Used by callback
function contour_edgecolor_callback(h, eventdata, handles) %#ok Used by callback
% Edge color has been changed

% Modified by E. Rietsch: October 15, 2006
%

% Parameters
color_list={'m','c','r','g','b','w','k','-','none','flat','interp','-','custom'};

% Auslesen von edgecolor
edgecolor=get(handles.contour_edgecolor,'Value');

% Ermitteln ob Custom Color... gewhlt
if strcmp(color_list{edgecolor},'custom')
    % UISETCOLOR aufrufen
    newcolor=uisetcolor;
    if size(newcolor,2)==3
        set(handles.contour_edgecolor,'userdata',newcolor);
    else
        % Ansonsten interp
        set(handles.contour_edgecolor,'Value',11);
        set(handles.contour_edgecolor,'userdata','interp');
    end
else
    % Rausfiltern der Trennlinien
    if ~strcmp(color_list{edgecolor},'-') 
        set(handles.contour_edgecolor,'userdata',color_list{edgecolor});
    else
        % Ansonsten interp
        set(handles.contour_edgecolor,'Value',11);
        set(handles.contour_edgecolor,'userdata','interp');
    end
end

Contact us at files@mathworks.com