Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • S Slicer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 40
    • Merge requests 40
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Sam Horvath
  • Slicer
  • Merge requests
  • !1091

ENH: Added new node types to support custom volume rendering shader code

  • Review changes

  • Download
  • Patches
  • Plain diff
Open Simon Drouin requested to merge github/fork/drouin-simon/shader-property-node into master Feb 23, 2019
  • Overview 0
  • Commits 4
  • Pipelines 0
  • Changes 15

With this PR, we introduce a mechanism to manage and store custom modifications and variables of volume rendering shaders. This pull request requires changes to VTK contained in this other pull request:

https://github.com/Slicer/VTK/pull/21

This change in VTK separates the management of vtkUniforms and shader replacements from the volume mapper and stores all these properties in a new class (vtkShaderProperty), which is stored in vtkVolume. On the Slicer side, I have created wrappers classes to manage vtkShaderProperty:

  • vtkMRMLShaderPropertyNode
  • vtkMRMLShaderPropertyStorageNode
  • qSlicerShaderPropertyReader

The advantages of the new system are twofold:

  • Custom shader modifications are contained in a class that is shared by all displayable managers, i.e. your custom shader effect is visible in both the 3D view and the VR view.
  • Custom modifications to the shaders are now saved with the mrml scene (in a json file with extension .sp), which means that GLSL experts can modify the shader code and variables, send the scene to non-programmers (e.g. clinicians) who will be able to load and visualize the new rendering effect by simply loading the scene.

@lassoan @pieper @cpinter @jcfr please let me know what you think.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/drouin-simon/shader-property-node