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

Rework VTK extents for structured grids #99

Merged
merged 11 commits into from
Jan 21, 2022
Merged

Rework VTK extents for structured grids #99

merged 11 commits into from
Jan 21, 2022

Conversation

jipolanco
Copy link
Member

@jipolanco jipolanco commented Jan 18, 2022

This simplifies and slightly modifies the behaviour of the extent keyword argument for structured grids:

  • extent can no longer be given as a 6-element array [x1, x2, y1, y2, z1, z2]. Instead, it should be passed as a tuple of ranges: (x1:x2, y1:y2, z1:z2).
  • extents now expect one-based indexing. That is, x1 = y1 = z1 = 1 by default. These are transformed to zero-based when writing to VTK.
  • for image data files, extent is now taken into account for shifting the origin from the input coordinates.

Note that extent is undocumented, and in principle only to be used internally to write parallel formats (#98). Therefore this is not really considered a breaking change.

@jipolanco jipolanco merged commit 4119c8b into master Jan 21, 2022
@jipolanco jipolanco deleted the extent branch January 21, 2022 11:34
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.

1 participant