Connecting the image slice change with the slider
-
hello,
m really stuck with an issue and m new to qt..
plz help me out.
my task is to read the image of x number of slice.. display it,, set slider and spin box so that all three shud interact with each other.
sinbox- slider
slider-spinbox
slider-qvtkwidget these are connected bt when i move the mouse wheel for changing the image slice the slider has to be moved according to the mouse wheel.. m nt understanding how to connect it.thanks inadvance
-
Hi,
Can you explain with a simple example what your are trying to do ?
From the description above it's tough to guess. -
i have read sequence of image in a qvtkwidget and connected slider and spinbox to it so that wen i scroll my mouse i shud know the slice number.
wen i move slider slices move bt i am struggling to connect it in reverse like wen my slices move with the scroll slider shud move bt which is nt happeneing. -
Good to hear the you solved your problem. You can post the solution here in brief words if possible so that in future someone would benefit from it. Also you can mark the post as solved.
-
@#include "ui_mainwindow.h"
and in the interactor style class did as below
Ui_MainWindow *_ui;void SetUi(Ui_MainWindow *ui)
{
_ui=ui;
}void OnMouseWheelForward()
{
if(_Slice < Max_Slice)
{
_Slice += 1;
Image_Viewer->SetSlice(_Slice);
_ui->verticalSlider_2->setValue(_Slice);Image_Viewer->Render(); }
}
and things work perfect.
@