Wojciech Lassmann
2017-02-26 23:20:44 UTC
Hi, i have problem.
I want to rotate the mitkWidget4 cotents arround 3 perpendicular vectors
(that would rotate with the world)
I allready know that VTK functions are not much of a help, as they rotate
around static axis, And i want to try with mitkRotationOperation, but seems
thet i dont understand it.
i use qt slider moved signal to trigger the slot, and read its position
qDebug() <<QString(position); //to check if is propperly trigered
// typedef mitk::Vector<ScalarType, 3> Vector3D;
mitk::Vector3D vector = mitk::Vector3D();
vector[0]=0.0;
vector[0]=1.0;
vector[0]=0.0;
mitk::RotationOperation* op = new mitk::RotationOperation(1, //i dont
actually know what does tis fo as it just an int, what value should it have
geo->GetCenterInWorld(), //where geo is time geometry of the data storage
initialising the views
vector,
(double)position); //which is the slider value
geo->ExecuteOperation(op);
ui->view2->mitkWidget4->update(); //where view2 is my temorary name for
QmitkStdMultiWidget
This doesn't seem to do anything, and I have no Idea why.
(http://docs.mitk.org/2015.05/GeometryOverviewPage.html
*geometry->GetVtkMatrix()->Rotate()
*mentioned at the end of the page doesn't seem to exist anymore)
With Regards,
Wojciech Lassmann
I want to rotate the mitkWidget4 cotents arround 3 perpendicular vectors
(that would rotate with the world)
I allready know that VTK functions are not much of a help, as they rotate
around static axis, And i want to try with mitkRotationOperation, but seems
thet i dont understand it.
i use qt slider moved signal to trigger the slot, and read its position
qDebug() <<QString(position); //to check if is propperly trigered
// typedef mitk::Vector<ScalarType, 3> Vector3D;
mitk::Vector3D vector = mitk::Vector3D();
vector[0]=0.0;
vector[0]=1.0;
vector[0]=0.0;
mitk::RotationOperation* op = new mitk::RotationOperation(1, //i dont
actually know what does tis fo as it just an int, what value should it have
geo->GetCenterInWorld(), //where geo is time geometry of the data storage
initialising the views
vector,
(double)position); //which is the slider value
geo->ExecuteOperation(op);
ui->view2->mitkWidget4->update(); //where view2 is my temorary name for
QmitkStdMultiWidget
This doesn't seem to do anything, and I have no Idea why.
(http://docs.mitk.org/2015.05/GeometryOverviewPage.html
*geometry->GetVtkMatrix()->Rotate()
*mentioned at the end of the page doesn't seem to exist anymore)
With Regards,
Wojciech Lassmann