skshapes.applications.vertices_landmark_setter.LandmarkSetterSingleMesh
- class skshapes.applications.vertices_landmark_setter.LandmarkSetterSingleMesh(shape)
Bases:
PlotterSingle PolyData landmark setter.
- Parameters:
shape (
polydata_type) – The PolyData on which the landmarks are selected.
- __init__(shape)
- Parameters:
shape (
polydata_type) – (str, list) shape of the grid of renderers in format (rows, columns). Ignored if N is specified.N – (int) number of desired renderers arranged in a grid automatically.
pos – (list) (x,y) position in pixels of top-left corner of the rendering window on the screen
size – (str, list) size of the rendering window. If ‘auto’, guess it based on screensize.
screensize – (list) physical size of the monitor screen in pixels
bg – (color, str) background color or specify jpg image file name with path
bg2 – (color) background color of a gradient towards the top
title – (str) window title
axes – (int) axis type-1 can be fully customized by passing a dictionary. Check addons.Axes() for the full list of options. Set the type of axes to be shown: - 0, no axes - 1, draw three gray grid walls - 2, show cartesian axes from (0,0,0) - 3, show positive range of cartesian axes from (0,0,0) - 4, show a triad at bottom left - 5, show a cube at bottom left - 6, mark the corners of the bounding box - 7, draw a 3D ruler at each side of the cartesian axes - 8, show the vtkCubeAxesActor object - 9, show the bounding box outLine - 10, show three circles representing the maximum bounding box - 11, show a large grid on the x-y plane - 12, show polar axes - 13, draw a simple ruler at the bottom of the window - 14: draw a camera orientation widget
sharecam – (bool) if False each renderer will have an independent camera
interactive – (bool) if True will stop after show() to allow interaction with the 3d scene
offscreen – (bool) if True will not show the rendering window
qt_widget – (QVTKRenderWindowInteractor) render in a Qt-Widget using an QVTKRenderWindowInteractor. See examples qt_windows[1,2,3].py and qt_cutter.py.
Methods
__init__(shape)add(*objs[, at])Append the input objects to the internal list of objects to be shown.
add_ambient_occlusion(radius[, bias, blur, ...])Screen Space Ambient Occlusion.
add_button([fnc, states, c, bc, pos, size, ...])Add a button to the renderer window.
add_callback(event_name, func[, priority, ...])Add a function to be executed while show() is active.
add_depth_of_field([autofocus])Add a depth of field effect in the scene.
add_global_axes([axtype, c])Draw axes on scene.
add_hint(obj[, text, c, bg, font, size, ...])Create a pop-up hint style message when hovering an object.
add_hover_legend([at, c, pos, font, s, bg, ...])Add a legend with 2D text which is triggered by hovering the mouse on an object.
add_icon(icon[, pos, size])Add an inset icon mesh into the same renderer.
add_inset(*objects, **options)Add a draggable inset space into a renderer.
add_legend_box(**kwargs)Add a legend to the top right.
add_observer(event_name, func[, priority])Add a callback function that will be called when an event occurs.
add_renderer_frame([c, alpha, lw, padding, ...])Add a frame to the renderer subwindow.
add_scale_indicator([pos, s, length, lw, c, ...])Add a Scale Indicator.
add_shadows()Add shadows at the current renderer.
add_slider(sliderfunc, xmin, xmax[, value, ...])Add a vedo.addons.Slider2D which can call an external custom function.
add_slider3d(sliderfunc, pos1, pos2, xmin, xmax)Add a 3D slider widget which can call an external custom function.
add_spline_tool(points[, pc, ps, lc, ac, ...])Add a spline tool to the current plotter.
at(nren[, yren])Select the current renderer number as an int.
azimuth(angle)Rotate camera around the view up vector.
background([c1, c2, at, mode])Set the color of the background for the current renderer.
break_interaction()Break window interaction and return to the python execution flow
check_actors_trasform([at])Reset the transformation matrix of all actors at specified renderer.
clear([at, deep])Clear the scene from all meshes and volumes.
close()Close the plotter.
color_picker(xy[, verbose])Pick color of specific (x,y) pixel on the screen.
compute_screen_coordinates(obj[, full_window])Given a 3D points in the current renderer (or full window), find the screen pixel coordinates.
compute_world_coordinate(pos2d[, at, objs, ...])Transform a 2D point on the screen into a 3D point inside the rendering scene.
dolly(value)Move the camera towards (value>0) or away from (value<0) the focal point.
elevation(angle)Rotate the camera around the cross product of the negative of the direction of projection and the view up vector.
export([filename, binary])Export scene to file to HTML, X3D or Numpy file.
fill_event([ename, pos, enable_picking])Create an Event object with information of what was clicked.
fly_to(point)Fly camera to the specified point.
fov(angle)Set the field of view angle for the camera.
freeze([value])Freeze the current renderer.
get_actors([at, include_non_pickables])Return a list of Volumes from the specified renderer.
get_meshes([at, include_non_pickables, ...])Return a list of Meshes from the specified renderer.
get_volumes([at, include_non_pickables])Return a list of Volumes from the specified renderer.
initialize_interactor()Initialize the interactor if not already initialized.
interactive()Start window interaction.
look_at([plane])Move the camera so that it looks at the specified cartesian plane
move_camera(cameras[, t, times, smooth, ...])Takes as input two cameras set camera at an interpolated position:
parallel_projection([value, at])Use parallel projection at a specified renderer.
pick_area(pos1, pos2[, at])Pick all objects within a box defined by two corner points in 2D screen coordinates.
play([recorded_events, repeats])Play camera, mouse, keystrokes and all other events.
pop([at])Remove the last added object from the rendering window.
print()Print information about the current instance.
process_events()Process all pending events.
record([filename])Record camera, mouse, keystrokes and all other events.
remove(*objs[, at])Remove input object to the internal list of objects to be shown.
remove_all_observers()Remove all observers.
remove_callback(cid)Remove a callback function by its id or a whole category of callbacks by their name.
remove_lights()Remove all the present lights in the current renderer.
render([resetcam])Render the scene.
render_hidden_lines([value])Remove hidden lines when in wireframe mode.
reset_camera([tight])Reset the camera position and zooming.
reset_clipping_range([bounds])Reset the camera clipping range to include all visible actors.
reset_viewup([smooth])Reset the orientation of the camera to the closest orthogonal direction and view-up.
roll(angle)Roll the camera about the direction of projection.
screenshot([filename, scale, asarray])Take a screenshot of the Plotter window.
show(*objects[, at, axes, resetcam, zoom, ...])Render a list of objects.
start()Start the landmark setter.
timer_callback(action[, timer_id, dt, one_shot])Start or stop an existing timer.
toimage([scale])Generate a Image object from the current rendering window.
use_depth_peeling([at, value])Specify whether use depth peeling algorithm at this specific renderer Call this method before the first rendering.
user_mode(mode)Modify the user interaction mode.
zoom(zoom)Apply a zooming factor for the current camera view
Attributes
actorsReturn the list of actors.
cameraReturn the current active camera.
- start()
Start the landmark setter.