how to modify contrast in multiple dicom images using slider GUIDE

3 次查看(过去 30 天)
Hello!
I am trying to change contrast in multiple dicom images using a slider.
I already have a slider in which every step of the slider corresponds to a slice of the study (slice= dicom image).
Now I would like to change the contrast in every dicom image using another slider. How could I do that? Thanks!

采纳的回答

Rik
Rik 2019-3-13
You can use the callback of the slider to adjust the caxis.
In my FEX submission WindowLevel I do something similar, but with dragging the mouse over an image, instead of using a slider.
  5 个评论
Rik
Rik 2019-3-16
I would also suggest not using GUIDE in the first place, but using the AppDesigner or normal native Matlab instead.
My small guide to avoid GUIDE:
  • Make a figure (with f=figure;) and look into the doc for figure which properties you want to turn off (you probably want to set Menu and Toolbar to 'none')
  • Create buttons and axes and everything you need with functions like uicontrol and axes. Save the handles to each element to fields of a struct (like handles.mybutton=uicontrol(___);)
  • When you've finished loading all data (and saving it to fields of your handles struct), and creating all the buttons, save your handles struct to the guidata of your figure like this guidata(handles.f,handles);. (You can also use getappdata and setappdata)
  • You can set the Callback property of many objects. If you do, use a function name with an @ in front, or a char array that can be evaluated to valid code. (like @MyFunction or 'disp(''you pushed the button'')')
  • Callback functions will be called with two arguments: the first is a handle to the callback object, the second is eventdata that may contain special information. To get access to your data, just use handles=guidata(gcbo);. You can replace the gcbo function with the name of the first input to your callback function if you prefer.
  • More information about callbacks can be found in multiple places in the doc, for example here.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Read, Write, and Modify Image 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by