Skip to content
Snippets Groups Projects
Commit 18504365 authored by Eric Wait's avatar Eric Wait
Browse files

Pulled the functionality of toggling a channel to its own external function

parent 74db4262
Branches
No related tags found
No related merge requests found
......@@ -299,13 +299,7 @@ end
% --- Executes on button press in cb_visible.
function cb_visible_Callback(hObject, eventdata, handles)
[imageData, colors, channelData] = D3d.UI.Ctrl.GetUserData();
chan = get(handles.m_channelPicker,'Value');
channelData(chan).visible = get(handles.cb_visible,'Value');
D3d.UI.Ctrl.SetUserData(imageData,colors,channelData);
D3d.UI.Ctrl.PlotTransferFunctions();
D3d.UI.ToggleChannel(get(handles.m_channelPicker,'Value'),get(handles.cb_visible,'Value'));
end
% --- Executes on button press in cb_textureLighting.
......
function ToggleChannel(chan,visible)
[imageData, colors, channelData] = D3d.UI.Ctrl.GetUserData();
channelData(chan).visible = visible;
D3d.UI.Ctrl.SetUserData(imageData,colors,channelData);
D3d.UI.Ctrl.PlotTransferFunctions();
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment