Commit db14f32a authored by Emmanuel Promayon's avatar Emmanuel Promayon

FIXED arbitrary viewer is back in the medical image viewer

parent 94ad509e
......@@ -124,7 +124,6 @@ InteractiveViewer* InteractiveViewer::getViewer(QString name) {
// default orientation for axial, sagittal and coronal is not the same
// See Image Reorientation Action Documentation...
// singletonInstance->toggleOrientationDecorations(false);
if (name == defaultNames[1]) { // Axial Viewer
singletonInstance->getRendererWidget()->setCameraOrientation(RendererWidget::RIGHT_DOWN);
QString letters[4] = {QString("R"), QString("L"), QString("A"), QString("P") };
......@@ -151,7 +150,7 @@ InteractiveViewer* InteractiveViewer::getViewer(QString name) {
else
if (name == defaultNames[4]) { // Arbitrary Viewer
singletonInstance->getRendererWidget()->setCameraOrientation ( RendererWidget::RIGHT_DOWN );
singletonInstance->toggleOrientationDecorations(true);
singletonInstance->toggleOrientationDecorations(false);
singletonInstance->getRendererWidget()->getActiveCamera()->ParallelProjectionOn();
}
......@@ -1565,7 +1564,6 @@ void InteractiveViewer::sliderChanged(int i) {
void InteractiveViewer::xAngleChanged(double angle) {
if (myType == SLICE_VIEWER) {
if (actorMap.size() > 0) {
//TODO implement this method for the arbitrary slice
actorMap.begin().key()->rotate(angle, 0, 0);
// the Component was modified in the viewer, ask the Component to update all its other viewers
......@@ -1578,7 +1576,6 @@ void InteractiveViewer::xAngleChanged(double angle) {
void InteractiveViewer::yAngleChanged(double angle) {
if (myType == SLICE_VIEWER) {
if (actorMap.size() > 0) {
//TODO implement this method for the arbitrary slice
actorMap.begin().key()->rotate(0, angle, 0);
// the Component was modified in the viewer, ask the Component to update all its other viewers
......@@ -1591,7 +1588,6 @@ void InteractiveViewer::yAngleChanged(double angle) {
void InteractiveViewer::zAngleChanged(double angle) {
if (myType == SLICE_VIEWER) {
if (actorMap.size() > 0) {
//TODO implement this method for the arbitrary slice
actorMap.begin().key()->rotate(0, 0, angle);
// the Component was modified in the viewer, ask the Component to update all its other viewers
......
......@@ -138,6 +138,7 @@ QWidget* MedicalImageViewer::getWidget(QWidget* parent) {
topLeftLayout = new QVBoxLayout();
frameLayout->addLayout(topLeftLayout, 0, 0);
topLeftLayout->addWidget(InteractiveViewer::getAxialViewer()->getWidget(frame)); // equivalent of addWidget(InteractiveViewer::getAxialViewer()->getWidget(frame), 0, 0) = north-west
topLeftLayout->addWidget(InteractiveViewer::getArbitraryViewer()->getWidget(frame));
frameLayout->addWidget(InteractiveViewer::getCoronalViewer()->getWidget(frame), 1, 0); // north-east
frameLayout->addWidget(InteractiveViewer::getSagittalViewer()->getWidget(frame), 1, 1); // south-west
frameLayout->addWidget(InteractiveViewer::get3DViewer()->getWidget(frame), 0, 1); // south-east
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment