Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
VTK
VTK
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 430
    • Issues 430
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 114
    • Merge Requests 114
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • VTK
  • VTKVTK
  • Merge Requests
  • !5196

Merged
Opened Feb 13, 2019 by Max Zeyen@mzeyen
  • Report abuse
Report abuse

Introduce explicit structured grid data set and related filters

This MR adds a new vtk DataType and related filters:

  • The new class vtkExplicitStructuredGrid;
  • Two new filter vtkImageDataToExplicitStructuredGrid and vtkUnstructuredGridExplicitStructuredGrid for converting to the new type;
  • A new filter vtkExplicitStructuredGridToUnstructuredGrid for converting from the new type;
  • A new filter vtkExplicitStructuredGridCrop , as a first filter specific to the new type;
  • A few tests for these filters.

For information, here is the documentation of the new data structure:

 /* vtkExplicitStructuredGrid is a data object that is a concrete implementation
 * of vtkDataSet. vtkExplicitStructuredGrid represents a geometric structure
 * that is a topologically regular array of hexahedron. The topology is that of
 * a cube that has been subdivided into a regular array of smaller cubes.
 * Each cell can be addressed with i-j-k indices, however neighbor hexahedrons
 * does not necessarily share a face and hexahedron can be blanked (turned-off).
 *
 * Like unstructured grid, vtkExplicitStructuredGrid has explicit point coordinates
 * and cell to point indexing.
 * Unlike unstructured grid, vtkExplicitStructuredGrid does not keep a cell type
 * list as all cells are known to be hexahedra.
 * vtkExplicitStructuredGrid can take advantage of its layout to perform operations
 * based on the i, j, k parameters, similar to structured grid. This makes some
 * operations faster on this class, without loosing the flexibility of the
 * cell -> points mapping.
 * The most common use of this class would be in situations where you have all
 * hexahedra but the points used by the cells are not exactly defined by the
 * i, j, k parameters. One example of this is a structured grid with a half voxel
 * shift occurring in the middle of it such as with a geologic fault.
 *
 * The order and number of points is arbitrary.
 * The order and number of cells must match that specified by the dimensions
 * of the grid minus 1, because in vtk structured datasets the dimensions
 * correspond to the points.
 * The cells order increases in i fastest (from 0 <= i <= dims[0] - 2),
 * then j (0 <= j <= dims[1] - 2), then k ( 0 <= k <= dims[2] - 2) where dims[]
 * are the dimensions of the grid in the i-j-k topological directions.
 * The number of cells is (dims[0] - 1) * (dims[1] - 1) * (dims[2] - 1).
 */
Edited Feb 14, 2019 by Joachim Pouderoux

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch "https://gitlab.kitware.com/mzeyen/vtk.git" "IntroduceExplicitStructuredGridDataSet"
git checkout -b "mzeyen/vtk-IntroduceExplicitStructuredGridDataSet" FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout "origin/master"
git merge --no-ff "mzeyen/vtk-IntroduceExplicitStructuredGridDataSet"

Step 4. Push the result of the merge to GitLab

git push origin "master"

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 11
  • Commits 2
  • Pipelines 4
  • Changes 36
Assignee
Assign to
9.0
Milestone
9.0
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: vtk/vtk!5196

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.