oursin.camera
Camera
Functions
Set camera pan coordinates |
|
Set the camera position in CCF space in um relative to CCF (0,0,0), coordinates can be outside CCF space. |
|
Set the camera rotation (pitch, yaw, spin). |
|
Set the camera target coordinate in CCF space in um relative to CCF (0,0,0), without moving the camera. |
|
Set the camera rotation to look towards a target area |
|
Set the camera zoom. |
- set_target(camera_target_coordinate)[source]
Set the camera target coordinate in CCF space in um relative to CCF (0,0,0), without moving the camera. Coordinates can be negative or larger than the CCF space (11400,13200,8000)
Parameters
- camera_target_coordinatefloat list
list of coordinates in ml/ap/dv in um
Examples
>>> urn.set_target([500,1500,1000])
- set_position(camera_pos, preserve_target=True)[source]
Set the camera position in CCF space in um relative to CCF (0,0,0), coordinates can be outside CCF space.
Parameters
- camera_posfloat list
list of coordinates in ml/ap/dv in um
- preserve_targetbool, optional
when True keeps the camera aimed at the current target, when False preserves the camera rotation, by default True
Examples
>>> urn.set_position([500,1500,1000])
- set_rotation(pitch, yaw, spin)[source]
Set the camera rotation (pitch, yaw, spin). The camera is locked to a target, so this rotation rotates around the target.
Rotations are applied in order: pitch, then yaw, then spin.
Parameters
- camera_rotfloat list
list of euler angles to set the camera rotation in (pitch, yaw, spin)
- set_target_area(camera_target_area)[source]
Set the camera rotation to look towards a target area
Note: some long/curved areas have mesh centers that aren’t the ‘logical’ center. For these areas, calculate a center yourself and use set_camera_target.
Parameters
- camera_target_areastring
area ID or acronym, append “-lh” or “-rh” for one-sided meshes