MedicalHelperOrientView Method |
Adjusts the camera to view a slice or volume along the specified axis.
The camera is rotated to give the conventional orientation for the specified axis.
If the volume data is specified, then viewAll() is called to center the volume in
the view volume.
If the camera is an SoOrthographicCamera (the usual case for viewing a slice) and
the volume data node is specified, then the camera (specifically the view volume
height) is adjusted to make the slice image fill the viewport. This is convenient
because the viewAll() method gives a very loose fit around the slice image.
If the camera is an SoPerspectiveCamera (commonly used for viewing a 3D volume)
or the volume data node is specified, then ViewAll() is called, but no
additional adjustment is done to the camera. 'slack' is ignored in this case.
Axial -> "Feet" view.
Coronal -> "Anterior" view.
Sagittal -> "Left" view.
For a 3D volume rendering view, typically specify the Coronal axis.
Namespace: OIV.Medical.HelpersAssembly: OIV.Medical (in OIV.Medical.dll) Version: 2024.2.2.Release.77a61d1a523234b418592ccd07676e84f6c1d90b
Syntax public static bool OrientView(
MedicalHelperAxis axis,
SoCamera camera,
SoVolumeData volume = null,
float slack = 1.01f
)
Public Shared Function OrientView (
axis As MedicalHelperAxis,
camera As SoCamera,
Optional volume As SoVolumeData = Nothing,
Optional slack As Single = 1.01F
) As Boolean
public:
static bool OrientView(
MedicalHelperAxis axis,
SoCamera^ camera,
SoVolumeData^ volume = nullptr,
float slack = 1.01f
)
static member OrientView :
axis : MedicalHelperAxis *
camera : SoCamera *
?volume : SoVolumeData *
?slack : float32
(* Defaults:
let _volume = defaultArg volume null
let _slack = defaultArg slack 1.01f
*)
-> bool
Parameters
- axis
- Type: OIV.Medical.HelpersMedicalHelperAxis
Axial, Coronal or Sagittal - camera
- Type: OIV.Inventor.NodesSoCamera
The camera node that will be modified (fails if null). - volume (Optional)
- Type: OIV.VolumeViz.NodesSoVolumeData
[Optional] The data volume that is being viewed (used to
compute view volume, not modified). - slack (Optional)
- Type: SystemSingle
[Optional] Values greater than 1 will leave additional space
between image and window edge.
Return Value
Type:
BooleanTrue if the operation succeeded.
See Also