#include "qtvtkviewerwidget.h" #include "ui_qtvtkviewerwidget.h" QtVTKViewerWidget::QtVTKViewerWidget(QWidget *parent) : QWidget(parent) { setupUi(this); this->m_VolumeRender->SetRenderer(this->getRenderer()); this->m_VolumeRender->SetInteractor(this->_qtvtkviewer->GetRenderWindow()->GetInteractor()); } QtVTKViewerWidget::~QtVTKViewerWidget() { } vtkRenderer* QtVTKViewerWidget::getRenderer(){ return this->_qtvtkviewer->GetRenderWindow()->GetRenderers()->GetFirstRenderer(); } void QtVTKViewerWidget::setImage(vtkImageData* img){ this->_qtvtkviewer->setImage(img); this->m_VolumeRender->SetImageData(img); } void QtVTKViewerWidget::SetLookupTable(vtkLookupTable *lookuptable){ this->_qtvtkviewer->SetLookupTable(lookuptable); this->m_VolumeRender->SetLookUpTable(lookuptable); } void QtVTKViewerWidget::on_checkBoxShowPlanes_clicked(){ this->_qtvtkviewer->showPlanes(checkBoxShowPlanes->isChecked()); }