MCPcopy Create free account
hub / github.com/Kitware/VTK / UpdateMaskTransfer

Method UpdateMaskTransfer

Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx:734–759  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

732
733//------------------------------------------------------------------------------
734int vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::UpdateMaskTransfer(
735 vtkRenderer* ren, vtkVolume* vol, unsigned int component)
736{
737 vtkVolumeProperty* volumeProperty = vol->GetProperty();
738
739 auto volumeTex = this->Parent->AssembledInputs[0].Texture.GetPointer();
740 double componentRange[2];
741 for (int i = 0; i < 2; ++i)
742 {
743 componentRange[i] = volumeTex->ScalarRange[component][i];
744 }
745
746 if (this->Parent->MaskInput != nullptr && this->Parent->MaskType == LabelMapMaskType)
747 {
748 this->LabelMapTransfer2D->Update(volumeProperty, componentRange, 0, 0, 0,
749 vtkTextureObject::Nearest, vtkOpenGLRenderWindow::SafeDownCast(ren->GetRenderWindow()));
750
751 if (volumeProperty->HasLabelGradientOpacity())
752 {
753 this->LabelMapGradientOpacity->Update(volumeProperty, componentRange, 0, 0, 0,
754 vtkTextureObject::Nearest, vtkOpenGLRenderWindow::SafeDownCast(ren->GetRenderWindow()));
755 }
756 }
757
758 return 0;
759}
760
761//------------------------------------------------------------------------------
762void vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::CaptureDepthTexture(vtkRenderer* ren)

Callers 1

RefreshMaskTransferMethod · 0.95

Calls 4

GetPropertyMethod · 0.45
GetPointerMethod · 0.45
UpdateMethod · 0.45
GetRenderWindowMethod · 0.45

Tested by

no test coverage detected