From fc69817e19ae40e805e4c8d387723b558d161750 Mon Sep 17 00:00:00 2001 From: Gaspard Thevenon Date: Fri, 10 Jun 2022 13:21:36 +0200 Subject: [PATCH 1/4] Color map editor triggers interactive rendering --- Qt/ApplicationComponents/pqColorMapEditor.cxx | 43 ++++++++++++++++--- Qt/ApplicationComponents/pqColorMapEditor.h | 5 ++- VTK | 2 +- 3 files changed, 43 insertions(+), 7 deletions(-) diff --git a/Qt/ApplicationComponents/pqColorMapEditor.cxx b/Qt/ApplicationComponents/pqColorMapEditor.cxx index f3026bec28..db98e12157 100644 --- a/Qt/ApplicationComponents/pqColorMapEditor.cxx +++ b/Qt/ApplicationComponents/pqColorMapEditor.cxx @@ -43,6 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "pqSearchBox.h" #include "pqSettings.h" #include "pqUndoStack.h" +#include "vtkSMSession.h" #include "vtkCommand.h" #include "vtkPVArrayInformation.h" @@ -52,6 +53,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "vtkSMPropertyHelper.h" #include "vtkSMSettings.h" #include "vtkSMTransferFunctionProxy.h" +#include "vtkSMViewProxy.h" #include "vtkWeakPointer.h" #include @@ -70,6 +72,7 @@ public: QPointer ActiveRepresentation; QPointer ScalarBarVisibilityAction; QPointer EditScalarBarAction; + pqTimer lastChangedTimer; unsigned long ObserverId; @@ -81,6 +84,8 @@ public: QVBoxLayout* vbox = new QVBoxLayout(this->Ui.PropertiesFrame); vbox->setMargin(0); vbox->setSpacing(0); + lastChangedTimer.setSingleShot(true); + QObject::connect(&this->lastChangedTimer, SIGNAL(timeout()), self, SLOT(renderViewsStill())); } ~pqInternals() = default; @@ -103,7 +108,7 @@ pqColorMapEditor::pqColorMapEditor(QWidget* parentObject) this->Internals->Ui.SaveAsArrayDefaults, SIGNAL(clicked()), this, SLOT(saveAsArrayDefault())); QObject::connect( this->Internals->Ui.AutoUpdate, SIGNAL(clicked(bool)), this, SLOT(setAutoUpdate(bool))); - QObject::connect(this->Internals->Ui.Update, SIGNAL(clicked()), this, SLOT(renderViews())); + QObject::connect(this->Internals->Ui.Update, SIGNAL(clicked()), this, SLOT(renderViewsStill())); // Let pqScalarBarVisibilityReaction do the heavy lifting for managing the // show-scalar bar button. @@ -261,7 +266,17 @@ void pqColorMapEditor::setColorTransferFunction(vtkSMProxy* ctf) this->Internals->ProxyWidget = widget; this->updatePanel(); - QObject::connect(widget, SIGNAL(changeFinished()), this, SLOT(updateIfNeeded())); + QObject::connect(widget, SIGNAL(changeFinished()), this, SLOT(widgetChangeFinished())); +} + +//----------------------------------------------------------------------------- +void pqColorMapEditor::widgetChangeFinished() +{ + if (this->Internals->Ui.AutoUpdate->isChecked()) + { + this->Internals->lastChangedTimer.start(300); + this->renderViewsInteractive(); + } } //----------------------------------------------------------------------------- @@ -274,7 +289,25 @@ void pqColorMapEditor::updateScalarBarButtons() } //----------------------------------------------------------------------------- -void pqColorMapEditor::renderViews() +void pqColorMapEditor::renderViewsInteractive() +{ + if (this->Internals->ActiveRepresentation) + { + pqView *view = this->Internals->ActiveRepresentation->getView(); + if(view) + { + view->cancelPendingRenders(); + vtkSMViewProxy *viewProxy = view->getViewProxy(); + if(viewProxy) + { + viewProxy->InteractiveRender(); + } + } + } +} + +//----------------------------------------------------------------------------- +void pqColorMapEditor::renderViewsStill() { if (this->Internals->ActiveRepresentation) { @@ -394,7 +427,7 @@ void pqColorMapEditor::restoreDefaults() } } END_UNDO_SET(); - this->renderViews(); + this->renderViewsStill(); } //----------------------------------------------------------------------------- @@ -409,6 +442,6 @@ void pqColorMapEditor::updateIfNeeded() { if (this->Internals->Ui.AutoUpdate->isChecked()) { - this->renderViews(); + this->renderViewsInteractive(); } } diff --git a/Qt/ApplicationComponents/pqColorMapEditor.h b/Qt/ApplicationComponents/pqColorMapEditor.h index f57a3aae4b..a9f35b7006 100644 --- a/Qt/ApplicationComponents/pqColorMapEditor.h +++ b/Qt/ApplicationComponents/pqColorMapEditor.h @@ -69,7 +69,10 @@ protected Q_SLOTS: /** * render's view when transfer function is modified. */ - void renderViews(); + void renderViewsInteractive(); + void renderViewsStill(); + + void widgetChangeFinished(); /** * Save the current transfer function(s) as default. diff --git a/VTK b/VTK index aad6bec312..b0dea9b3d0 160000 --- a/VTK +++ b/VTK @@ -1 +1 @@ -Subproject commit aad6bec312fbf2cedc426964ce844e9285af6ecc +Subproject commit b0dea9b3d0095b2f767575618f8b15b376408546 -- GitLab From 0953df7861fc5c8a13a5b76d436207ac8a9be018 Mon Sep 17 00:00:00 2001 From: Gaspard Thevenon Date: Tue, 26 Apr 2022 14:27:21 +0200 Subject: [PATCH 2/4] Add jittering enabling/disabling for volumetric rendering --- .../Views/Resources/views_and_representations.xml | 7 +++++++ Remoting/Views/vtkImageVolumeRepresentation.cxx | 14 ++++++++++++++ Remoting/Views/vtkImageVolumeRepresentation.h | 1 + 3 files changed, 22 insertions(+) diff --git a/Remoting/Views/Resources/views_and_representations.xml b/Remoting/Views/Resources/views_and_representations.xml index 98196752c9..bed9858c9c 100644 --- a/Remoting/Views/Resources/views_and_representations.xml +++ b/Remoting/Views/Resources/views_and_representations.xml @@ -5620,6 +5620,13 @@ An isotropic volume has a null anisotropy. + + + Enable/Disable jittering. + Modified(); } +//----------------------------------------------------------------------------- +void vtkImageVolumeRepresentation::SetJittering(bool val) +{ + if(auto smartVolumeMapper = vtkSmartVolumeMapper::SafeDownCast(this->VolumeMapper)) + { + smartVolumeMapper->SetUseJittering(val); + } + else if (auto mbMapper = vtkMultiBlockVolumeMapper::SafeDownCast(this->VolumeMapper)) + { + mbMapper->SetUseJittering(val); + } + this->Modified(); +} + //---------------------------------------------------------------------------- void vtkImageVolumeRepresentation::SetSliceFunction(vtkImplicitFunction* slice) { diff --git a/Remoting/Views/vtkImageVolumeRepresentation.h b/Remoting/Views/vtkImageVolumeRepresentation.h index 1d4d7dfa20..d377c7e6b6 100644 --- a/Remoting/Views/vtkImageVolumeRepresentation.h +++ b/Remoting/Views/vtkImageVolumeRepresentation.h @@ -80,6 +80,7 @@ public: void SetSpecularPower(double); void SetShade(bool); void SetAnisotropy(float); + void SetJittering(bool); void SetSliceFunction(vtkImplicitFunction* slice); //@{ -- GitLab From f7eee96aee72553b783e4d7c5f484df9976e2a64 Mon Sep 17 00:00:00 2001 From: Gaspard Thevenon Date: Wed, 27 Apr 2022 10:50:49 +0200 Subject: [PATCH 3/4] Add enabling/disabling ComputeNormalFromOpacity for Volumetric Rendering --- .../Views/Resources/views_and_representations.xml | 7 +++++++ Remoting/Views/vtkImageVolumeRepresentation.cxx | 14 ++++++++++++++ Remoting/Views/vtkImageVolumeRepresentation.h | 1 + 3 files changed, 22 insertions(+) diff --git a/Remoting/Views/Resources/views_and_representations.xml b/Remoting/Views/Resources/views_and_representations.xml index bed9858c9c..779c535f2f 100644 --- a/Remoting/Views/Resources/views_and_representations.xml +++ b/Remoting/Views/Resources/views_and_representations.xml @@ -5627,6 +5627,13 @@ Enable/Disable jittering. + + + Enable/Disable shading normals estimation from opacity instead of scalars. + Modified(); } +//---------------------------------------------------------------------------- +void vtkImageVolumeRepresentation::SetComputeNormalFromOpacity(bool val) +{ + if(auto smartVolumeMapper = vtkSmartVolumeMapper::SafeDownCast(this->VolumeMapper)) + { + smartVolumeMapper->SetComputeNormalFromOpacity(val); + } + else if (auto mbMapper = vtkMultiBlockVolumeMapper::SafeDownCast(this->VolumeMapper)) + { + mbMapper->SetComputeNormalFromOpacity(val); + } + this->Modified(); +} + //---------------------------------------------------------------------------- void vtkImageVolumeRepresentation::SetSliceFunction(vtkImplicitFunction* slice) { diff --git a/Remoting/Views/vtkImageVolumeRepresentation.h b/Remoting/Views/vtkImageVolumeRepresentation.h index d377c7e6b6..cbda462519 100644 --- a/Remoting/Views/vtkImageVolumeRepresentation.h +++ b/Remoting/Views/vtkImageVolumeRepresentation.h @@ -81,6 +81,7 @@ public: void SetShade(bool); void SetAnisotropy(float); void SetJittering(bool); + void SetComputeNormalFromOpacity(bool); void SetSliceFunction(vtkImplicitFunction* slice); //@{ -- GitLab From b19719b6a3c3d5f01964f7204373ade959ac480e Mon Sep 17 00:00:00 2001 From: Gaspard Thevenon Date: Tue, 10 May 2022 09:31:47 +0200 Subject: [PATCH 4/4] Shader code editor for ImageVolumes --- Qt/ApplicationComponents/CMakeLists.txt | 2 + .../pqShaderEditorButton.cxx | 63 ++++++++++ .../pqShaderEditorButton.h | 32 +++++ .../pqShaderEditorWindow.cxx | 117 ++++++++++++++++++ .../pqShaderEditorWindow.h | 33 +++++ .../pqStandardPropertyWidgetInterface.cxx | 5 + .../Resources/views_and_representations.xml | 19 +++ .../Views/vtkImageVolumeRepresentation.cxx | 28 +++++ Remoting/Views/vtkImageVolumeRepresentation.h | 5 +- VTK | 2 +- 10 files changed, 304 insertions(+), 2 deletions(-) create mode 100644 Qt/ApplicationComponents/pqShaderEditorButton.cxx create mode 100644 Qt/ApplicationComponents/pqShaderEditorButton.h create mode 100644 Qt/ApplicationComponents/pqShaderEditorWindow.cxx create mode 100644 Qt/ApplicationComponents/pqShaderEditorWindow.h diff --git a/Qt/ApplicationComponents/CMakeLists.txt b/Qt/ApplicationComponents/CMakeLists.txt index 6aa659fc61..ed4e8c7ba4 100644 --- a/Qt/ApplicationComponents/CMakeLists.txt +++ b/Qt/ApplicationComponents/CMakeLists.txt @@ -188,6 +188,8 @@ set(classes pqServerDisconnectReaction pqSessionTypeDecorator pqSetMainWindowTitleReaction + pqShaderEditorButton + pqShaderEditorWindow pqShowHideAllReaction pqShowWidgetDecorator pqSourcesMenuReaction diff --git a/Qt/ApplicationComponents/pqShaderEditorButton.cxx b/Qt/ApplicationComponents/pqShaderEditorButton.cxx new file mode 100644 index 0000000000..6121cb9179 --- /dev/null +++ b/Qt/ApplicationComponents/pqShaderEditorButton.cxx @@ -0,0 +1,63 @@ +#include "pqShaderEditorButton.h" +#include "vtkImageVolumeRepresentation.h" +#include "vtkSMProperty.h" +#include "vtkSMPropertyGroup.h" +#include "pqPropertiesPanel.h" + +#include "pqShaderEditorWindow.h" + +#include +#include +#include +#include +#include + +struct pqShaderEditorButton::pqInternals +{ +public: + vtkImageVolumeRepresentation* VolumeRepr; + QPushButton *windowPB; + QWidget *Parent; + QWidget *WindowEditor; + vtkSMProxy *Proxy; + vtkSMPropertyGroup *SMGroup; +}; + +void pqShaderEditorButton::buttonReleased() +{ + if(!Internals->WindowEditor) + { + Internals->WindowEditor = new pqShaderEditorWindow(Internals->Proxy, Internals->SMGroup, this, nullptr); + } +} + +void pqShaderEditorButton::editorClosed() +{ + Internals->WindowEditor = nullptr; +} + +pqShaderEditorButton::pqShaderEditorButton( + vtkSMProxy* proxy, vtkSMPropertyGroup* group, QWidget* parent) : + Superclass(proxy, parent) +{ + QGridLayout* layout = new QGridLayout(this); + layout->setMargin(pqPropertiesPanel::suggestedMargin()); + layout->setVerticalSpacing(pqPropertiesPanel::suggestedVerticalSpacing()); + layout->setHorizontalSpacing(pqPropertiesPanel::suggestedHorizontalSpacing()); + + Internals = new pqInternals; + Internals->Proxy = proxy; + Internals->SMGroup = group; + Internals->VolumeRepr = vtkImageVolumeRepresentation::SafeDownCast(proxy); + Internals->windowPB = new QPushButton(tr("Edit shader code"), this); + Internals->WindowEditor = nullptr; + layout->addWidget(Internals->windowPB, 0, 0); + + Internals->windowPB->show(); + connect(Internals->windowPB, &QPushButton::released, this, &pqShaderEditorButton::buttonReleased); +} + +pqShaderEditorButton::~pqShaderEditorButton() +{ + delete Internals; +} \ No newline at end of file diff --git a/Qt/ApplicationComponents/pqShaderEditorButton.h b/Qt/ApplicationComponents/pqShaderEditorButton.h new file mode 100644 index 0000000000..42d0c23b5d --- /dev/null +++ b/Qt/ApplicationComponents/pqShaderEditorButton.h @@ -0,0 +1,32 @@ +#ifndef pqShaderEditorButton_h +#define pqShaderEditorButton_h + +#include "pqApplicationComponentsModule.h" +#include "pqPropertyWidget.h" +#include "vtkImageVolumeRepresentation.h" +#include "vtkSMProxy.h" +#include + +class PQAPPLICATIONCOMPONENTS_EXPORT pqShaderEditorButton : public pqPropertyWidget +{ + Q_OBJECT + typedef pqPropertyWidget Superclass; + +public: + explicit pqShaderEditorButton( + vtkSMProxy* proxy, vtkSMPropertyGroup* smgroup, QWidget* parent = nullptr); + ~pqShaderEditorButton() override; + + void editorClosed(); + +public Q_SLOTS: + void buttonReleased(); + +private: + Q_DISABLE_COPY(pqShaderEditorButton) + + struct pqInternals; + pqInternals *Internals; +}; + +#endif \ No newline at end of file diff --git a/Qt/ApplicationComponents/pqShaderEditorWindow.cxx b/Qt/ApplicationComponents/pqShaderEditorWindow.cxx new file mode 100644 index 0000000000..5d04b1a3e2 --- /dev/null +++ b/Qt/ApplicationComponents/pqShaderEditorWindow.cxx @@ -0,0 +1,117 @@ +#include "pqShaderEditorWindow.h" +#include "pqPropertiesPanel.h" +#include "pqShaderEditorButton.h" +#include "vtkImageVolumeRepresentation.h" +#include "vtkSMProperty.h" +#include "vtkSMPropertyGroup.h" +#include "vtkSMPropertyHelper.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct pqShaderEditorWindow::pqInternals +{ + QTextEdit* TextField; + QGridLayout* Layout; + pqShaderEditorButton* ParentCaller; + vtkSMPropertyGroup* SMGroup; + vtkSMProxy* Proxy; + QPushButton* SetShaderButton; + QPushButton* GetShaderButton; +}; + +pqShaderEditorWindow::pqShaderEditorWindow(vtkSMProxy* proxy, vtkSMPropertyGroup* smgroup, + pqShaderEditorButton* shaderButton, QWidget* parent) + : QWidget(parent) +{ + this->setAttribute(Qt::WA_DeleteOnClose); + this->setWindowTitle("Paraview - Shader code editor"); + Internals = new pqInternals; + Internals->Layout = new QGridLayout(this); + Internals->TextField = new QTextEdit(this); + Internals->SetShaderButton = new QPushButton(tr("Set shader code"), this); + Internals->GetShaderButton = new QPushButton(tr("Fetch shader code"), this); + + Internals->Layout->addWidget(Internals->TextField, 0, 0, 1, -1); + Internals->Layout->addWidget(Internals->SetShaderButton, 1, 0); + Internals->Layout->addWidget(Internals->GetShaderButton, 1, 1); + + Internals->Proxy = proxy; + Internals->SMGroup = smgroup; + Internals->ParentCaller = shaderButton; + connect(Internals->SetShaderButton, &QPushButton::released, this, + &pqShaderEditorWindow::setShaderReleased); + connect(Internals->GetShaderButton, &QPushButton::released, this, + &pqShaderEditorWindow::getShaderReleased); + connect(Internals->TextField, &QTextEdit::cursorPositionChanged, this, + &pqShaderEditorWindow::cursorPositionUpdated); + this->show(); +} + +void pqShaderEditorWindow::cursorPositionUpdated() +{ + QTextCursor cursor = Internals->TextField->textCursor(); + cursor.select(QTextCursor::LineUnderCursor); + QTextCharFormat textformat = Internals->TextField->currentCharFormat(); + textformat.setBackground(QBrush(QColor(247, 252, 134, 200))); + QList extraselections; + extraselections.append({ cursor, textformat }); + Internals->TextField->setExtraSelections(extraselections); +} + +void pqShaderEditorWindow::setShaderReleased() +{ + vtkSMPropertyHelper(Internals->SMGroup->GetProperty("SetShaderCode")) + .Set(Internals->TextField->toPlainText().toStdString().c_str()); + Internals->Proxy->UpdateVTKObjects(); +} + +void pqShaderEditorWindow::getShaderReleased() +{ + Internals->Proxy->UpdatePropertyInformation(); + std::string shader = + vtkSMPropertyHelper(Internals->SMGroup->GetProperty("GetShaderCode")).GetAsString(); + Internals->TextField->setText(shader.c_str()); + // compute max line width and height + QString shaderQ(shader.c_str()); + + QRect recScreen = QApplication::desktop()->screenGeometry(); + QFontMetrics fontmetrics = fontMetrics(); + QSize textSize = fontmetrics.size(0, shaderQ); + + textSize.setWidth(std::min(textSize.width(), (int)(recScreen.width() * 0.5))); + textSize.setHeight(std::min(textSize.height(), (int)(recScreen.height() * 0.8))); + + QSize widgetSize(textSize.width() + 30, textSize.height() + 50); + + this->resize(widgetSize); + Internals->TextField->resize(textSize); +} + +pqShaderEditorWindow::~pqShaderEditorWindow() +{ + if (Internals->ParentCaller) + { + Internals->ParentCaller->editorClosed(); + } + // we reset the shader when the window is closed + vtkSMPropertyHelper(Internals->SMGroup->GetProperty("SetShaderCode")).Set(""); + Internals->Proxy->UpdateVTKObjects(); + delete Internals->SetShaderButton; + delete Internals->GetShaderButton; + delete Internals->TextField; + delete Internals; +} \ No newline at end of file diff --git a/Qt/ApplicationComponents/pqShaderEditorWindow.h b/Qt/ApplicationComponents/pqShaderEditorWindow.h new file mode 100644 index 0000000000..c95fb177a9 --- /dev/null +++ b/Qt/ApplicationComponents/pqShaderEditorWindow.h @@ -0,0 +1,33 @@ +#ifndef pqShaderEditorWindow_h +#define pqShaderEditorWindow_h + +#include "pqApplicationComponentsModule.h" +#include "pqPropertyWidget.h" +#include "pqShaderEditorButton.h" +#include "vtkImageVolumeRepresentation.h" +#include "vtkSMProxy.h" +#include +#include +#include "pqShaderEditorButton.h" + +class PQAPPLICATIONCOMPONENTS_EXPORT pqShaderEditorWindow : public QWidget +{ + Q_OBJECT + typedef pqPropertyWidget Superclass; + +public: + explicit pqShaderEditorWindow( + vtkSMProxy* proxy, vtkSMPropertyGroup* smgroup, pqShaderEditorButton* shaderButton, QWidget* parent = nullptr); + ~pqShaderEditorWindow() override; + +public Q_SLOTS: + void setShaderReleased(); + void getShaderReleased(); + void cursorPositionUpdated(); + +private: + struct pqInternals; + pqInternals *Internals; +}; + +#endif \ No newline at end of file diff --git a/Qt/ApplicationComponents/pqStandardPropertyWidgetInterface.cxx b/Qt/ApplicationComponents/pqStandardPropertyWidgetInterface.cxx index d7b278ce9d..9e6003a2a3 100644 --- a/Qt/ApplicationComponents/pqStandardPropertyWidgetInterface.cxx +++ b/Qt/ApplicationComponents/pqStandardPropertyWidgetInterface.cxx @@ -80,6 +80,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "pqSelectionQueryPropertyWidget.h" #include "pqSeriesEditorPropertyWidget.h" #include "pqSessionTypeDecorator.h" +#include "pqShaderEditorButton.h" #include "pqShaderReplacementsSelectorPropertyWidget.h" #include "pqShowWidgetDecorator.h" #include "pqSpherePropertyWidget.h" @@ -353,6 +354,10 @@ pqPropertyWidget* pqStandardPropertyWidgetInterface::createWidgetForPropertyGrou { return new pqMetaDataPropertyWidget(proxy, group, parentWidget); } + else if (panelWidget == "ShaderCodeEditorWidget") + { + return new pqShaderEditorButton(proxy, group, parentWidget); + } // *** NOTE: When adding new types, please update the header documentation *** diff --git a/Remoting/Views/Resources/views_and_representations.xml b/Remoting/Views/Resources/views_and_representations.xml index 779c535f2f..2da205377f 100644 --- a/Remoting/Views/Resources/views_and_representations.xml +++ b/Remoting/Views/Resources/views_and_representations.xml @@ -4900,6 +4900,11 @@ + + + + @@ -5634,6 +5639,20 @@ Enable/Disable shading normals estimation from opacity instead of scalars. + + + + + Modified(); } +//---------------------------------------------------------------------------- +const char* vtkImageVolumeRepresentation::GetShaderCode() +{ + if (auto svMapper = vtkSmartVolumeMapper::SafeDownCast(this->VolumeMapper)) + { + svMapper->GetShaderSource(lastShaderCode); + } + else if (auto mbMapper = vtkMultiBlockVolumeMapper::SafeDownCast(this->VolumeMapper)) + { + mbMapper->GetShaderSource(lastShaderCode); + } + return lastShaderCode.c_str(); +} + +//---------------------------------------------------------------------------- +void vtkImageVolumeRepresentation::SetShaderCode(const std::string & s) +{ + if (auto svMapper = vtkSmartVolumeMapper::SafeDownCast(this->VolumeMapper)) + { + svMapper->SetShaderSource(s); + } + else if (auto mbMapper = vtkMultiBlockVolumeMapper::SafeDownCast(this->VolumeMapper)) + { + mbMapper->SetShaderSource(s); + } + this->Modified(); +} + //---------------------------------------------------------------------------- void vtkImageVolumeRepresentation::SetSliceFunction(vtkImplicitFunction* slice) { diff --git a/Remoting/Views/vtkImageVolumeRepresentation.h b/Remoting/Views/vtkImageVolumeRepresentation.h index cbda462519..b4867919ec 100644 --- a/Remoting/Views/vtkImageVolumeRepresentation.h +++ b/Remoting/Views/vtkImageVolumeRepresentation.h @@ -83,7 +83,6 @@ public: void SetJittering(bool); void SetComputeNormalFromOpacity(bool); void SetSliceFunction(vtkImplicitFunction* slice); - //@{ /** * Methods to set isosurface values. @@ -99,6 +98,8 @@ public: void SetCropping(int); void SetGlobalIlluminationReach(float); void SetVolumetricScatteringBlending(float); + const char* GetShaderCode(); + void SetShaderCode(const std::string &); //@{ /** @@ -175,6 +176,8 @@ protected: int ColorArray2FieldAssociation = -1; int ColorArray2Component = -1; std::string ColorArray2Name; + + std::string lastShaderCode; private: vtkImageVolumeRepresentation(const vtkImageVolumeRepresentation&) = delete; diff --git a/VTK b/VTK index b0dea9b3d0..9d0f52923c 160000 --- a/VTK +++ b/VTK @@ -1 +1 @@ -Subproject commit b0dea9b3d0095b2f767575618f8b15b376408546 +Subproject commit 9d0f52923c73d4126ca849353f09dc91384810f4 -- GitLab