Skip to content

Commit 7dff23b

Browse files
committed
Fixed VTK 5 compile issues with reslice feature.
1 parent d9ca338 commit 7dff23b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

include/Qt/milxQtImage.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,7 @@ public slots:
10991099
viewer->GetRenderWindow()->SetCurrentCursor(0);
11001100
crosshairAct->setChecked(false);
11011101
}
1102+
#if VTK_MAJOR_VERSION > 5
11021103
/*!
11031104
\fn milxQtImage::resliceMode()
11041105
\brief Apply different slice modes (oblique or axis based). Image must be generated before calling.
@@ -1123,6 +1124,7 @@ public slots:
11231124
viewer->GetInteractorStyle()->SetInteractionModeToImageSlicing();
11241125
resliceAct->setChecked(false);
11251126
}
1127+
#endif
11261128
/*!
11271129
\fn milxQtImage::setView(int viewMode)
11281130
\brief Change view to view mode identified by number.

src/Qt/milxQtImage.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3501,6 +3501,7 @@ void milxQtImage::scaleDisplay(const bool forceDisplay)
35013501
Render();
35023502
}
35033503

3504+
#if VTK_MAJOR_VERSION > 5
35043505
void milxQtImage::resliceMode(const bool quietly)
35053506
{
35063507
if(resliceAct->isChecked())
@@ -3511,6 +3512,7 @@ void milxQtImage::resliceMode(const bool quietly)
35113512
if(!quietly)
35123513
emit modified(this);
35133514
}
3515+
#endif
35143516

35153517
void milxQtImage::showCrosshair(const bool quietly)
35163518
{
@@ -4087,6 +4089,9 @@ void milxQtImage::createActions()
40874089
resliceAct->setShortcut(tr("Shift+Ctrl+s"));
40884090
resliceAct->setCheckable(true);
40894091
resliceAct->setChecked(false);
4092+
#if VTK_MAJOR_VERSION <= 5
4093+
resliceAct->setDisabled(true);
4094+
#endif
40904095
cursorAct = new QAction(this);
40914096
cursorAct->setText(QApplication::translate("Image", "Show Cursor", 0, QApplication::UnicodeUTF8));
40924097
cursorAct->setShortcut(tr("Shift+Alt+c"));
@@ -4172,7 +4177,9 @@ void milxQtImage::createConnections()
41724177
connect(infoAct, SIGNAL(triggered()), this, SLOT(imageInformation()));
41734178
connect(interpolateAct, SIGNAL(triggered()), this, SLOT(interpolateDisplay()));
41744179
connect(orientAct, SIGNAL(triggered()), this, SLOT(applyOrientDisplay()));
4180+
#if VTK_MAJOR_VERSION > 5
41754181
connect(resliceAct, SIGNAL(triggered()), this, SLOT(resliceMode()));
4182+
#endif
41764183
connect(cursorAct, SIGNAL(triggered()), this, SLOT(showCrosshair()));
41774184
connect(milxQtRenderWindow::refreshAct, SIGNAL(triggered()), this, SLOT(refresh()));
41784185
connect(milxQtRenderWindow::resetAct, SIGNAL(triggered()), this, SLOT(reset()));

0 commit comments

Comments
 (0)