Contents Menu Expand Light mode Dark mode Auto light/dark mode
VTK documentation
Logo
VTK documentation

Contents

  • About
  • Getting Started
  • Learning
  • Supported Data Formats
  • Supported Hardware
  • Modules
    • VTK::DomainsMicroscopy
    • VTK::FiltersCellGrid
    • VTK::FiltersOpenTURNS
    • VTK::GUISupportQt
    • VTK::IOADIOS2
    • VTK::IOCellGrid
    • VTK::IOCesium3DTiles
    • VTK::IOFLUENTCFF
    • VTK::IOOCCT
    • VTK::IOXDMF2
    • VTK::RenderingANARI
    • VTK::RenderingCellGrid
    • VTK::RenderingOpenVR
    • VTK::RenderingOpenXR
    • VTK::RenderingOpenXRRemoting
    • VTK::RenderingVR
    • VTK::RenderingWebGPU
    • Regular buffers
    • Render buffers
    • Buffer/Textures registration
    • Compute passes
    • Description
    • Compute pass & pipeline - Usage outside a rendering pipeline
    • Chained compute passes
    • Uniforms
    • Textures
    • Compute pass & pipeline - Integration in an existing rendering pipeline
    • Using a dedicated GPU device
    • Updating the GLAD library sources
    • vtkX11Functions
    • VTK::WrappingPythonCore
    • Wrapping Tools
  • Building
    • Build Settings
  • API
    • C++
    • Python
      • vtkmodules
        • vtkmodules.gtk
          • vtkmodules.gtk.GtkVTKRenderWindowInteractor
          • vtkmodules.gtk.GtkVTKRenderWindow
          • vtkmodules.gtk.GtkGLExtVTKRenderWindowInteractor
          • vtkmodules.gtk.GtkGLExtVTKRenderWindow
        • vtkmodules.test
          • vtkmodules.test.BlackBox
          • vtkmodules.test.ErrorObserver
          • vtkmodules.test.Testing
          • vtkmodules.test.rtImageTest
        • vtkmodules.tk
          • vtkmodules.tk.vtkTkRenderWidget
          • vtkmodules.tk.vtkTkImageViewerWidget
          • vtkmodules.tk.vtkTkRenderWindowInteractor
          • vtkmodules.tk.vtkTkPhotoImage
        • vtkmodules.qt
          • vtkmodules.qt.QVTKRenderWindowInteractor
        • vtkmodules.numpy_interface
          • vtkmodules.numpy_interface.vtk_aos_array
          • vtkmodules.numpy_interface.algorithms
          • vtkmodules.numpy_interface.utils
          • vtkmodules.numpy_interface.vtk_affine_array
          • vtkmodules.numpy_interface.vtk_soa_array
          • vtkmodules.numpy_interface.internal_algorithms
          • vtkmodules.numpy_interface._vtk_array_mixin
          • vtkmodules.numpy_interface.vtk_none_array
          • vtkmodules.numpy_interface.dataset_adapter
          • vtkmodules.numpy_interface.vtk_constant_array
          • vtkmodules.numpy_interface.numpy_algorithms
          • vtkmodules.numpy_interface.vtk_implicit_array
          • vtkmodules.numpy_interface.vtk_partitioned_array
          • vtkmodules.numpy_interface.array_overrides
        • vtkmodules.wx
          • vtkmodules.wx.wxVTKRenderWindow
          • vtkmodules.wx.wxVTKRenderWindowInteractor
        • vtkmodules.util
          • vtkmodules.util.vtkAlgorithm
          • vtkmodules.util.data_model
          • vtkmodules.util.execution_model
          • vtkmodules.util.keys
          • vtkmodules.util.vtkMethodParser
          • vtkmodules.util.xarray_support
          • vtkmodules.util.vtkImageExportToArray
          • vtkmodules.util.vtkConstants
          • vtkmodules.util.numpy_support
          • vtkmodules.util.vtkImageImportFromArray
          • vtkmodules.util.pickle_support
          • vtkmodules.util.vtkVariant
          • vtkmodules.util.misc
          • vtkmodules.util.functions
          • vtkmodules.util.colors
        • vtkmodules.generate_pyi
    • CMake
      • Module System
      • vtkModule
      • vtkModuleSerialization
      • vtkModuleTesting
      • vtkModuleWrapPython
      • vtkModuleWrapJava
      • vtkModuleWrapJavaScript
      • vtkModuleJSON
      • vtkModuleGraphviz
  • Advanced Topics
    • Additional Python Wheels
    • SPDX & SBOM
    • Building Python Wheels
    • Building using emscripten for WebAssembly
    • Cross-compiling for Mobile devices
    • Building documentation
    • Object manager
    • Object serialization
    • Python Wrappers
    • Runtime settings
    • Wrapping Tools
    • VTK Wheel SDKs
    • Migration Guides
      • Module Migration from VTK 8.2 to 9+
  • VTK File Formats
    • Simple Legacy Formats
    • XML File Formats
    • VTKHDF File Format
      • VTKHDF format specification
      • VTKHDF: Implementation Status
      • Examples
  • Design Documents
    • Parallel Processing with VTK’s SMP Framework
    • vtkArrayDispatch and Related Tools
    • Data Assembly
    • VTK Legacy Reader/Writer Information Format
    • VTK XML Reader/Writer Information Format
    • Field Data as Time Meta-Data in VTK XML File Formats
    • MomentInvariants Architecture
    • VTK WASM regression test suite architecture
  • Developer’s Guide
    • Develop
    • Regression Testing
    • Adding Tests
    • Dashboard Scripts
    • Updating Third Party Projects
    • Imported Third Party Projects
    • Deprecation Process
    • Release Process
    • Coding Conventions
    • About this documentation
  • Resources
  • Release Details
    • 9.6
      • Arrays have been added and deprecated
      • Add JavaScript wrappers with Emscripten
      • Add missing selection mode behavior in parallel coordinates chart
      • Add numpy support for composite arrays
      • Add support for ONNX runtime
      • Adding stream support to various readers
      • New USD exporter added
      • Add an abstract vtkCartesianGrid
      • Querying and resetting arrays to process
      • Specify array components to process
      • Modified vtkDataArray::CopyComponents signature
      • Fixed compile errors for IsHipDevicePointer
      • Performance: Faster observer operations in vtkObject.
      • Refactor of the AMR data model
      • Add Support for AMR of vtkRectilinearGrid
      • Changes
      • Statistics algorithms refactored
      • vtkAbstractArray: Replace most of GetVoidPointer instances
      • Replace unsafe c from/to string functions
      • Introduce the implicit vtkStridedArray: a strided view on a buffer
      • vtkCellArray: Support offsets/connectivity as vtkDataArray including vtkAffineArray for Offsets
    • 9.5
      • Introduce vtkExplodeDataSet filter
      • Add option to independently set thickness of cell edges and lines
      • Add getter and setter functions for the text on the buttons of vtkCameraOrientationRepresentation
      • Add new setting to specify 2D point shape in vtkProperty
      • Add Prolab Transfer function interpolation support
      • vtkConduitSource: Add state/metadata/vtk_fields node
      • Added new class to manually create a Cocoa NSAutoreleasePool
      • Add SurfaceProbeVolumeMapper
      • vtkAxisActor and vtkPolarAxesActor breaking changes
      • Remove usage of the nlohmannjson library from public facing API
      • vtkDelimitedTextReader improvements
      • EnsightCombinedReader: Performance improvements pass
      • Fix issue with Fides not initializing HIP before using it
      • Remove error for missing Fides timestep
      • Fix vtkCompositePolyDataMapper opacity override
      • vtkDIYGhostUtilities: Ensure arrays are enqueued and dequeued properly
      • Polygon centroid computation fixed
      • vtkPolyhedron: Implement GetCentroid and use it in GetParametricCenter
      • Python VTK data model
      • Add zone section selection to FLUENT Reader
      • Introduce New vtkFrustum Implicit Function and Widget
      • GLTF document loader selectively toggle model data
      • HTG Surface Representation improvements
      • Improve IBO construction performances in vtkOpenGLIndexBufferObject
      • vtkOpenFOAMReader: Multithreaded Reading of case files
      • OpenFOAM reader: allow _0 files
      • Fix lighting calculations for PBR interpolation
      • Multi-touch gestures in QtQuick/QML
      • vtkGenerateRegionIds
      • Relative Mode for vtkTemporalArrayOperatorFilter
      • Transition from VTKm to Viskores
      • Add UseOIT flag to vtkRenderer
      • Support for Blueprint implicit topology using point set
      • Implicit Widget Representations Improvements
    • 9.4
      • ABI Mangling extension for C/C++ ABI in VTK
      • New vtkBTSReader for Engys’ BTS (Binary Triangulated Surface) files
      • New vtkERFReader for ERF HDF5 File Format
      • New vtkFDSReader for Fire Dynamics Simulator output
      • Introduce vtkForEach filter
      • Introduce vtkForceStaticMesh filter
      • New flag vtkRenderWindowInteractor::InteractorManagesTheEventLoop for event loop
      • Disable rendering of interior faces that are between cells of different order
      • vtkHyperTreeGridThreshold now supports multiple strategies for representing its output in memory
      • ANARI Rendering Module
      • Add vtkAppendPartitionedDataSetCollection
      • Add VTK::catalyst module
      • Add the vtkCriticalTime filter
      • FLUENT Reader handles zones
      • Add Graphics Backend Preference Option For WebGPU Render Window
      • Add spatio-temporal harmonics filter/source
      • Add SMP support to more transform classes
      • Add new polyline decimation strategies
      • Support OpenGL tessellation shaders
      • Accept keyword arguments in constructor for python wrapped VTK classes
      • Introduce vtkDataObjectMeshCache
      • vtkImageData/vtkRectilinearGrid/vtkStructuredGrid: Improve performance using structured Points, Cells, CellTypes
      • Add support for arbitrary polyhedra to Xdmf2.
      • Add vtkBatch/vtkBatches and improve vtkTablaBasedClipDataSet’s performance
      • Support writing VTKHDF files
      • New vtkImplicitArrays!
      • ADIOS2 VTX reader changes
      • Add Alembic scene exporter
      • New vtkAnnulus Implicit Function and Widget
      • Integer API for vtkDataArray
      • New renderer for shader prototyping
      • Add support for AMReX derived overlapping AMR datasets in situ with Catalyst 2
      • Cell Grid Data-object Improvements
      • Fix cell-grid initialization
      • Fixed Cocoa incorrect KeySym
      • Fix issues with VTK / VTK-m array conversion
      • Delimited Text Reader Performances
      • SDL2 usage is now disabled by default
      • Rewrite reader for EnSight Gold files
      • Golden Ball Source
      • Fix backface color in glyph 3D mapper
      • Fix deserialization bug in vtkCollection
      • Fix bug with removing and adding a new vtkOrientationMarkerWidget
      • Fix scaling error in vtkWindowedSincPolyDataFilter
      • Fix X error about maximum clients reached
      • Support collaboration among CAVEs
      • Image testing framework in vtkTesting has a new opt-in backend
      • vtkCesium3DTilesReader improvements
      • vtkLegendScaleActor improvements
      • Some function-like macros now require trailing semi-colons
      • Multi-touch gestures in VTK
      • Added new Python API for connecting pipelines
      • Added a new information key for in situ use
      • C++ char parameters only take Python chars
      • Add Hint to Improve Python Concurrency
      • Numpy integration improvements
      • vtkCell Triangulate function refactoring
      • Refactor the vtkRedistributeDataSetFilter for more modularity
      • Infinite floor plane with vtkSkybox
      • Improve speed of vtkUnstructuredGridGeometryFilter for higher order cells
      • vtkPolyDataNormals: Split into separate classes
      • String tokenization
      • OpenXR Controller Model Rendering
      • Add support for fallback to EGL or OSMesa in Linux and Windows at runtime
      • Virtual/Mixed Reality rendering improvements
      • Improvements related to vtk Polyhedral cell storage
      • vtkPolygon: EarCutTriangulation function change.
      • WebGPU Compute API - Hierarchical two-pass occlusion culling
    • 9.3
    • 9.2
    • 9.1
    • 9.0
    • 8.2
    • 8.1
    • 8.0
    • 7.1
    • 7.0
    • 6.3
    • 6.2
    • 6.1
    • 6.0
    • 5.10
    • 5.8
    • 5.6
    • 5.4
    • 5.2
    • 5.0
Back to top

Improvements related to vtk Polyhedral cell storage#

Storing faces as vtkCellArray#

When storing face information for polyhedral cells, vtkUnstructuredGrid uses a vtkIdTypeArray in a special format that looks awfully similar to how vtkCellArray used maintain its internal storage. The new internal storage simply changes it to using vtkCellArray instead. That will allow us to use a non-interleaved storage for faces. Together with using a vtkCellArray for FaceLocations the one-2-many relationship can be easily preserved without resorting to custom layout used by the Faces array.

So here’s the current storage structure:

  • Connectivity (vtkCellArray): simply stores point ids for all points for each polyhedral element

  • Faces (vtkCellArray): each element defines a polygonal face. The indices per element directly refer to point ids.

  • FaceLocations (vtkCellArray): each element identifies a polyhedral cell. The indices per element reference face defined in the ElementFace array.

Contrast this with how this information was previously stored:

  • Connectivity (vtkCellArray): simply stores point ids for all points for each polyhedral element (same as in the new proposal)

  • (Legacy)Faces (vtkIdTypeArray): an interleaved array of the form (numCellFaces, numFace0Pts, id1, id2, id3, numFace1Pts,id1, id2, id3, ...)

  • (Legacy)FaceLocations (vtkIdTypeArray): offset array into (Legacy)Faces array indicating where the faces for a corresponding cell are stored

Backward compatibility#

To ensure a nice transition to the new storage, some old API are kept. More precisely the method void SetCells(vtkUnsignedCharArray* cellTypes, vtkCellArray* cells, vtkIdTypeArray* faceLocations, vtkIdTypeArray* faces); from vtkUnstructuredGrid is deprecated but can still be used. In this case a copy of faceLocations and faces data will be done. Another case are the GetFaces and GetFaceLocations methods. They are still available but an internal cache with the old internal layout is used. It means that they should be considered as read only methods and not be relied on to change internal data of vtkUnstructuredGrid. The caching process may impact a bit performance.

The FaceConn and FaceLocs internal arrays of vtkUnstructuredGridCellIterator are no longer available as vtkIdTypeArray. This may break your subclasses if you rely on them directly and not on the exposed API of vtkUnstructuredGridCellIterator. A solution to keep using them in subclasses is to define them directly in subclasses and handle their logic.

Compatibility with Conduit#

The new layout is much closer to how Conduit store its polyhedral cell information. Thus, some gain should be expected on the long run.

Next
vtkPolygon: EarCutTriangulation function change.
Previous
Virtual/Mixed Reality rendering improvements
Copyright © 2023, VTK Developers
Made with Sphinx and @pradyunsg's Furo
On this page
  • Improvements related to vtk Polyhedral cell storage
    • Storing faces as vtkCellArray
    • Backward compatibility
    • Compatibility with Conduit