Curved MPR example app

This example shows how to create 2 different flavors of curved MPR viewports. First Straightening out the centerline and Second projecting the centerline onto a plane.

  • The centerline is defined by selecting point in axial, sagittal or coronal views with shift-left click.
  • In a "real" app you would be able to adjust points, But to keep the code simple we left that out. If you don't like where a point ended up, simply clear the centerline and re-do it.
  • Once a centerline is defined choose of of the 4 buttons in the 3D view to display that type of curved MPR (Straightened horizontal or vertical, or Flatened horizontal or vertical)
  • Horizontal and vertical do not change the line, just the orientatin it is displayed at.
  • Once the curved MPR is displayed, shift-left click in that view allows you to rotate the curved MPR around the primary axis.
  • Also, shift-right click will zoom the curvedMPR view. (Note: zooming only adjusts the zoom perpendicualr to the primary axis. The primary axis zoom is always set to display the exact length of the centerline)
  • Geometry for curved MPR is complex. The SDK is designed to be felxible to create varied curved MPR views. For this reason the Interface is a bit simpler.
  • A matrix is passed in for each point in the centerline. In the Matrix the offsetVector is the location of the centerline point and the xVector is the direction of the perpendicular line in the image.
  • For a "straightened" view, simply place th ecetnerline point as offsetVector and the xVector to be prependicular to tangent at the point.
  • For a "flattend" view the math is a bit more complex. The xVectors are all the same direction (which thus makes less distortion) but the centerline should project onto a plne (and this the "line" still appears curved for any curves in the direction of that plane). To create this effect the centerline points are reverse shifted along the plane for each rotation angle.

View the source /foviaserver/public/apps/curvedmpr/curvedmpr.js

To run the example, click on a local copy of http://localhost:8088/apps/curvedmpr/