Package: nifti2dicom Severity: wishlist Tags: patch X-Debbugs-Cc: franc...@mzf.fr
Dear Maintainer, nifti2dicom package depends on vtk7 which is quite old and not maintained upstream. I've succeeded to build nifti2dicom with vtk9 by changing Build-Depends from libvtk7-qt-dev to libvtk9-qt-dev and changing the QVTKWidget to QVTKOpenGLNativeWidget class in src/gui/init. A simple patch is attached to this message. Could you please look at the patch and update to vtk9? Thanks, François
--- a/src/gui/init.h +++ b/src/gui/init.h @@ -31,7 +31,7 @@ #include <QtWidgets/QLabel> #endif -#include "QVTKWidget.h" +#include "QVTKOpenGLNativeWidget.h" #include <n2dDefsImage.h> @@ -73,7 +73,7 @@ QSlider* m_horizontalSlider; QLineEdit* m_openedFileName; QLineEdit* m_openedFileSizes; - QVTKWidget* m_renderPreview; + QVTKOpenGLNativeWidget* m_renderPreview; vtkImageViewer2* m_imageviewer; vtkKWImageIO* m_reader; vtkKWImage* m_localVTKImage; --- a/src/gui/init.cpp +++ b/src/gui/init.cpp @@ -65,7 +65,7 @@ #include <vtkIndent.h> #include <vtkVersion.h> #include <vtkCamera.h> -#include <QVTKWidget.h> +#include <QVTKOpenGLNativeWidget.h> #include "vtkKWImageIO.h" #include "vtkKWImage.h" @@ -101,7 +101,7 @@ m_horizontalSlider(new QSlider(Qt::Horizontal)), m_openedFileName(new QLineEdit()), m_openedFileSizes(new QLineEdit()), - m_renderPreview(new QVTKWidget()), + m_renderPreview(new QVTKOpenGLNativeWidget()), m_imageviewer(vtkImageViewer2::New()), m_reader(vtkKWImageIO::New()), m_localVTKImage(vtkKWImage::New()), @@ -167,7 +167,8 @@ #endif emptyImage->Delete(); - m_renderPreview->SetRenderWindow(m_imageviewer->GetRenderWindow()); + //m_renderPreview->setRenderWindow(m_imageviewer->GetRenderWindow()); + m_imageviewer->SetRenderWindow(m_renderPreview->renderWindow()); m_imageviewer->SetSliceOrientationToXY(); m_imageviewer->SetSlice(0);