VolumeMapper & OpenGLTexture: support updating image regions#3077
Merged
VolumeMapper & OpenGLTexture: support updating image regions#3077
Conversation
Contributor
Author
2928f9f to
eda0053
Compare
finetjul
reviewed
Jun 5, 2024
Contributor
Author
|
I've pushed a new commit:
|
50806bc to
22fc452
Compare
Contributor
Author
|
This is now ready for any final reviews @sankhesh. All commits will be squashed prior to merging. A summary of the recent commits:
|
22fc452 to
c34bb70
Compare
7 tasks
c34bb70 to
fb9b67d
Compare
sedghi
reviewed
Aug 2, 2024
bruyeret
reviewed
Aug 5, 2024
1dd0eb0 to
16ea999
Compare
6f7ecc4 to
d030714
Compare
Contributor
Author
|
I'll merge this once #3221 goes in, since I need to rebase and handle conflicts anyways. |
vtkVolumeMapper, vtkImageCPRMapper, and vtkImageResliceMapper all now support updating sub-image extents, reducing the GPU upload overhead when part of the image has updated.
fa6efd1 to
ac64b76
Compare
Contributor
Contributor
Author
|
Oh I saw your comment a little too late, sorry. I'll get a fix out for that. |
|
🎉 This PR is included in version 32.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
When updating a 3D texture, the entire texture is uploaded to the GPU. If a volume is incrementally updated (e.g. slice-by-slice), then there is a lot of unchanged data being uploaded at every update.
This changeset lets the VolumeMapper specify image regions that have updated. Internally, this tells vtkOpenGLTexture to only update those regions via
texSubImage3D.This change can also be applied to other mappers that use the 3D textures, e.g. the ImageResliceMapper.
Results
The volume mapper now has the following methods:
setUpdatedExtents(extents)andgetUpdatedExtents(). This property defines which extents need to be updated.This property acts as a "request" to update a set of extents. It is cleared after every successful render call.
Changes
setUpdatedExtents()andgetUpdatedExtents()create3D*functionsPR and Code Checklist
npm run reformatto have correctly formatted codeTesting