Skip to content

Commit

Permalink
Leave notes about the MR that fixed the issue
Browse files Browse the repository at this point in the history
This is so that when we update VTK/ParaView, we can clean up our
work-arounds and not use a gradient opacity transfer function.

Signed-off-by: Patrick Avery <[email protected]>
  • Loading branch information
psavery committed Jun 22, 2022
1 parent 94f0025 commit 9e07ab8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tomviz/modules/ModuleVolume.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ vtkStandardNewMacro(SmartVolumeMapper)
{
// NOTE: Due to a bug in vtkMultiVolume, a gradient opacity function must be
// set or the shader will fail to compile.
// (likely fixed in https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8909)
m_gradientOpacity->AddPoint(0.0, 1.0);
connect(&HistogramManager::instance(), &HistogramManager::histogram2DReady,
this, [=](vtkSmartPointer<vtkImageData> image,
Expand All @@ -84,6 +85,7 @@ vtkStandardNewMacro(SmartVolumeMapper)

// NOTE: Due to a bug in vtkMultiVolume, a gradient opacity function must
// be set or the shader will fail to compile.
// (likely fixed in https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8909)
connect(&VolumeManager::instance(), &VolumeManager::usingMultiVolumeChanged,
this, &ModuleVolume::updateColorMap);
}
Expand Down Expand Up @@ -379,6 +381,8 @@ void ModuleVolume::updateColorMap()
case (Module::SCALAR): {
// NOTE: Due to a bug in vtkMultiVolume, a gradient opacity function must
// be set or the shader will fail to compile.
// (likely fixed in
// https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8909)
bool usingMultiVolume =
VolumeManager::instance().usingMultiVolume(this->view());
if (usingMultiVolume) {
Expand Down
2 changes: 2 additions & 0 deletions tomviz/modules/VolumeManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ void VolumeManager::onModuleAdded(Module* module)
viewVolumes->auxProperty->SetScalarOpacity(viewVolumes->auxOpacity);
// NOTE: Due to a bug in vtkMultiVolume, a gradient opacity function must
// be set or the shader will fail to compile.
// (likely fixed in
// https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8909)
viewVolumes->auxProperty->SetGradientOpacity(
viewVolumes->auxGradientOpacity);
viewVolumes->auxVolume->SetProperty(viewVolumes->auxProperty);
Expand Down

0 comments on commit 9e07ab8

Please sign in to comment.