9.3#
Released on 2023-11-09.
9.3.0 Release Notes#
Changes made since VTK 9.2.0 include the following.
Changes#
Build#
Compile fixes for C++20 builds with gcc11.
Apply /utf-8 option for MSVC builds for standardization.
Headers
vtkBlockSortHelper.h
fromVTK::RenderingVolume
andvtkDIYKdTreeUtilities.h
fromVTK::FiltersParallelDIY2
are now installed.The
vtk-config.cmake
CMake package no longer permits unknown components to be listed and will report them as not found. This helps ensure the usabilityVTK::Component
whenVTK_Component_FOUND
is set.The
vtk_encode_string
CMake API now supports theABI_MANGLE_SYMBOL_BEGIN
,ABI_MANGLE_SYMBOL_END
, andABI_MANGLE_HEADER
arguments to specify a mangling mechanism. Previously (where mangling was supported), it was hard-coded to VTK’s own mangling decisions.
Charts#
Uniformize the
vtkPlot
API for color setters/getter, in order to fit the API ofvtkPen
andvtkBrush
. Methods using floating point parameters (e.g.vtkPlot::SetColor(double r, double g, double b)
) are now suffixed withF
to avoid confusion with equivalent functions using unsigned chars. The former ones are marked as deprecated.vtkChartParallelCoordinates
’s default selection behavior has been simplified. Multiple selection is no longer supported inSELECTION_DEFAULT
.
Copyright#
SPDX information have been added and replace all previous copyright declaration in all of VTK. See more information on the process used.
Core#
OSPRay has been disabled for older x86_64 processors which do not support SSE4.1.
Removed hidden private dependency of
CommonCore
onCommonDataModel
.Nested parallelism has been disabled by default for all backends except TBB, which should improve performance. Enabling nested parallelism is still possible when sub-task are coarse enough, using the
SetNestedParallelism
method or aLocalScope
.Improved
vtkSMPTools
STDThread backend. A common, global, thread pool is now shared between all SMP calls, so they no longer create threads.
Data#
vtkPolyLine::Clip
improved to generate polylines whenever possible.vtkCompositeDataSet::ShallowCopy
now does an actual shallow copy up to array pointers.Fixed calculation of
vtkPyramid
centroid.
Filters#
VTK’s interruption method has been updated to use
CheckAbort
.CheckAbort
will check the current filter’sAbortExecute
flag as well as any upstream filter’sAbortExecute
flag. If any are set, the filter will output empty data and tell downstream filters to abort as well. Currently,vtkContourGrid
,vtkClipDataSet
,vtkShrinkFilter
, andvtkRTAnalyticSource
.vtkmContour
’sComputeScalars
parameter has been fixed to behave likevtkContourFilter
.vtkExtractCells
has been relocated fromFilters/Extraction
toFilters/Core
.vtkTemporalDataSetCache
now deep copies data by default.
Geovis#
Moved
vtkCompassWidget
andvtkCompassRepresentation
fromGeovis/Core
toInteraction/Widgets
.
Interaction#
vtkSelectPolyData
now passes cell data attributes to the selected and unselected outputs.Output support fixed for
vtkSelectPolyData
whenGenerateSelectionScalars
is enabled.
I/O#
vtkPLYReader
changed to use newvtkResourceStream
IO.vtkPLY::get_ascii_item
signature changed fromvoid(const char*, int, int*, unsigned int*, double*)
tovoid(vtkResourceParser*, int, int*, unsigned int*, double*)
vtkPLY::ply_read
signature changed fromPlyFile*(std::istream*, int*, char***)
toPlyFile*(vtkResourceStream*, int*, char***)
vtkPLY::get_words
signature changed fromvoid(std::istream* is, std::vector<char*>* words, char line_words[], char orig_line[])
tovoid(vtkResourceParser* is, std::vector<char*>* words, char line_words[], char orig_line[])
vtkPIOReader::GetTimeDataArray
now returnsnullptr
when the index is out-of-range.CGNS fixed compilation with HDF5 1.12.
vtkSTLReader
fixed to not consume new lines erroneously.
Python#
OSMesa VTK wheels are now provided. These are available on VTK’s official channels (the VTK repository’s Python index and
vtk.org
), but not PyPI because OSMesa conflicts with other OpenGL packages.The numpy adapter (
util.numpy_support
) convertsnumpy.int8
arrays tovtkSignedCharArray
rather thanvtkCharArray
, to ensure that signedness is preserved by the conversion.
Rendering#
Fix wireframe render shading issues for some GPUs.
VTK previously exported a lot of its shader strings from its libraries. Now only those that are available through installed headers are available. These include:
vtkTextureObjectVS
fromVTK::RenderingOpenGL2
vtkCompositeZPassFS
fromVTK::RenderingParallel
Volume label mapping improved to properly index upto 256 labels each with their own color, opacity and gradient transfer functions.
System#
vtkExecutableRunner
’s argument splitting system has been overhauled. There are now 2 modes to execute a command using theExecuteInSystemShell
flag:When
ExecuteInSystemShell
istrue
(default), the class will execute the given command in the system shell, leaving the actual argument split to the shell.When
ExecuteInSystemShell
isfalse
, you will have to split the command and its arguments yourself using the newAddArgument
API.
Third Party#
VTK’s vendored
zlib
library has been updated to 1.2.13.VTK’s vendored
fmt
library has been updated to 9.1.0.VTK’s vendored
ioss
library has been updated to the 2022-10-14 release.VTK’s vendored
libtiff
library has been updated to 4.6.0. The new version fixes a number of CVEs.VTK’s vendored
netcdf
library has been updated to 4.9.2.VTK’s vendored
mpi4py
library has been updated to 3.1.4.VTK’s vendored
expat
library has been updated to 2.4.8.VTK’s vendored
libxml2
library has been updated to 2.10.1.VTK’s vendored
PDAL
library has been updated to 2.1.Added fix for
Proj
compatibility withwindows.h
with the VTKSTRICT
definition.
New Features#
ABI Namespace#
VTK is now wrapped in a customizable
inline namespace
(VTK_ABI_NAMESPACE
). To wrap code in the ABI namespace useVTK_ABI_NAMESPACE_BEGIN
andVTK_ABI_NAMESPACE_END
. This change means you can now link different versions of VTK into the same runtime without generating conflicts between VTK symbols. Note: this does not prevent conflicts with third-part symbol (including VTK-m).Where to put namespaces:
Around classes, functions, variables, typedefs (optional).
Inner most named namespaces, there is no need to use the ABI namespace inside of an anonymous namespace.
ABI namespace should never be around a named namespace.
Forward declarations of classes/functions/variables/typedefs require ABI namespace if their implementation/declarion was inside the ABI namespace.
Where not to put namespace:
Do not namespace around non-exported classes/functions/variables/typedefs (usually found in tests).
Do not namespace around main functions.
Python bindings cannot be namespaced.
Most Utilities are not namespaced, including vtksys/vtkmeta/ksys.
It doesn’t hurt anything, but it is not required to namespace symbols that are compiled into a driver (such as Wrapping Tools).
Some VTK modules have C interfaces that cannot be mangled:
VTK::CommonCore (GetVTKVersion)
VTK::IOXML (Provides a C API,
vtkXMLWriterC_-
)VTK::WrappingPythonCore (Python Wrapping cannot have mangling)
Thirdpary Libraries and their VTK module wrappers do not have mangling:
VTK::metaio
VTK::xdmf2
VTK::vpic
All C libraries (ie. HDF5, netCDF, etc.)
VTKm CUDA Accelerators do not get mangled:
VTK::AcceleratorsVTKmCore
VTK::AcceleratorsVTKmDataModel
VTK::AcceleratorsVTKmFilters
Build#
VTK_LOGGING_TIME_PRECISION
can be used to change the precision of loguru timing output (whenVTK_ENABLE_LOGGING
is ON).VTK_ZSPACE_USE_COMPAT_SDK
can be used to control runtime search for zSpace Core Compatibility libraries. Default is ON, disabling the search.VTK_GENERATE_SPDX
can be used to generate SPDX files for each VTK module. Default is OFF. The generation of SPDX files is considered experimental.Added
VTK_USE_FUTURE_BOOL
configure-time variable. The codebase contains many variables typed asint
that really should bebool
. But changing them breaks backwards compatibility, and so avtkTypeBool
typedef was introduced which is defined to eitherint
orbool
depending on the newVTK_USE_FUTURE_BOOL
configure-time variable. This allows for the piecemeal changing of manyint
variables tovtkTypeBool
.
Charts#
vtkChartParallelCoordinates
now has a chart legend which can be toggled with theSetShowLegend
method. This legend can be customized using thevtkChartLegend
API.vtkPlotParallelCoordinates
now has the option to set a preconfigured color array usingSetColorModeToDefault
.Fixed bug where calling
vtkPlotBar.GetLookupTable
caused a segmentation fault when no data had been plotted.You can now set an array name for the
vtkPlotHistogram2D
. This allows you to set an array that is not scalar, ie. an array with a number of components greater than 1.
Core#
vtkMath::GetPointAlongLine
can be used to compute a point along a line defined by two points and an offset.vtkValueFromString
is a new low-level function that converts a string to an integer, a floating-point value or a boolean.vtkValueFromString
is faster than standard library functions such as thestd::strto*
function family.VTK now provides a way to obtain type names at compile time in the
Common/Core/vtkTypeName.h
header:#include "vtkTypeName.h" // ... std::string typeName = vtk::TypeName<vtkImageData>(); std::cout << typeName << std::endl;
The
vtkStringToken
class introduces a utility for hashing strings at either compile or run-time and using the resulting integers as tokens. Additional utilities regarding compile-time hashing have also been added:vtkStringManager
holds strings hashed at runtime. This makes it possible for the string-token class to return the original string to you in some cases. Because the manager holds a map from string-hash to string, only a single copy of the string is stored no matter how many copies of the token exist.Added new
vtk::literals
namespace for creating hashes and tokens at compile time.""_hash
- returns a 32-bit integer hash of the given string.""_token
- returns avtkStringToken
instance of the given string. Note that because the hash is computed during compilation, you may not call the token’sData()
method to retrieve the string unless it is inserted at run time by some other code.
Since hashing is performed at build time, the following example is possible:
#include "vtkStringToken.h" using namespace vtk::literals; vtkStringToken t; switch (t.GetId()) { case "foo"_hash: foo(); break; case "bar"_hash: bar(); break; default: vtkErrorMacro("Unknown token " << t.Data()); break; }
VTK now provides a way to iterate over a class and all its ancestor types (as long as they inherit
vtkObjectBase
and use thevtkTypeMacro()
to defineSuperclass
type-aliases). Thevtk::ParentClasses<T>::enumerate()
function will invoke a functor you pass onT
and each superclass ofT
. This is used by a newvtk::Inheritance<T>()
function that inserts the name of each class inherited byT
into a container you pass to it. SeeCommon/Core/Testing/Cxx/TestInherits
for example usage.vtkThreadedCallbackQueue
can be used to run functions in the background on different threads. Use thePush
method to add functions to the queue. ThePush
method returns avtkSmartPointer<vtkThreadedCallbackQueue::vtkSharedFutureBase>
, which lets users synchronize tasks.
Data#
Added
vtkImplicitArray
template class that implements a read-onlyvtkGenericDataArray
interface which transforms an implicit function mapping integers to values into a practically zero costvtkDataArray
. This is helpful in cases where one needs to attach data to data sets and memory efficiency is paramount.Additional backends have been added in the
vtkImplicitArray
framework:vtkAffineArray
that gets constructed with a slope and intercept and then returns values linearly depending on the queried index.vtkCompositeArray
that takes anstd::vector<vtkDataArray*>
at construction and returns values as if the list has been concatenated into one array.vtkConstantArray
that gets constructed with a given value and then returns that same value regardless of the index queried.vtkStdFunctionArray
which uses astd::function<ValueType(int)>
backend capable of covering almost any function one might want to use.vtkIndexedArray
that takes an indexing array (eithervtkIdList
orvtkDataArray
) and a basevtkDataArray
at construction and returns values indirected using the indexing array to give access to a shuffled array without the memory cost.
Read more about
vtkImplicitArrays
here.
ProcessIds
data array is now accessible directly fromvtkDataSetAttributes
just like any other data array (e.g GlobalIds or Normals).Added
vtkCellGrid
. It exists to support finite element techniques using novel function spaces, which violate vtkDataSet’s assumptions – especially discontinuous Galerkin (DG) elements.vtkPolyhedronUtilities
added to support polyhedron decomposition into tetrahedra. Improves downstream filter results (e.g. contours) on polyhedrons with concave faces.Added new
vtkPolyhedron::TriangulateFaces
method.Added new
vtkStaticFaceHashLinksTemplate
templated class that can be used to group faces of an unstructured grid and eliminates duplicates.Added
vtkHyperTreeGridGeometricLocator
which is a geometric locator forvtkHyperTreeGrid
datasets.vtkHyperTreeGrid
has a new type of cursor, calledunlimited
cursors.vtkHyperTreeGridNonOrientedUnlimitedMooreSuperCursor
andvtkHyperTreeGridNonOrientedUnlimitedGeometryCursor
have been added.vtkDataSet::GetCellNumberOfFaces
can be used to get the number of faces in a given cell.vtkBoundingBox::ComputeBounds
added to compute the bounds for a set of points. This is used for theGetCellBounds
method invtkUnstructuredGrid
,vtkPolyData
, andvtkExplicitStructuredGrid
.Added
vtkCompositeDataSet::CompositeShallowCopy
which shallow copies up to dataset pointers only.Add new
vtkNonLinearCell::StableClip
method andvtkQuadraticTetra::StableClip
implementation. The goal of this clip is to only decompose a cell if its actually clipped, otherwise keep the non-linear cell in its entirety. Note: this clipping approach will lead to topological holes between decomposed cells and the remaining non-linear cells.vtkPolyData::BuildCells
has been multithreaded.Improved performance of
vtkUnstructuredGrid
’sIsCellBoundary
/GetCellNeighbors
methods.Improved stability of
vtkCellLocator::FindClosestPointWithinRadius
.
Documentation#
The VTK documentation has undergone a major update and consolidation to enhance its usefulness for developers. The
/Documentation/docs
directory now contains the contents and configuration for the Sphinx-based website, published on the ReadTheDocs platform at https://docs.vtk.org. This consolidates all existing documentation for VTK, including the newly added list of supported data formats, API of all VTK public CMake modules, the VTK formats specification (previously part of vtk-examples), and the general information about the VTK project. Software process and conventions documentation has also been moved from docs.google.com to the new website.In addition to the documentation website, two new resources have been introduced: the VTK book, which hosts the markdown version of the VTK book at https://book.vtk.org and VTK examples at https://examples.vtk.org, which contain many examples with redirects put in place to ensure the previous URL remains functional. Many other updates to the documentation have also been made, including improved documentation structure, removal of obsolete documents, and addition of imported third-party projects to the developer guide. VTK documentation now follows a versioning system and is actively maintained alongside the code.
Contributions and feedback are welcome for all three websites to ensure that the VTK documentation remains up-to-date.
Next steps
The next steps for the VTK documentation project include setting up a versioning system for docs, doxygen, and the book. Work is also underway to include a description of each
Modules
(as well as aREADME.md
file) indocs.vtk.org
. And there are plans to explore the possibility of using merge request previews for the documentation so that contributors don’t have to compile it themselves.For
examples.vtk.org
, the plan is to consolidate examples from VTK andvtk-examples
.Pages on the
mediawiki
site will be marked as deprecated, and a link todocs.vtk.org
will be included.These efforts will help ensure that VTK documentation remains user-friendly and accessible to all developers.
Filters#
Added Filters/GeometryPreview module which include filters for creating a preview of the geomertry of a dataset. Current GeometryPreview filters are:
vtkPointSetToOctreeImageFilter
, used to convert avtkPointSet
into an image with a number of points per cell target and anunsigned char
octree cell array.vtkOctreeImageToPointSetFilter
, used to convert an image with anunsigned char
octree cell array to avtkPointSet
.vtkPointSetStreamer
, used to stream points as buckets.
vtkImageReslice
now supports oriented images, and can reslice an image into a new orientation via the newSetOutputDirection()
method.vtkDistancePolyDataFilter
can now output directions in conjunction with the (signed/unsigned) distances. This is enabled usingComputeDirection
(default:off).vtkVortexCore
now outputs 2 extra arrays,vorticity
andvorticity_magnitude
.vtkQuadricDecimation
has the following changes:Added new
MapPointData
property to which maps input point data to its decimated output.Added regularization mode. This is enabled by setting
vtkQuadricDecimation::SetRegularize(true)
andvtkQuadricDecimation::SetRegularization(value)
wherevalue
is the standard deviation used in the Gaussian distribution.
vtkHyperTreeGridGradient
has added support for vector fields. The resulting gradient has 3 times the number of components as the input field. Additionally, vorticity, divergence and Q-Criterion can now be computed.vtkHyperTreeGridContour
now has 2 contour strategies in the 3D case: the former behavior calledUSE_VOXELS
, and the newUSE_DECOMPOSED_POLYHEDRA
which can produce better contour results when the generated dual cells used for contouring appear to be concave. Note:USE_DECOMPOSED_POLYHEDRA
is much slower than the former strategy.vtkExtractCells
has new flagsPassThroughCellIds
andOutputPointsPrecision
.vtkProbeFilter
has new flagSnapToCellWithClosestPoint
which can be used withvtkPointSet
inputs to snap the probe points to the cell with the closest point.vtkPlaneCutter
has new flagsOutputPointsPrecision
andMergePoints
.vtkPCANormalEstimation
has two new search modes used for the selection of neighbor points: KNN and RADIUS.Various optimizations for
vtkGeometryFilter
:Significant memory reduction (x5) with the introduction of
vtkStaticFaceHashLinksTemplate
.Significant speedup (x100) for
vtkGeometryFilter
’s conversion ofvtkUnstructuredGrid
tovtkPolyData
if thevtkUnstructuredGrid
has only either vertices, or lines, or polys, or strips.
Improved performance of
vtkResampleToImage
.Improved performance of
vtkDistancePolyDataFilter
.Improved performance of
vtkFrustumSelector
.Improved performance of
vtkExtractSelection
.Improved memory performance for
vtkCellDataToPointData
.Added more VTK-m accelerated filter overrides. If the
VTK::AcceleratorsVTKmFilters
is enabled and the CMake optionVTK_ENABLE_VTKM_OVERRIDES
is ON, the following filters will be overridden:vtkGradientFilter
->vtkmGradient
vtkTableBasedClipDataSet
->vtkmClip
vtkCutter
->vtkmSlice
vtkThreshold
->vtkmThreshold
vtkCellDataToPointData
->vtkmAverageToPoints
vtkPointDataToCellData
->vtkmAverageToCells
The following filter components have been multithreaded:
vtkRectilinearGrid::GetPoints
vtkExtractCells
vtkExtractSelection::ExtractSelectedCells
vtkExtractSelection::ExtractSelectionPoints
vtkExtractGeometry
vtkPolyDataNormals
vtkProbeFilter::ProbeEmptyPoints
vtkTableBasedClipDataSet
vtkThreshold
New filter
vtkHyperTreeGridPProbeFilter
can be used to probe avtkHyperTreeGrid
usingvtkDataSet
.New filter
vtkFieldDataToDataSetAttribute
provides a way to efficiently pass FieldData single-value arrays to other AttributeData. This is useful for composite data, where FieldData can be used to store a single scalar, varying at block level only. Moving this scalar, for instance, to PointData, allows to use it in your pipeline.New filter
vtkTensorPrincipalInvariants
computes principal values and vectors from 2D and 3D symmetric tensors.The new
vtkYieldCriteria
filter computes different yield criteria from given 2D or 3D symmetric tensors. Available yield criteria currently include:Tresca criterion
Von Mises criterion
Added support for
vtkHyperTreeGrid
withvtkValueSelector
,vtkLocationSelector
andvtkFrustumSelector
. The selections generate can also now be extracted with thevtkExtractSelection
filter.Added
HyperTreeGridToUnstructuredGrid
boolean flag tovtkExtractSelection
filter to control whether to output an unstructured grid (whentrue
) or a hyper try grid (whenfalse
, the default).Fix
vtkHyperTreeGridAxisClip
wheninsideout
istrue
.The
vtkHyperTreeGridGeometry
filter now providesPassThroughCellIds
(defaultfalse
) to pass through original cell IDs from the inputvtkHyperTreeGrid
to the outputvtkPolyData
.Added support for
vtkHyperTreeGrid
resampling withvtkResampleWithDataSet
andvtkPResampleWithDataSet
filters.vtkPolyDataToUnstructuredGrid
is a new multithreaded filter that converts
vtkPolyData
tovtkUnstructuredGrid
.Added
vtkAttributeDataToTableFilter
filter to VTK from ParaView. It serves to turn a data object into a table by shallow copying its attributes into row data. This replacesvtkDataObjectToTable
, which has been deprecated.vtkBoundaryMeshQuality
filter added to compute quality metrics for boundary meshes.vtkGenerateProcessIds
filter added to generate process ids for both PointData and CellData, and store it via ProcessIds attribute. This filter replacesvtkProcessIdScalars
, which has been deprecated.Added
PointDataWeighingStrategy
option tovtkCleanUnstructuredGrid
for choosing how to collapse point data. Previously, when merging duplicate points, the point with the lowest index had its data transported to the merged output point. With this new option, you can now choose between:vtkCleanUnstructuredGrid::FIRST_POINT
(for backwards compatibility): where the point with the lowest index in the input gets the ownership of the merged point.vtkCleanUnstructuredGrid::AVERAGING
: where the data on the merged output point is the number average of the input points.vtkCleanUnstructuredGrid::SPATIAL_DENSITY
: where the merged point data is averaged using a partition of the volumes in the cells attached to each point being merged.
vtkTableFFT
no longer adds or squeezes certain arrays, like those starting withvtk
, when the input and the output have a different size.vtkTableFFT
now supports complex valued FFTs.Added hemispherical capping support along with texture coordinates for
vtkCylinderSource
to replace thevtkCapsuleSource
which has now been deprecated.vtkClipClosedSurface
now provides the ability to clip on the reverse side of the clipping planes and also provides the new triangulated geometry created by clipping as a second output.
I/O#
VTK now supports URI parsing, resolution and loading through the two new classes
vtkURI
andvtkURILoader
. URI support as been implemented to enable resource stream support in readers that need to access multiple resources. For more information about URI usage and loading, please refer to thevtkURILoader
documentation.vtkResourceStream
added as customizable replacement for standard istreams. AddedvtkFileResourceStream
andvtkMemoryResourceStream
implementations.vtkResourceParser
added as a high-performance formatted input parser.vtkResourceParser
parses strings, floats, integers and booleans from anyvtkResourceStream
. Moststd::istream
common features have equivalent methods invtkResourceParser
, making migration mostly trivial.Added
vtkPLYReader
,vtkGLTFReader
andvtkOBJReader
support for reading fromvtkResourceStream
.vtkMemoryResourceStream
can now own a streamed buffer, meaning you can free the source buffer after setting it. You can now set source buffer as astd::string
, astd::vector
or avtkBuffer*
.Added
vtkNek5000Reader
to support NEK5000 data format.Added
vtkOpenVDBReader
in theIOOpenVDB
module read to .vdb files.Added
vtkIOSSWriter
writer for the Exodus file format implemented using the IOSS library. Input can bevtkPartitionedDataSetCollection
,vtkPartitionedDataSet
orvtkDataSet
.vtkIOSSWriter
can be executed in parallel.Added support for higher-order Lagrange cells with
vtkIOSSReader
.vtkIOSSReader
now supports mixed-order, 12-node wedge elements.Added flag
ReadAllFilesToDetermineStructure
tovtkIOSSReader
which toggles reading all files or only reading the first file to determine mesh structure.Added
vtkNetCDFUGRIDReader
support for reading 2D meshes from NetCDF UGRID files.VTKHDF
’s major version has been incremented to 2 due to the following additions:Added
VTKHDF
support for both static and transientvtkPolyData
files. The metadata schematic for how transient data is read is shown below (first image).Added
VTKHDF
support for transientImageData
andUnstructuredGrid
data. The metadata schematic for how transient data is read is shown below (second image).Specific documentation related to the evolution of the
VTKHDF
format can be found here.
Added ANSYS Fluent CFF Reader (Common Fluid Format) into its own dedicated module
VTK::IOFLUENTCFF
, which currently supports the newvtkFLUENTCFFReader
. See further documentation here.Added
vtkNumberToString::SetHighExponent
andvtkNumberToString::SetLowExponent
to control the exponent range for scientific or fixed notation.Fixed reading fault on vector fields with
vtkXMLHyperTreeGridReader
.Added support for mixed cell unstructured grids in
vtkConduitSource
. SeeValidateMeshTypeMixed
andValidateMeshTypeMixed2D
tests inIO/CatalystConduit/Testing/Cxx/TestConduitSource.cxx
for more details.vtkDataObjectToConduit
now supports polygons,vtkPolyData
and mixed shapesvtkUnstructuredGrid
topologies.
Add
vtkMPICommunicator
support for MPI message lengths > MAX_INT, which can now occur in MPI 4.X and later.Added
vtkMPICommunicator::NoBlockSend
method that allows for dynamic MPI types.Fixed bugs in
vtkMPICommunicator::Test*
andvtkMPICommunicator::Wait*
that prevented them from being called repeatedly.vtkIOSSReader
can now merge entity blocks into a single block for the exodus format using the flagMergeExodusEntityBlocks
which is off by default. This is useful e.g. for cases where the entity blocks just represent different cell types but they actually describe the same block.Incorrect
vtkEnSightWriter
output has been fixed forVTK_POLYGON
,VTK_WEDGE
,VTK_QUADRATIC_WEDGE
,VTK_QUADRATIC_EDGE
orVTK_CONVEX_POINT_SET
cell types. Support forVTK_POLYHEDRON
has also been added.Added flag
WriteNodeIDs
tovtkEnSightWriter
, which toggles writing node and element IDs to the EnSight data. This makes the output geometry file significantly smaller.Added property
SizeAverageCellToPoint
tovtkOpenFOAMReader
that allows the user to weigh the cell point averaging operation by cell size.
Interaction#
Add support for removing intermediate layers with
vtkExpandMarkedElements
. Added boolean flagsRemoveSeed
andRemoveIntermediateLayers
. Using these flags will remove their respective layers, keeping only the final expansion layer. This functionality has been extended for use invtkSelectionSource
andvtkSelector
.vtkAppendSelection
SetColorArray
,SetInputColor
andGetInputColor
methods added to associate colors to selections which are used to generate a color array.vtkCamera
s can now be oriented with thevtkCamera3DWidget
and its representationvtkCamera3DRepresentation
. The representation allows you to move the camera position, target position, to rotate the view up and to update its view angle. See example:
Added
vtk3DCursorWidget
andvtk3DCursorRepresentation
to track mouse in a scene. The 3D cursor follows the mouse and is placed on the surface of the actor’s scene. Note: this behavior does not currently support volumes.Added
SetForce3DArcPlacement
API tovtkAngleRepresentation2D
which allows users to force correct the 3D placement of arcs that may be misalligned.Moved
vtkCompassWidget
andvtkCompassRepresentation
fromGeovis/Core
toInteraction/Widgets
. Previously these classes were in a non-working state, but have been fixed with the following changes:vtkSliderRepresentation
and subclasses: Fixes were applied to correctly calculate the local coordinate for the slider position. They also now honor theirVisibility
parameter.In
vtkCompassWidget
you can now adjust the updateTimerDuration
,TiltSpeed
andDistanceSpeed
when clicking on the slider end caps.
Added standardized color setters (
SetForegroundColor
,SetHandleColor
andSetInteractionColor
) to several widgets used by ParaView. These widgets includevtkBoxRepresentation
,vtkCurveRepresentation
,vtkLineRepresentation
,vtkSphereRepresentation
,vtkImplicitCylinderRepresentation
,vtkImplicitPlaneRepresentation
,vtkDisplaySizedImplicitPlaneRepresentation
andvtkPointHandleRepresentation3D
. Description of added methods: The intended use of these colors is as follows:Color
Description
HandleColor
Widget handles that are available to interact with via click+drag.
InteractionColor
Widget handles the user is interacting with (via a click+drag) or hovering over.
ForegroundColor
Widget elements meant to contrast with the background and which are not interactive.
Added
vtkOrientationWidget
and its representationvtkOrientationRepresentation
which are used to rotate any actor. The appearance of widget controls are customizable through the representation. See examples:
Math#
Add
GetOctaveFrequencyRange
computation tovtkFFT
which gets lower/upper frequencies of octaves. Parameters includeoctaveSubdivision
, from which you can choose one-third, half, or full octave frequency ranges (default is full) as well asbaseTwo
which toggles between base 2 and base 10 power (default is base 2).
Module System#
Added
vtk_module_wrap_python(HEADERS_DESTINATION)
argument. This argument adds a header into the install tree that initializes the builtin module table for statically built Python modules. This header had not been installed previously.
Python#
Added
ModernizePythonImports.py
script that parse Python scripts and replaces “import vtk” with module specific imports for performance.vtkDataObject
’s now support pickling by the Pythonpickle
module.To use this new feature in python, you must first run:
import vtkmodules.util.pickle_support
Once you have imported the module the pickling of data objects is straightforward:
from vtkmodules.vtkFiltersSources import vtkSphereSource import vtkmodules.util.pickle_support import pickle sphereSrc = vtkSphereSource() sphereSrc.Update() pickled = pickle.dumps(sphereSrc.GetOutput()) unpickled = pickle.loads(pickled) print(unpickled)
Python 3.12 wheels are now provided for the following platforms:
Linux x86_64
Linux x86_64 (with OSMesa)
macOS x86_64
macOS arm64
Windows x86_64
Windows x86_64 (with OSMesa)
Qt#
Added minimal Qt/VTK example application
MinimalQtVTKApp
.QML integration support has been upgraded to allow a vtkRenderWindow per QQuick item.
Added custom cursor methods to
QVTKOpenGLStereoWidget
andQVTKOpenGLNativeWidget
that get/set the cursor shape.
Rendering#
Added
VTK_USE_WIN32_OPENGL
option to disable Win32 API inVTK::RenderingOpenGL2
on Windows. This enables OSMesa support on Windows.Improved performance of
vtkTupleInterpolator
.Added new module providing
zSpace
support to VTK, implementing render window, interactor style, camera, etc. Supports both the “Core zSpace API” (legacy) and the “Core Compatibility zSpace API” (latest).vtkAxisActor2D
labels now useUseFontSizeFromProperty
, which was formerly used exclusively by the title.vtkImageResliceMapper
now fully supports oriented images, in the same manner asvtkImageSliceMapper
. This allows the display of arbitrary oblique slices of oriented images, including those where the orientation matrix has a negative determinant.Improved performance and consistency of
vtkRenderWindowInteractor::ProcessEvents
across all platforms.vtkCompositePolyDataMapper
can now color separate blocks with different scalar arrays. To use this functionality, turn onScalarVisibility
and select aScalarMode
and/or aColorMode
.Improved performance of
vtkContext2D
for rendering large numbers of points.vtkCompositePolyDataMapper
can now use separate lookup tables and interpolation modes for different blocks in a composite dataset. You can override lookup table and other related attributes like scalar interpolation and scalar ranges. Refer tovtkMapper
documentation. Here’s a summary:ScalarVisibility
: True/FalseUseLookupTableScalarRange
: When true, the mapper shall import the range from the lookup table.InterpolateScalarsBeforeMapping
: Applies when mesh is colored using point scalars. This flag decides whether point colors are sampled using texture maps instead of interpolating colors on the GPU after scalars are mapped to colors.ColorMode
: Specifies whether to map scalars to colors or directly use the scalars as RGB(A) values.ScalarRange
: Specifies a range of scalars for color mapping.LookupTable
: Specifies a lookup table.
vtkCompositePolyDataMapper
in VTK::RenderingCore has been improved to efficiently render large datasets. It now performs as well asvtkCompositePolyDataMapper2
in the VTK::RenderingOpenGL2 module, which has now been deprecated. This refactor has significantly impacted the following VTK modules:vtkCompositePolyDataMapper
now has an API similar tovtkCompositePolyDataMapper2
.vtkCompositeSurfaceLICMapper
derivesvtkCompositePolyDataMapper
instead ofvtkCompositePolyDataMapper2
.The OSPRay module uses
vtkCompositePolyDataMapper
instead ofvtkCompositePolyDataMapper2
.vtkVtkJSSceneGraphSerializer
usesvtkCompositePolyDataMapper
instead ofvtkCompositePolyDataMapper2
.
Added new
vtkOpenGLES30PolyDataMapper
supports polydata and composite dataset rendering with OpenGL ES 3.0. If VTK was configured withVTK_OPENGL_USE_GLES=ON
, this mapper is an override forvtkPolyDataMapper
.Fixed
vtkSurfaceLICMapper
crash when rendering lines as tubes or points as spheres.vtkTextureObject
can now be used to create texture buffers on all OpenGL implementations that support 2D textures.Fixed
vtkCamera
CAVE bugs for head tracking and volume rendering.Fixed compositing artifacts when volume rendering in parallel with the OSPRay raycaster. This fix adds a new
VolumeSamplingRate
parameter tovtkOSPRayRendererNode
.vtkPolarAxesActor
has a number of new features.Radial/polar axes and arc ticks are now customizable.
SetRequestedNumberOfRadialAxes
,SetRequestedDeltaAngleRadialAxes
,SetArcTickMatchesRadialAxes
,SetRequestedNumberOfPolarAxes
,SetRequestedDeltaAnglePolarAxes
,SetArcTickMatchesPolarAxes
,SetDeltaAngleMajor
, andSetDeltaAngleMinor
are all new methods.Tick size is now computed as a ratio of maximum radius by default. You can specify a value for this ratio using
SetTickRatioRadiusSize
, default is 0.02.You can now change polar arcs resolution per degree. See
SetPolarArcResolutionPerDegree
, default is 0.2.Text offsets are now customizable with
SetPolarTitleOffset
,SetRadialTitleOffset
,SetPolarLabelOffset
andSetPolarExponentOffset
.
vtkMultiVolume
now supports RGBA volume inputs in a similar way to the existing single-input volume rendering. When turning off theIndependentComponent
flag of thevtkVolumeProperty
and providing 4-components to the mapper values are interpreted as RGBA.Added new gradient background modes. You can select from various gradient background modes with
vtkViewport::SetGradientMode
. The following modes are available:VTK_GRADIENT_VERTICAL
Background color is used at the bottom, Background2 color is used at the top.VTK_GRADIENT_HORIZONTAL
Background color on the left, Background2 color on the right.VTK_GRADIENT_RADIAL_VIEWPORT_FARTHEST_SIDE
Background color in the center, Background2 color on and beyond the circle ellipse edge. Circle/Ellipse touches all sides of the square/rectangle viewport.VTK_GRADIENT_RADIAL_VIEWPORT_FARTHEST_CORNER
Background color in the center, Background2 color on and beyond the circle/ ellipse edge. Circle/Ellipse touches all corners of the square/rectangle viewport. See gradient background examples:
Third Party#
fast_float
added as a vendored package. It is available using theVTK::fast_float
module.
VTK-m#
VTK-m submodule has been updated to the latest release, VTK-m 2.0.0. Being a major update, it significantly breaks compatibility with the API provided by VTK-m 1.X. Thus, many changes were needed in VTK to make it compatible with VTK-m 2.0.0.
All VTK-m cmake targets are now prefixed with
vtkm_
. Exceptions have been made forvtkm::cuda
andvtkm::kokkos_hip
, for compatibility with external VTK-m imports.VTK-m VTK module is now called
vtk::vtkvtkm
as opposed tovtk::vtkm
.vtkmlib
functions that translate VTK to VTK-m data structures now respect coordinates system changes. Coordinates systems are now represented as a field inside the VTK-m dataset rather than a special/unique component.
The Fides library has been updated upstream to ensure compatibility with VTK-m 2.0.0. This update in upstream has been brought to VTK to enable using VTK-m 2.0.0 and Fides through VTK.
Deprecated and Removed Features#
Legacy#
The following APIs were deprecated in 9.1 or earlier and are now removed:
Python 2 support has been removed.
Threading types (use C++
std
classes instead):vtkSimpleConditionVariable
(std::condition_variable
)vtkConditionVariable
(std::condition_variable
)vtkMutexType
vtkSimpleMutexLock
(std::mutex
)vtkMutexLock
(std::lock_guard
)vtkCritSecType
vtkSimpleCriticalSection
(std::mutex
)
The
EvaluateLocationProjectedNode
method has been removed on the following classes; useEvaluateLocation
instead:vtkBezierCurve
vtkBezierHexahedron
vtkBezierQuadrilateral
vtkBezierTetra
vtkBezierTriangle
vtkBezierWedge
vtkBezierInterpolation::flattenSimplex
has been renamed to::FlattenSimplex
vtkBezierInterpolation::unflattenSimplex
has been renamed to::UnFlattenSimplex
vtkBezierInterpolation::deCasteljauSimplex
has been renamed to::DeCasteljauSimplex
vtkBezierInterpolation::deCasteljauSimplexDeriv
has been renamed to::DeCasteljauSimplexDeriv
vtkHigherOrderHexahedron::getEdgeCell
has been renamed to::GetEdgeCell
vtkHigherOrderHexahedron::getFaceCell
has been renamed to::GetFaceCell
vtkHigherOrderHexahedron::getInterp
has been renamed to::GetInterpolation
vtkHigherOrderQuadrilateral::getEdgeCell
has been renamed to::GetEdgeCell
vtkHigherOrderTetra::getEdgeCell
has been renamed to::GetEdgeCell
vtkHigherOrderTetra::getFaceCell
has been renamed to::GetFaceCell
vtkHigherOrderTriangle::eta
has been renamed to::Eta
vtkHigherOrderTriangle::deta
has been renamed to::Deta
vtkHigherOrderTriangle::getEdgeCell
has been renamed to::GetEdgeCell
vtkHigherOrderQuadrilateral::getBdyQuad
has been renamed to::GetBoundaryQuad
vtkHigherOrderQuadrilateral::getBdyTri
has been renamed to::GetBoundaryTri
vtkHigherOrderQuadrilateral::getEdgeCell
has been renamed to::GetEdgeCell
vtkHigherOrderQuadrilateral::getInterp
has been renamed to::GetInterpolation
vtkIncrementalOctreeNode::InsertPoint
withoutnumberOfNodes
is removed for the variant with itvtkLine::Intersection3D
has been replaced byvtkLine::Intersection
vtkPointData::NullPoint
has been replaced byvtkFieldData::NullData
vtkSelectionNode::INDEXED_VERTICES
has been removedvtkReaderExecutive
has been removedvtkThreadMessager
has been removed; use C++std
threading support insteadvtkPassThroughFilter
has been replaced byvtkPassThrough
vtkXMLPPartitionedDataSetWriter
has been replaced byvtkXMLPartitionedDataSetWriter
vtkBlueObeliskData::GetWriteMutex
has been replaced by::LockWriteMutex
and::UnlockWriteMutex
vtkThreshold::ThresholdByLower
has been replaced by::SetLowerThreshold
or::SetThresholdFunction
vtkThreshold::ThresholdByUpper
has been replaced by::SetUpperThreshold
or::SetThresholdFunction
vtkThreshold::ThresholdBetween
has been replaced by::SetLowerThreshold
and::SetUpperThreshold
or::SetThresholdFunction
vtkMultiBlockFromTimeSeriesFilter
has been replaced byvtkGroupTimeStepsFilter
vtkDataSetGhostGenerator
has been replaced byvtkGhostCellsGenerator
vtkDataSetSurfaceFilter
methods::GetUseStrips
,::SetUseStrips
,::UseStripsOn
, and::UseStripsOff
have been removedvtkStructuredGridGhostDataGenerator
has been replaced byvtkGhostCellsGenerator
vtkUniformGridGhostDataGenerator
has been replaced byvtkGhostCellsGenerator
vtkUnstructuredGridGhostCellsGenerator
has been replaced byvtkGhostCellsGenerator
vtkPDataSetGhostGenerator
has been replaced byvtkGhostCellsGenerator
vtkPStructuredGridGhostDataGenerator
has been replaced byvtkGhostCellsGenerator
vtkPUniformGridGhostDataGenerator
has been replaced byvtkGhostCellsGenerator
vtkPUnstructuredGridGhostCellsGenerator
has been replaced byvtkGhostCellsGenerator
vtkOpenGLRenderer::HaveApplePrimitiveIdBug
has been removed as no supported macOS release has the issue anymorevtkOpenGLRenderWindow
has removed the following methods:::GetBackLeftBuffer
::GetBackRightBuffer
::GetFrontLeftBuffer
::GetFrontRightBuffer
::GetBackBuffer
::GetFrontBuffer
vtkOpenGLRenderWindow::GetOffScreenFramebuffer
has been replaced by::GetRenderFramebuffer
vtkDataEncoder::PushAndTakeReference
has been replaced by::Push
vtkGenericOpenGLRenderWindow::IsDrawable
is removedvtkIOSRenderWindow::IsDrawable
is removedvtkCocoaRenderWindow::IsDrawable
is removedvtkRenderWindow::IsDrawable
is removedvtkDIYUtilities::GetDataSets
is replaced byvtkCompositeDataSet::GetDataSets
vtkCurveRepresentation::*DirectionalLine*
methods have been renamed to::*Directional*
vtkSimpleImageFilterExample
has been removedvtkExodusIIReaderPrivate::PrintData
has been renamed to::PrintSelf
vtkEnSightReader::ReplaceWildcards
has been replaced byvtkGenericEnSightReader::ReplaceWildcardsHelper
vtkQtSQLDatabase::*Port
has been renamed to::*DbPort
to avoid Windows SDK macro collisionsThe
vtkDataSetSurfaceFilter::GetInterpolatedPointId
overload withoutweights
has been replaced by the one with it
Charts#
vtkPlot
color setter/getter methods with floating point parameters are now suffixed withF
. The former methods without the suffix have been deprecated. For example:vtkPlot::SetColor(double r, double g, double b)
has been moved tovtkPlot::SetColorF(double r, double g, double b)
.
Core#
The
vtkStdString
implicit conversion toconst char*
is deprecated. Instead, call.c_str()
explicitly on the instance.vtkVariant::ToX
and related string parsing no longer supports[-]infinity
as a valid float conversion. Only[-]inf
is now supported.
Data#
Deprecated
vtkCompositeDataSet::RecursiveShallowCopy
, usevtkCompositeDataSet::ShallowCopy
instead.vtkUnstructuredGrid::GetCellLinks
has been deprecated,vtkUnstructuredGrid::GetLinks
instead.vtkAbstractCellLinks::BuildLinks(vtkDataSet*)
has been deprecated, usevtkAbstractCellLinks::BuildLinks()
instead.
Filters#
vtkDataObjectToTable
is deprecated in favor ofvtkAttributeDataToTableFilter
, which has the same functionality.vtkProcessIdScalars
is deprecated in favor ofvtkGenerateProcessIds
. The following is a migration example:Deprecated
vtkProcessIdScalars
code:vtkNew<vtkProcessIdScalars> processIdsGenerator; processIdsGenerator->SetInputConnection(someData->GetOutputPort()); processIdsGenerator->SetScalarModeToCellData(); processIdsGenerator->Update(); vtkDataSet* pidGeneratorOutput = processIdsGenerator->GetOutput(); vtkIntArray* pidArray = vtkIntArray::SafeDownCast(pidGeneratorOutput->GetCellData()->GetArray("ProcessId"));
New
vtkGenerateProcessIds
code:vtkNew<vtkGenerateProcessIds> processIdsGenerator; processIdsGenerator->SetInputConnection(someData->GetOutputPort()); processIdsGenerator->GeneratePointDataOff(); processIdsGenerator->GenerateCellDataOn(); processIdsGenerator->Update(); vtkDataSet* pidGeneratorOutput = processIdsGenerator->GetOutput(); vtkIdTypeArray* pidArray = vtkIdTypeArray::SafeDownCast(pidGeneratorOutput->GetCellData()->GetProcessIds());
vtkCapsuleSource
is deprecated in favor ofvtkCylinderSource::SetCapping(true)
andvtkCylinderSource::SetCapsuleCap(true)
, which has the same functionality.
I/O#
vtkOpenFOAMReader
support for polyhedral decomposition,SetDecomposePolyhedra
, has been deprecated.vtkNumberToString::operator()
has been deprecated in favor ofvtkNumberToString::Convert
.
Python#
The VTK wheels no longer provide the
VTK::PythonInterpreter
module as it is unnecessary in such situations.
Rendering#
vtkXOpenGLRenderWindow::SetSizeNoXResize()
has been deprecated due to structural RenderingUI changes in VTK 9.0.vtkOutputWindowCleanup
has been deprecated as it is no longer used.vtkCompositePolyDataMapper2
has been deprecated in favor ofvtkCompositePolyDataMapper
following the latter’s performance improvements.