]> Creatis software - creaMaracasVisu.git/blobdiff - lib/GUI/Qt/Viewers/qtvtkviewer.cpp
changes in qt for volume rendering with gpu support, if you are working with volume...
[creaMaracasVisu.git] / lib / GUI / Qt / Viewers / qtvtkviewer.cpp
index 8a67db4eacb04e980cd9e74079027c1b0f8c2300..d4c0685c25f922ab1d882a13a0953e371a671a64 100644 (file)
@@ -1,12 +1,14 @@
 #include "qtvtkviewer.h"
 
+#include "vtkImageMapToColors.h"
+
 QtVTKViewer::QtVTKViewer(QWidget* parent)
     : QVTKWidget(parent)
 {
 
 
     this->GetRenderWindow()->AddRenderer(vtkRenderer::New());
-    this->GetRenderWindow()->GetRenderers()->GetFirstRenderer()->SetBackground(0,0,0);
+    this->GetRenderWindow()->GetRenderers()->GetFirstRenderer()->SetBackground(1,1,1);
 
     SuperImagePlaneWidget::initialize(this->GetRenderWindow()->GetInteractor());
 
@@ -71,3 +73,9 @@ void QtVTKViewer::mousePressEvent(QMouseEvent* event){
 #endif
     }
 }
+
+void QtVTKViewer::SetOutputFormatToRGBA(){
+    _xwidget->GetColorMap()->SetOutputFormatToRGBA();
+    _ywidget->GetColorMap()->SetOutputFormatToRGBA();
+    _zwidget->GetColorMap()->SetOutputFormatToRGBA();
+}