我想通过简单的上一个/下一个切片 GUI 查看我正在检查的切片的数量。我存储了我在handles.index
上查看的切片的编号,并且能够通过上一个、下一个按钮更新它。
我在编辑文本回调函数上写了以下内容:
function edit2_Callback(hObject, eventdata, handles)
handles.output=hObject
set (edit2.handles,'Tag', handles.index); %also tried with the 'String' property and failed
代码运行时,属性不会更新。它仍然是"编辑文本",这里有什么问题?
完整代码,Dicom 文件
呃,
我对按钮回调进行了更新,它:)工作正常
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles.output = hObject;
handles.index = handles.index+1;
Cek (hObject, eventdata, handles);
imshow(handles.image_data(:,:,handles.index),'DisplayRange',[]);
set (handles.edit2,'String', handles.index);