skshapes.applications.browser.Browser
- class skshapes.applications.browser.Browser(shapes)
Bases:
object
Application to browse a sequence of shapes with a slider.
Based on [vedo.applications.Browser](https://vedo.embl.es/docs/vedo/applications.html#Browser).
- Parameters:
shapes (
list
[polydata_type
|image_type
]) – The shapes to visualize.
Examples
You can visualize any sequence of shapes with a slider to navigate through:
import skshapes as sks # Create a sequence of translated spheres to visualize meshes = [sks.Sphere() for _ in range(5)] for i in range(5): meshes[i].points += torch.tensor([i / 5, 0, 0]) # Create a browser to visualize the sequence browser = sks.Browser(meshes) browser.show()
This application is useful to visualize the intermediate shapes in a registration task:
import skshapes as sks import torch source, target = sks.Sphere(), sks.Sphere() # Translate the target target.points += torch.tensor([1, 0, 0]) # Create a registration task with a rigid motion model and L2 loss model = sks.RigidMotion(n_steps=5) loss = sks.L2Loss() task = sks.Registration(model=model, loss=loss, n_iter=5) task.fit(source=source, target=target) # Visualize the intermediate shapes path = task.path_ browser = sks.Browser(path) browser.show()
- __init__(shapes)
Methods
__init__
(shapes)show
()Show the browser.
- show()
Show the browser.