Function: getCubeSizeInView()
getCubeSizeInView(
imageData,viewPlaneNormal,viewUp):object
Gets the view width and height of the overall volume as displayable in the given orientation.
This ensures that the views in the MPR view orthogonal to the view plane will in the volume touch two opposite edges of the viewport. This may not occur for any single image, but allows navigation through the MPR views to see the entire volume without panning or zooming.
This is also the required size to display a 3d volume representation in the given orientation without panning or zooming.
A similar, related algorithm that can be used to provide a slightly larger view is to compute the intersection of the plane parallel to the view plane but thickness distance towards the maximum vertex in the z direction with the volume. This slightly larger view will contain all frames from the given volume not thicker than the thickness, but will require navigation of the focal point to use a vector in the direction of the acquisition orientation nearest the view plane normal rather than directly in the view plane normal direction.
Parameters
• imageData: vtkImageData
The vtkImageData object used for index-to-world coordinate transformation and to get the extent
• viewPlaneNormal: Point3
The normal vector of the plane in world coordinates (assumed to be unit vector)
• viewUp: Point3
The up vector in world coordinates (assumed to be unit vector)
Returns
object
An object with widthWorld and heightWorld
depthWorld
depthWorld:
number
heightWorld
heightWorld:
number
widthWorld
widthWorld:
number
Defined in
packages/core/src/utilities/getPlaneCubeIntersectionDimensions.ts:70