Skip to content

Add methods to access volume data for algorithms like marching cubes #619

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

Closed
wants to merge 4 commits into from

Conversation

kephale
Copy link
Member

@kephale kephale commented Apr 6, 2025

Description

This PR addresses issue #607 by adding utilities for accessing the original volume data and current timepoint view.

Implemented:

  1. A VolumeUtils class with static methods:

    • getOriginalRandomAccessibleInterval(volume): Retrieves the original data
    • getCurrentView(volume): Gets a view of the current timepoint
  2. Extension methods for the Volume class:

    • volume.getOriginalRandomAccessibleInterval<T>()
    • volume.getCurrentView<T>()
  3. Example command VolumeMarchingCubes showing how to use these methods to apply marching cubes at the current timepoint

  4. Documentation explaining usage

Benefits

  • Provides a clean API for accessing the original data without relying on "magic keys" in metadata
  • Returns properly typed data for the current timepoint, simplifying usage with algorithms like marching cubes
  • Shows a complete example of how to use these utilities in a command
  • Works with both time series and regular volumes

Testing

I've tested this with both regular volumes and time series volumes, ensuring that:

  • The original data is correctly retrieved
  • The current timepoint view is correctly created
  • The marching cubes algorithm works properly on the current timepoint

Fixes #607

@kephale kephale closed this Apr 6, 2025
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.

Accessing original data from SciView
1 participant