These examples have been grouped together to make it easier to find them and to showcase the different techniques.
The PythonicAPI versions have been rewritten/improved with the changes being reflected in the C++ versions.
The main changes are:
-
vtkScalarBarWidget is now used, thus scalar bars can be resized/moved, they also resize with the main window.
-
vtkOrientationMarkerWidget or vtkCameraOrientationWidget can be selected in most examples.
-
For banded glyphs a named tuple or a struct BandedGlyphs containing everything you need for the necessary actors is used.
-
With respect to glyphs, multiple color schemes are used, reflecting the number of bands used, see get_curvature_glyphs(…) or GetCurvatureGlyphs(…) this has necessitated adding position_sbw_h(…), position_sbw_v(…) used to resize the scalar bar, useful if only one band is being used e.g. in the case of planar surfaces.
The C++ version: CurvatureBandsWithGlyphs and the
PythonicAPI versions: CurvatureBandsWithGlyphs and CurvaturesNormalsElevations demonstrate these features.
CurvaturesDemo and the corresponding C++ version now use a vtkDiscretizableColorTransferFunction lookup table. Whilst the mapper can use this table adjusting for the scalar range, SetScalarRange() has not been implemented in this color transfer function. Thus the scalar range is labelled 0 to 1 on the salcar bar irrespective of the actual scalar range. To overcome this there is a function rescale_ctf(…) or RescaleCTF(…), that takes the lookup table and returns a new rescaled version. In my opinion the discrete coloring of the curvature of the parametric surface here is really good.
Whilst there is no C++ implementation of CurvaturesNormalsElevations it is easy to do. I could create one if people feel a need for it.
Of course, ElevationBandsWithGlyphs has also been updated reflecting these changes.
With the C++ versions, please try the interactive versions.