Skip to content

Conversation

banesullivan
Copy link
Member

@banesullivan banesullivan commented Jul 8, 2025

Use pv.ImageData over pv.RectilinearGrid when the axes have uniform spacing.

This yields significant performance improvements, especially if wanting to volume render:

import xarray as xr
import pvxarray
import pyvista as pv

ds = xr.tutorial.load_dataset("cells3d")
da = ds.images
nuclei = da.sel(c='nuclei').pyvista.mesh(x="x", y="y", z="z")

pl = pv.Plotter()
pl.add_volume(nuclei, clim=(0, 30000), opacity='sigmoid')
pl.enable_terrain_style()
pl.show()

screenshot (7)

The tests here are working around an upstream bug: pyvista/pyvista#7686

maintenance

  • Updates the GitHub Actions to run again
  • Bump the required version of PyVista
  • Fix deprecation issues
  • More python testing versions

@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 2025

Codecov Report

Attention: Patch coverage is 67.85714% with 9 lines in your changes missing coverage. Please review.

Project coverage is 44.28%. Comparing base (abd1111) to head (284cb09).

Files with missing lines Patch % Lines
pvxarray/io.py 16.66% 5 Missing ⚠️
pvxarray/_version.py 0.00% 2 Missing ⚠️
pvxarray/rectilinear.py 90.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #81      +/-   ##
==========================================
+ Coverage   43.09%   44.28%   +1.18%     
==========================================
  Files          11       11              
  Lines         478      490      +12     
==========================================
+ Hits          206      217      +11     
- Misses        272      273       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants