MeVisLab Scripting Reference
|
Inherits QObject.
Public Slots | |
QVariant | mapVoxelToDevice (float x, float y, float z) const |
QVariant | mapVoxelToDevice (const SbVec3f &voxelCoord) const |
QVariant | mapWorldToDevice (float x, float y, float z) const |
QVariant | mapWorldToDevice (const SbVec3f &voxelCoord) const |
int | getSliceAtDevicePosition (int x, int y) const |
QVariant | mapDeviceToWorld (int x, int y) |
QVariant | mapDeviceToVoxel (int x, int y) |
void | updateLayout (int viewportX, int viewportY, int viewportWidth, int viewportHeight, float pixelScaleFactor=1.0f) |
A class that wraps SoView2D modules for use in Python.
Its main purpose is to get at the mapping between voxel/world and device coordinates.
|
slot |
Returns the z-index of slice whose visible rect is hit, or -1 if no slice is hit.
|
slot |
Maps the device coordinate to voxel coordinate; returns either a SbVec3f or None if the device coordinate does not map to a visible slice.
|
slot |
Maps the device coordinate to world coordinate; returns either a SbVec3f or None if the device coordinate does not map to a visible slice.
|
slot |
Maps the voxel coordinate to device coordinate; returns either a SbVec2f or None if the coordinate is not visible.
|
slot |
Maps the voxel coordinate to device coordinate; returns either a tuple of values or None if the coordinate is not visible.
|
slot |
Maps the world coordinate to device coordinate; returns either a SbVec2f or None if the coordinate is not visible.
|
slot |
Maps the world coordinate to device coordinate; returns either a tuple of values or None if the coordinate is not visible.
|
slot |
Immediately after the input image has changed (or before any event has been processed/before the image has been displayed) the image layout has not been updated and the mapping of coordinates will use wrong values.
This can be fixed with this call, but the user must provide the position and size of the viewport.
pixelScaleFactor | The pixel scale factor for the view. For a scene rendered with an OffscreenRenderer, the pixelScale parameter of that module should be used. If the scene is displayed directly in MeVisLab, one should call .scaleFactor() from scripting on the window (or a control) to get the value. |