Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ImageResliceMapper multi component using multiple image data #3137

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

bruyeret
Copy link
Contributor

@bruyeret bruyeret commented Oct 3, 2024

Should be merged after #3132. It adds the same kind of support for multi image, but for the vtkImageResliceMapper.

The vtkImageResliceMapper now supports up to 4 inputs, each representing a component.
The first volume property will be used for all rendering properties except interpolationType.

There is a breaking change so it should be merged at the same time as #3132

These functions used a `getInput` method that doesn't exist
It is not a breaking change as these functions instantly crash when called
The ImageSlice actor already used a more concise code.
Do the same for the base Actor and and Volume actor.
The prop3D has three children that were redefining `getBounds` in the same way.
Move the definition of `getBounds` in the prop3D.
Update typescript accordingly.
BREAKING CHANGE: Move vtkVolumeMapper's properties related to rendering in vtkVolumeProperty.
Add a clear error message for these widely used methods.
This is part of the MultiVolumeMapper feature.
This work is part of the MultiVolumeMapper feature
Fix the getVolumes function which didn't return an array
Instead of comparing a big state that take all actor properties into account,
compare the mtime of the actor as it takes properties into account
@bruyeret bruyeret force-pushed the image-reslice-multi-component branch 4 times, most recently from 132be4b to d625f71 Compare October 3, 2024 16:46
Copy link
Member

@finetjul finetjul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sources/Rendering/Core/Prop3D/index.js Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

light seems to be coming from top, then it is strange that the side of the bottom part is very lit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes here come from the other PR, maybe I should change the target to bruyeret:multi-component instead of Kitware:master
It is hard to know if lighting is wrong with a still image, but this is strange indeed

Sources/Rendering/OpenGL/glsl/vtkVolumeFS.glsl Outdated Show resolved Hide resolved
Sources/Rendering/OpenGL/glsl/vtkVolumeFS.glsl Outdated Show resolved Hide resolved
Support multiple images as input
Uniform styling of fragment shader
Fix resource sharing core object for volume mapper scalars
Many shader bugs are fixed, often linked to wrong coordinate system.
Fix normal computation in shader.

BREAKING CHANGE: the volume mapper fragment shader is very different.
This can cause shader replacements to break.
refactor: Use the right matrices in volume FS shader
The normals have been fixed in the shader, hence the difference
Also the sample distance is not computed in index space anymore
This explains some differences
BREAKING CHANGE: getTransferFunctionHash becomes getTransferFunctionsHash
It takes a list of functions as argument instead of a single function
Also ImageResliceMapper doesn't wieght color using mix.
@bruyeret
Copy link
Contributor Author

bruyeret commented Oct 4, 2024

I made this PR so that anyone can see the diff between this PR and the #3132 PR
It is on my repo, here: bruyeret#1
You can also just take a look at the commits starting from feat: Add multi-image support for components to ImageResliceMapper. This is currently the two last commits.

@bruyeret bruyeret changed the title Image reslice multi component Add ImageResliceMapper multi component using multiple image data Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants