Skip to content

Releases: marcomusy/vedo

2022.2.3

08 May 23:58
Compare
Choose a tag to compare

This release includes various improvements and bug fixes


base.py

  • alignToBoundingBox() change the default behavior to match exactly the target (affine transform) @jsaintauret
  • added getRGBA() to obtain the actual colors from an object as rendered

pointcloud.py

  • addTrail() simplified.

mesh.py

  • isInside(..., returnIds=True) fixed bug

plotter.py

  • added lookAt(plane='xy') to move the camera to face one of the cartesian planes
  • removed plotter.load() as not really necessary and potentially confusing

pyplot.py

  • add legends to Figures thanks to new method addLegend()

shapes.py

  • moved volume.streamLines to shapes.StreamLines

volume.py

  • added mask(vol) to mask the visualization of a volume

Examples

New/Revised

examples/basic/shadow2.py
examples/basic/deleteMeshPoints.py
examples/basic/ssao.py
examples/basic/align6.py
examples/basic/pca_ellipsoid.py
examples/advanced/gyroid.py
examples/volumetric/volumeOperations.py
examples/volumetric/streamlines1.py

examples/simulations/orbitals.py
examples/simulations/mag_field1.py
examples/simulations/mag_field2.py
examples/simulations/pendulum_3d.py

examples/pyplot/histo_1d_b.py
examples/pyplot/fitPolynomial1.py
examples/pyplot/plot_extra_yaxis.py

examples/other/pygeodesic1.py
examples/other/qt_cutter.py

Deleted

examples/other/animation1.py
examples/other/animation2.py
examples/simulations/alien_life.py
examples/simulations/cell_colony.py

2022.2.0

05 Apr 21:47
Compare
Choose a tag to compare

Main changes

  • New documentation pages based on pdoc3.
  • general cleanup of the examples
  • simplified licence file by splitting fonts and general MIT licence
  • all vedo/texture/* files removed
  • a new syntax is allowed for changing the current renderer:
    plotter.at(ren_number).show(mymesh)
    instead of the (still valid):
    plotter.show(mymesh, at=ren_number)
  • reverted settings to be a simple import instead of a dictionary (because of pdoc3).

pointcloud.py

  • cmap(arrayName=...) -> cmap(name=...)
  • added chamferDistance() of pointclouds (needs to be double checked)
  • added cutWithMesh(self, keep=True) to return an Assembly of the cut & discarded parts.

mesh.py

  • can now recover the edges of a mesh with mymesh.edges()
  • added tetralize() to tetralize any closed surface mesh

plotter.py

  • keyword change show(interactorStyle=...) -> show(mode=...)
  • added function vedo.close() to close the latest Plotter

picture.py

  • remove by default alpha channel so that images become pickable

pyplot.py

  • Full revision of the existing code.
  • can now create an empty Figure object to be later filled.

With it one can easily create elegant plots and histograms like:

Screenshot from 2022-04-05 22-01-50


shapes.py

  • added Rectangle(radius=...) to have a border radius

tetmesh.py

  • added tetralize() to tetralize any closed surface mesh
  • added addQuality() of tets

settings.py

  • new polygonal fonts added: 'Vogue', 'Brachium', 'Dalim', 'Miro', 'Ubuntu'

Examples:

New/Revised

  • examples/basic/mousehover2.py
  • examples/simulations/wave_equation2d.py
  • examples/advanced/interpolateScalar4.py
  • examples/advanced/timer_callback1.py
  • examples/basic/multirenderers.py
  • examples/advanced/spline_draw.py
  • examples/simulations/museum_problem.py
  • examples/volumetric/tet_explode.py
  • examples/volumetric/tetralize_surface.py
  • examples/other/remesh_tetgen.py
  • examples/pyplot/histo_1d_a.py
  • examples/pyplot/histo_1d_b.py
  • examples/pyplot/histo_1d_c.py
  • examples/pyplot/histo_1d_d.py
  • examples/pyplot/histo_2d.py
  • examples/pyplot/histo_pca.py
  • examples/pyplot/histo_manual.py
  • tests/common/test_pyplot.py
  • examples/pyplot/plot_empty.py
  • examples/pyplot/plot_errband.py
  • examples/pyplot/quiver.py

Deleted

  • examples/pyplot/covid19.py
  • examples/pyplot/histo_1D.py
  • examples/pyplot/histo_2D.py
  • moving_least_squares3D.py
  • examples/other/dolfin/curl2d.py
  • examples/other/dolfin/demo_auto-adaptive-poisson.py
  • examples/other/dolfin/demo_cahn-hilliard.py
  • examples/other/dolfin/ex01_show-mesh.py
  • examples/other/dolfin/ft07_navier_stokes_channel.py
  • examples/other/dolfin/ft08_navier_stokes_cylinder.py
  • examples/other/dolfin/meshEditor.py
  • examples/other/dolfin/simple1Dplot.py

2022.1.0

23 Feb 18:13
Compare
Choose a tag to compare

Main changes

  • Quite serious bug fixed in closestPoint() method due to a problem in the upstream vtk9.0 vtkStaticCellLocator class. (https://discourse.vtk.org/t/vtkstaticcelllocator-problem-vtk9-0-3/7854/4)

  • internal global variable settings.plotter_instance must become vedo.plotter_instance.

  • vedo.settings is now a dotted dictionary

  • implemented logging module for managing errors and warnings

  • fixed bug to distanceTo() method


applications.py

  • Brower, IsosurfaceBrowser, Slicer2DPlotter and RayCastPlotter are now Plotter derived classes (not functions)
  • improved IsosurfaceBrowser for speed

io.py

  • improved Video.action(cameras=[...]) to interpolate cameras positions

mesh.py

  • faces of a mesh can be reversed individually with reverse(face_list).
  • fixed bug to distanceTo() method

plotter.py

  • fix closeWindow()
  • add show(..., zoom="tight") to automatically zoom in as close as possible when 2D.

picture.py

  • added binarize() method.
  • added invert() method.

pyplot.py

  • name change cornerPlot -> CornerPlot
  • name change cornerHistogram -> CornerHistogram

shapes.py

  • Line.lineColor() overrides mesh.lineColor() to avoid ambiguities.
  • added line.curvature() method and example in docs.
  • added line.tangents() method and example in docs.

volume.py

  • volume.mesh2Volume() function moved to vedo.mesh.binarize()
  • volume.signedDistanceFromPointCloud() function moved to Points.signedDistance
  • legosurface() changed interface

utils.py

  • function has new keyword sortByColumn(invert=False)

New/Revised examples:

examples/basic/align5.py
examples/basic/distance2mesh.py
examples/pyplot/fourier_epicycles.py
examples/other/ellipt_fourier_desc.py
examples/volumetric/image_probe.py
examples/volumetric/image_mask.py
examples/pyplot/histo_3D.py
examples/other/napari1.py
examples/other/makeVideo.py
examples/volumetric/volumeFromMesh.py
examples/volumetric/mesh2volume.py

2022.0.1

12 Jan 19:22
Compare
Choose a tag to compare

Main changes


colors.py

  • minor fixes

cli.py

New CLI mode to emulate eog for convenient visualization of common format images :

vedo --eog https://corepetfood.com/files/2019/07/kitten-e1568311742288-1440x900.jpg

Press:
  up/down     to modify level (or drag mouse)
  left/right  to modify window
  m           to mirror image
  t           to rotate image by 90 deg
  k           to enhance b&w image
  s           to apply gaussian smoothing
  S           to save image as png
  h           to print this help banner

plotter.py

  • added enableErase() enableRenderer() useDepthPeeling(at) methods
  • added addScaleIndicator() to add to the scene an indicator of absolute size of objects
    (needs settings.useParallelProjection = True)

pointcloud.py

  • added smoothLloyd2D() for smoothing pointclouds in 2D
  • vtkCellLocator seems to have a problem with single cell meshes (#558), fixed using vtkStaticCellLocator
    which behaves normally

shapes.py

  • added Line().pattern() to create a dashed line with a user defined pattern.
  • fixed bug in Text2D()

New/Revised examples:

examples/basic/shadow2.py

2021.0.7

08 Nov 20:00
Compare
Choose a tag to compare

Various fixes, requires vtk<9.1.0 while some issues are being fixed.

v2021.0.6

05 Oct 19:20
Compare
Choose a tag to compare

Main changes

  • various fixes

base.py

  • introduced new sintax to set/retrieve a mesh point data array: myobj.pointdata["arrayname"]
    same for cell/face data: myobj.celldata["arrayname"]

addons.py

  • added kword LegendBox(markers=...)
  • added kword Slider2D(delayed=True) to act upon mouse release

colors.py

  • fixed small bug in colorMap (only affecting systems without matplotlib)

mesh.py

  • fixed problem in geodesic().
  • added tolerance keyword in intersectWithLine(). Also, now returnIds returns [[pt,cellid]]
  • added kword flag to function merge(..., flag=True) to optionally keep track of the original meshes ids

picture.py

  • added .enhance() method.
  • method .tonumpy() reshape to [nx,ny,nchannels] to match matplotlib standard
  • added .append() to stitch images the current to the left or to the top.
  • added .extent() to specify physical extention of an image.

pointcloud.py

  • cluster() renamed to pointcloud.addClustering()
  • added voronoi() function

New/Revised examples:

vedo -r optics_main1
vedo -r optics_main2
vedo -r optics_main3
vedo -r warp4
vedo -r voronoi
vedo -r drag_chain
vedo -r morphomatics_tube


2021.0.5

29 Aug 19:44
Compare
Choose a tag to compare

Main changes

  • Added support for ipygany in jupyter notebooks.
  • Command line interface vedo ... should now work on windows 10 too.
  • added skybox environment with show(..., bg="path/to/file.hdr")
  • added (kind of limited) support to wxpython embedding (analogous to Qt, but open-source)
  • updated pymeshlab examples

base.py

  • added .lighting(metallicity=1, roughness=0.1) to include PBR (physics based rendering).
  • method .printInfo() is now simply .print()

addons.py

  • added SplineTool.nodes() to retrieve current node positions.

plotter.py

  • removed global functions closeWindow() ion() ioff()
  • added record() and play() to store and playback camera and all other events
  • keyword interactorStyle becomes now mode

picture.py

  • added flip keyword to flip xy convention
  • added level() and window() methods to control brightness and contrast of a Picture.
  • added smooth() to make gaussian smoothing of a Picture object.
  • added bw() to make a picture black and white
  • added channels keyword to specify rgba channels to use (useful to remove alpha)
  • added pad() to create a padding margin to a picture
  • added median() a median filter that preserves thin lines and corners
  • added frequencyPassFilter() to filter images based on level of detail frequencies
  • added rotateAntiClockWise() to rotate an image (landscape to portrait and viceversa)
  • added tonumpy() and modified() methods.
  • added tiling() to generate tilings from a single picture
  • extract() renamed to select()

pyplot.py

  • added plot(mode="bar")

pointcloud.py

  • added hausdorffDistance() to compute the Hausdorff distance of two point sets or meshes

volume.py

  • added vmin and vmax keywords to share the same mapping across different volumes
  • renamed getDataArray to tonumpy.

cli.py

  • removed bin/vedo and created entry point from vedo/cli.py (command line interface).
    This works better on windows systems.
  • vedo -r now colorizes the code dump.

New/Revised examples:

  • vedo -r plot_bars
  • vedo -r alien_life
  • vedo -r pendulum_ode
  • vedo -r earth_model
  • vedo -r qt_window2
  • vedo -r spline_tool
  • vedo -r wx_window1
  • vedo -r picture2mesh
  • vedo -r record_play
  • vedo -r pymeshlab1
  • vedo -r pymeshlab2
  • vedo -r volume_sharemap
  • vedo -r multiwindows1

2021.0.3

04 May 22:58
Compare
Choose a tag to compare

Main changes

  • General improvements to the vedo command line

  • colorcet colormaps are directly usable in vedo.
    Check example basic/mesh_custom.py

  • general tool for free-hand cutting a mesh can be invoked from command line:
    vedo --edit https://vedo.embl.es/examples/data/porsche.ply

  • added example search by command line e.g.:
    vedo --search triangle -i (-i to ignore capital letters)

  • added file(s) info dump by command line e.g.:
    vedo --info some_image.jpg https://vedo.embl.es/examples/data/porsche.ply

  • pressing shift-A toggles antialiasing for the whole rendering window

  • pressing shift-D toggles depth-peeling algorithm for the current renderer

  • antialiasing set by default on vtk9

  • balloon-style flags are disabled because of a bug in vtk9

Consider installing VTK 8.1.2 for better visualisations when possible (unfortunately this slightly older version is no more available for python >=3.8)


base.py

  • corrected bug on diagonalSize() returning a wrong value

addons.py

  • added addSplineTool() to interactively spline points in space
  • added labelRotation in addScalarBar3D
  • added xShiftAlongY keywords in Axes to slide the whole axis position along another axis
  • added xAxisRotation to rotate the whole axis (ticks and labels)
  • addScalarBar3D() can now render categorical data

colors.py

  • fixed small issue in printc to support different terminals

mesh.py

  • computeNormals() is no more changing the nr of mesh points unless featureAngle is specified
    • added keywords: featureAngle=None, consistency=True
  • intersectWithLine() can now return cell ids, not just points

plotter.py

  • improved automatic text management in show("some text")
  • added computeWorldPosition(point2d) to get the 3d point in the scene from a screen 2d point
  • added addSplineTool() to interactively spline points in space
  • small fix in plotter.add() for offscreen mode.
  • added topicture() to render a scene into a Picture object (to crop, mirror etc)

picture.py

  • added FFT and RFFT, added example fft2d.py
  • can save Picture obj to file as jpg or png

pointcloud.py

  • added cutWithBox(), cutWithLine(), cutWithSphere() and cutWithCylinder() methods

shapes.py

  • fixed small bug in Glyph

volume.py

  • added class VolumeSlice for volume-sliced visualization.

utils.py

  • added roundToDigit(x,p), round number x to significant digit

New/Revised examples:

  • vedo -r koch_fractal
  • vedo -r mesh_custom
  • vedo -r fft2d
  • vedo -r lines_intersect
  • vedo -r cutFreeHand
  • vedo -r spline_tool
  • vedo -r legendbox
  • vedo -r read_volume3
  • vedo -r multi_viewer2

2021.0.2

16 Mar 21:43
Compare
Choose a tag to compare

vedo 2021.0.2

A new web page is avaialble! check it out at https://vedo.embl.es

  • python2 is no more supported
  • A dangerous bug in mesh.closestPoint(returnIds=True) has been fixed
  • Added interfaces and examples to libraries iminuit
    and pymeshlab
  • variable datadir changed to dataurl
  • added ipyvtk_simple option for notebooks rendering

base.py

  • method addPos() (obsolete but still valid) renamed to shift()
  • added shortcut to input the opacity with syntax mesh.color("blue", 0.5)
  • arrays with name "Normals" are set as active normals automatically ( @theponpon )
  • added keyword invert in getTransform() ( @Tai-Hsien )
  • added deleteCells() method

addons.py

  • added mesh cutter with planes and spheres in addition to boxes ( @nantille )
  • major revision of the Axes class. with new added feature like axes inversion, free rotations
  • keyword xFlipText disappeared as is now substituted by xLabelRotation
  • Added xyShift to shift the whole cartesian plane along one axis ( @JGarrett7 )
  • Axes can be flipped with their range with xInverted (caveat: this does not at all affect the world coordinate system!)
  • new class LegendBox to show a legend with icons

colors.py

  • vedo is now independent of matplotlib for colormaps
  • added new bootstrap5 color scheme
    (e.g. c='red1', 'red2', ..., 'red9', or in short: c='r1', 'r2', ..., 'r9')
    Lower index means darker.
  • added rgb2hex() and hex2rgb() functions
  • fixed bug on printc() and added settings.enablePrintColor. #337

mesh.py

  • fixed bug in splitByConnectivity() ( @jsanchez679 )
  • added method addConnectivity() to add a connectivity array to mesh points
  • added method isClosed() ti return if mesh is watertight (no holes)

plotter.py

  • improved resetcam behaviour
  • passing camera no more empties the passed dictionary (thanks @icemtel )
  • verbose keyword has been removed (as hard to maintain)
  • mouse clicking can now pick Picture not only Mesh
  • revised and improved callback functionality with plotter.addCallback()
    (see examples mousehighlight, mousehover)
  • new way of creating a callback loop with a timer (thanks @nantille - see examples timer_callback)

picture.py

  • attribute picture.shape holds the shape of the picture in pixels
  • added gif file reader to return a list of Picture objs.
  • added clone() method.

pointcloud.py

  • added fitCircle() to fit a circle to a line in 3D.
  • added a revision of self.densify(). Removed densifyCloud(). #338

pyplot.py

  • a brand new function fit() to perform polynomial fitting to data with error bars in both x and y with correct estimation of error bands via bootstrap method (there are out there soo many wrong scripts in matplotlib!)
  • added pyplot.matrix() to plot numpy matrices (eg. correlation/covariance matrix)
  • various minor fixes

shapes.py

  • Spline can control the easing, the density of points along the line.
  • support for closed splines.
  • Text2D completely rewritten. Can now update it after creation (e.g. mytxt.text("test").color("g"))

volume.py

  • added volume.shade() which can be True or False. Disable by default (was previously enabled)
    to be used in conjunction with volume.lighting() to create a mesh-like rendering of the volume.
    (thanks to @nantille for debugging)
  • fixed example interpolateVolume (thanks @rafaelmarch3 )

New/Revised examples:

  • vedo -r colorcubes

  • vedo -r cutter

  • vedo -r spline_ease

  • vedo -r gyroid

  • vedo -r align6

  • vedo -r colormap_list

  • vedo -r bloch

  • vedo -r slicePlane1

  • vedo -r slicePlane2

  • vedo -r pygmsh_cut

  • vedo -r mousehighlight

  • vedo -r mousehover

  • vedo -r line2mesh_quads

  • vedo -r line2mesh_tri

  • vedo -r pointsCutMesh2

  • vedo -r hoverLegend

  • vedo -r iminuit

  • vedo -r pymeshlab1

  • vedo -r timer_callback1

  • vedo -r timer_callback2

  • vedo -r fitCircle

  • vedo -r anim_lines

  • vedo -r earthquake_browser

  • vedo -r np_matrix

  • vedo -r customAxes2

  • vedo -r customAxes3

  • vedo -r glyphs3

  • vedo -r fitPolynomial1

  • vedo -r fitPolynomial2

  • vedo -r histo_gauss

  • vedo -r plot_polar

  • vedo -r densifycloud

  • vedo -r interpolateVolume

2020.4.2

23 Nov 21:54
Compare
Choose a tag to compare

Main changes

  • Removed restriction VTK<9. Even so, VTK9 seems significantly slower and unexpected behaviors are still possible.

  • Various minor issues have been fixed.


addons.py:

  • name change addLight() -> Light(). Improved API. Revised example basic/lights.py
    (thanks to @mit10000 and @theponpon input #249)
  • added size keyword for addScalarBar() to control size in pixels (@RubendeBruin #237)

io.py:

  • added default bitrate specification Video.options="-b:v 8000k" (for ffmpeg)
    seems to produce much better quality results - tested on linux system only.

plotter.py:

  • modified plotter.addLight()
  • added warning to non-existing camera keywords (@FedeClaudi #244)
  • In rendering window:
    • pressing 3 cycles over predefined set of textures for clicked Mesh objects
    • pressing I picks the color under the mouse (uses colors.pickColor())

shapes.py:

  • added class Brace (see example scatter3.py)
  • can sweep() a Line object to create a surface

New/Revised examples:

vedo -r rgbaImage
vedo -r cutWithMesh2
vedo -r scatter3
vedo -r lights
vedo -r plot_density4d (thanks to @edmontz)
vedo -r app_raycaster
vedo -r app_isobrowser