Implementing frame slider for image volume display in panel
euaruksakul
Thanks a lot!
Function SliderProc_ImgFrame(sa) : SliderControl
STRUCT WMSliderAction &sa
switch( sa.eventCode )
case -1: // control being killed
break
default:
if( sa.eventCode & 1 ) // value set
Variable curval = sa.curval
modifyimage /W=SLP_ImgXPS_Panel_01#IX_ImgW WF01 plane=(curval)
endif
break
endswitch
return 0
End
STRUCT WMSliderAction &sa
switch( sa.eventCode )
case -1: // control being killed
break
default:
if( sa.eventCode & 1 ) // value set
Variable curval = sa.curval
modifyimage /W=SLP_ImgXPS_Panel_01#IX_ImgW WF01 plane=(curval)
endif
break
endswitch
return 0
End
For the slider's limit, I use "
Slider Slider_Img limits={0,dimsize(ImgVolW,2),1}
"
I think, the dimension slide has to go correctly from 0 but to:
dimsize(ImgVolW,2)-1
Secondly, you can write the switch and actually use the cases, something like:
case -1: // control being killed
break
case 9: //drag
modifyimage /W=SLP_ImgXPS_Panel_01#IX_ImgW WF01 plane=(sa.curval)
break
endswitch
As to slow, what is the dimension of the images?
best,
_sk
March 6, 2017 at 01:16 am - Permalink
Now Igor would use the global min and max values to compute the same scaling for all frames.
I hope this helps,
A.G.
WaveMetrics, Inc.
March 7, 2017 at 07:49 am - Permalink
March 7, 2017 at 08:19 am - Permalink
_SK - Thanks a lot for pointing out the mistake.
March 9, 2017 at 01:05 am - Permalink