-
Notifications
You must be signed in to change notification settings - Fork 453
feat(decimatedVolumeLoader): optional downsizing and downsampling of volumes. #2340
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
feat(decimatedVolumeLoader): optional downsizing and downsampling of volumes. #2340
Conversation
… viewport options and improved UI elements
…nhance dynamic loading options
…and add decimateImagePixels utility
…cessing and update image loading logic
|
@mbellehumeur great feature, what's still missing to ship it ? do you need help to finish it ? |
…ume and StreamingImageVolume; adjust decimation logic in decimateVolumeLoader
…button creation in the example
… cases; update spacing calculations
…s for improved accuracy
Thanks, that would be nice. I'm wondering if additional smoothing can be done. |
|
@sedghi - how do we want to handle segmentations and annotations in combination with the decimated volumes? There are a few things to think about:
Over time, we will have other alternate volume representations - should there be a volume specific method to get the desired alternate volume(s), or should there be a custom actor for displaying decimated volumes, and we can add more actors in the future for other volume types? |
…s by using Math.floor for new dimensions
…age decimation, including parameter descriptions, examples, and value changes
…ers with a single ijkDecimation array for improved clarity and flexibility; update related interfaces and example usage
…ePropsFromImageIds function
… remove related modifiers
sedghi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d
packages/core/src/loaders/decimatedVolumeModifiers/inPlaneDecimationModifier.ts
Show resolved
Hide resolved
Removing optional chaining since it could hide bugs since it is always required. dimension comes from ImageVolumeProps which uses DICOM metadata via generateVolumePropsFromImageIds().
|
Please make sure the decimation=... parameter is NOT included in the URL to the back end server. |
|
This seems to be failing a number of the required checks - unit tests, format, docusaurus build etc. |
Adds detailed documentation for inPlaneDecimationModifier.
Updated comments to provide detailed explanation of the low resolution image loader functionality and its requirements.
That is the name agreed with Denny. What is your suggestion? |
It isn't a standard DICOM request attribute, so you can't just add a parameter like that. You need to change the load path, or else add a parameter to the DICOM loader to allow using custom names. Basically you need a configuration somewhere that says whether or not to include any extra attributes when applying decimation. If those are not provided, then the server can't respond with a decimated version, and you would have to live with the fact that the image needs to be decimated locally before displaying. |
…tion for unique caching

Context
ticket: 9788261802
Decimated volume loader that creates a StreamingImageVolume while delegating
volume mutations to a plugin-style modifier chain. The loader still handles the
responsibilities of preparing imageIds (including optional k-axis decimation),
instantiating the streaming volume, and updating VTK/voxel-manager state, but it
now relies on
enhancedVolumeModifiersto encapsulate any transformations thatare specific to projection parameters such as decimation.
The loader currently wires a dedicated modifier set for:
that spacing reflects the decimated stack without manual scaling.
InPlaneDecimationModifier, whichupdates dimensions, spacing, and DICOM metadata in a self-contained class.
Additional modifiers can be introduced by implementing the shared
decimatedVolumeModifier` interface. For example:
The decimation part of this PR allows viewing of volumes that are too large for WebGL and to improve latency for low performance GPU hardware. The features are:
Downsizing with Decimation factor [i,j,k] in enhancedVolumeLoader.
K-axis decimation: Reduces the number of slices by keeping every Nth slice
(e.g., decimation=2 keeps every other slice). This is applied before volume creation
unless already decimated at the displaySet level.
In-plane decimation: Downsamples the resolution of each slice by reducing pixel
dimensions. This is achieved by appending a decimation parameter to imageIds, which
is processed during image loading.
The BaseStreamingVolume has been adjusted to handle the desired dimensions (targetRows and targetColumns)
DecodeImageFrame is used to decode produce the PixelData. The volume spacing, dimensions, and DICOM metadata are adjusted to reflect the decimated resolution.
Downsampling with SampleDistanceMultiplier
Sets the VTK toolkit sampling distance when rendering volumes.
Changes & Results
For downsizing:
For downsampling:
Added sampleDistanceMultiplier to
Added sampling distance drop down to the the VolumeViewport3D example.
Testing
Example implementation in a viewer:
Exampleviewerusage.1.mp4
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment