]> Creatis software - clitk.git/blobdiff - vv/vvSurfaceViewerDialog.cxx
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvSurfaceViewerDialog.cxx
index f50cb09ed34845c8d8172b82f227a06cd2917cbb..da0381a4521c918c375c9fd027b74c1026d12c67 100644 (file)
 #include <QMessageBox>
 #include <QFileDialog>
 
+#ifdef Q_OS_OSX
+# include "vvOSXHelper.h"
+#endif
+
 //----------------------------------------------------------------------------
 class vvManagerCallback : public vtkCommand
 {
@@ -76,6 +80,10 @@ vvSurfaceViewerDialog::vvSurfaceViewerDialog(QWidget * parent, Qt::WindowFlags f
   mCurrentTime = 0;
 
   connect(loadButton,SIGNAL(clicked()),this,SLOT(LoadSurface()));
+
+#ifdef Q_OS_OSX
+  disableGLHiDPI(renderWidget->winId());
+#endif
 }
 
 vvSurfaceViewerDialog::~vvSurfaceViewerDialog()
@@ -114,7 +122,7 @@ void vvSurfaceViewerDialog::LoadSurface()
 #if VTK_MAJOR_VERSION <= 5
   mMapper->SetInput(mReaders[mCurrentTime]->GetOutput());
 #else
-  mMapper->SetInputData(mReaders[mCurrentTime]->GetOutput());
+  mMapper->SetInputConnection(mReaders[mCurrentTime]->GetOutputPort());
 #endif
 
   if (!mActor) {
@@ -147,7 +155,7 @@ void vvSurfaceViewerDialog::NextTime()
 #if VTK_MAJOR_VERSION <= 5
   mMapper->SetInput(mReaders[mCurrentTime]->GetOutput());
 #else
-  mMapper->SetInputData(mReaders[mCurrentTime]->GetOutput());
+  mMapper->SetInputConnection(mReaders[mCurrentTime]->GetOutputPort());
 #endif
   mMapper->Modified();
   renderWidget->GetRenderWindow()->Render();
@@ -161,7 +169,7 @@ void vvSurfaceViewerDialog::PreviousTime()
 #if VTK_MAJOR_VERSION <= 5
   mMapper->SetInput(mReaders[mCurrentTime]->GetOutput());
 #else
-  mMapper->SetInputData(mReaders[mCurrentTime]->GetOutput());
+  mMapper->SetInputConnection(mReaders[mCurrentTime]->GetOutputPort());
 #endif
   mMapper->Modified();
   renderWidget->GetRenderWindow()->Render();