Skip to content

API-interoperability: implement loading of a Grid from a native object #162

Open
1 of 2 issues completed
Open

Description

@orbeckst

Implement creating a Grid from a native object as described in the parent issue #160 for

Sub-issues

Sub-issues

1 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. orbeckst commented on Feb 9, 2026

    @orbeckst
    MemberAuthor

    We can create sub-issues for MRC and VDB.

  2. added theissue type on Apr 24, 2026
  3. added
    format-OpenDX
    format-MRC
    on Apr 24, 2026
  4. added
    format-OpenVDB
    on May 23, 2026
  5. orbeckst commented on May 29, 2026

    @orbeckst
    MemberAuthor

    In principle, we should treat

    • filename (str)
    • array (array_like) + edges + origin
    • grid (Grid)

    also as part of how to treat the input argument grid.

    To make this approach maintainable and extensible, we should be thinking about breaking the loading process into steps

    1. format detection
    2. dispatch to a loader that returns either a Grid or a wrapper data structure
    3. extract data from loader into the Grid (if necessary)

    Ideally, we have the loader functionality bundled with the wrapper classes when possible so that all format-specific code lives in the same place.

  6. orbeckst commented on Sep 1, 2026

    @orbeckst
    MemberAuthor

    Make sure to document the "reading" capabilities for OpenVDB, namely from PR #170

    import openvdb as vdb
    grids, _ = vdb.readAll(VDBFILE)
    grid_vdb = grids[0]
    g = Grid(grid=grid_vdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    format-MRCformat-OpenDXformat-OpenVDB

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions