Curved MPR

<< Click to Display Table of Contents >>

Navigation:  XStream® HDVR® SDK > Advanced Functionality >

Curved MPR

Previous pageReturn to chapter overviewNext page

C++ C++ Java Java .NET .NET

Summary

 

The XStream® HDVR® SDK supports Curved Multiplanar Reformatting, or Curved MPR. This technique applies a transformation to the visualization of the dataset to straighten the visualization of a curved structure for better diagnostic imaging and analysis. It is commonly used in vessel analysis or to create a panoramic view in dental workflows. Typically the user will select or trace the portion of the anatomical area of interest, and apply a transformation to reconstruct the volume along this path.

 

 

CurvedMPR_Before

Trace of a curved vessel

CurvedMPR_After

Vessel straightened with CurvedMPR

 

Curved MPR

 

The Curved MPR feature works by specifying a number of planar slices through the dataset and a vector axis to use for aligning the slices. The Curved MPR feature is implemented using the IRenderQueue::SetCurvedMPRPath() and IRenderEngineContext::SetCurvedMPRPath() methods. The SetCurvedMPRPath() method takes three parameters. The first is the number of projection planes (or control points) used to define the path. The second parameter is an array of MATRIX44D structures that define the path control points. Each of these matrices defines the position of the point (matrix elements m14, m24, m34) and the X vector for the point (m11, m21, m31). This point and vector together define a plane that slices through the volume.

 
When the curved path described by these control points is converted to a straight path, the vectors for these control points are also aligned according to the third function parameter, which is of type ENUM_CURVED_MPR_TYPE enumeration. This describes which axis is non-linear (and which is linear) during the curve straightening process, as well as the interpolation type used to render the image. If the X-axis is set to be non-linear, the vectors describing the control points are aligned along the Y-axis.

 

Prior to calling the setCurvedMPRPath() method, RENDER_PARAMS::RenderType must be set to RT_MPR_CURVED.

 

// Set the RenderType to use RT_MPR_CURVED
RENDER_PARAMS rp;
rp.Mask = RPM_RENDER_TYPE;
rp.RenderType = RT_MPR_CURVED;
pRenderEngine->SetRenderParams(&rp);
 
// Create 3 control points (in your code you can use as many points as you like)
MATRIX44D planes[3];
 
// Set control point position

planes[0].setIdentity();
planes[0].m14 = pos.x;
planes[0].m24 = pos.y;
planes[0].m24 = pos.z;
 
// Set control point X vector (you can use whatever vector is appropriate)
planes[0].m11 = 0;
planes[0].m21 = 1;
planes[0].m31 = 0;
 
// Set values for additional control points at planes[1] and planes[2]
SetMatrix(planes[1]);

SetMatrix(planes[2]);

 
// Create the curved MPR path. 
// Use whatever ENUM_CURVED_MPR_TYPE value is appropriate for your application
pRenderEngine->SetCurvedMPRPath(3, planes, CURVED_MPR_TYPE_X_IS_CURVED_TRICUBIC);

 

The Curved MPR feature works by specifying a number of planar slices through the dataset and a vector axis to use for aligning the slices. The Curved MPR feature is implemented by the hdrcRenderQueue::setCurvedMPRPath() and hdrcRenderEngineContext::setCurvedMPRPath() methods. The setCurvedMPRPath() method takes three arguments. The first parameter is the number of projection planes (or control points) used to define the path. The second  parameter is an array of MATRIX44D structures defining the path control points. Each of these matrices defines the position of the point (matrix elements m14, m24, m34) and the X vector for the point (m11, m21, m31). ). This point and vector together define a plane that slices through the volume.

 
When the curved path described by these control points is converted to a straight path, the vectors for these control points are also aligned according to the third function parameter, which a value from the hdrcDefines.CURVED_MPR_TYPE group. This describes which axis is non-linear (and which is linear) during the curve straightening process, as well as the interpolation type used to render the image. If the X-axis is set to be non-linear, the vectors describing the control points are aligned along the Y-axis.

 

Prior to calling the setCurvedMPRPath() method, RENDER_PARAMS::RenderType must be set to hdrcDefines.RT_MPR_CURVED.

 

// Set the RenderType to use RT_MPR_CURVED
RENDER_PARAMS rp = new RENDER_PARAMS();
rp.Mask = hdrcDefines.RPM_RENDER_TYPE;
rp.RenderType = hdrcDefines.RT_MPR_CURVED;
renderEngine.SetRenderParams(rp);
 
// Create 3 control points (in your code you can use as many points as you like)
MATRIX44D[] planes = new MATRIX44D[3];
 
// Set control point position

planes[0].setIdentity();
planes[0].m14 = pos.x;
planes[0].m24 = pos.y;
planes[0].m24 = pos.z;
 
// Set control point X vector (you can use whatever vector is appropriate)
planes[0].m11 = 0;
planes[0].m21 = 1;
planes[0].m31 = 0;
 
// Set values for additional control points at planes[1] and planes[2]
SetMatrix(planes[1]);

SetMatrix(planes[2]);

 
// Create the curved MPR path. 
// Use whatever ENUM_CURVED_MPR_TYPE value is appropriate for your application
renderEngine.setCurvedMPRPath(3, planes, hdrcDefines.CURVED_MPR_TYPE_X_IS_CURVED_TRICUBIC);

 

The .NET example code is included below:

 

// Set the RenderType to use RT_MPR_CURVED
RENDER_PARAMS rp = new RENDER_PARAMS();
rp.Mask = hdrcDefines.RPM_RENDER_TYPE;
rp.RenderType = hdrcDefines.RT_MPR_CURVED;
renderEngine.SetRenderParams(rp);
 
// Create 3 control points (in your code you can use as many points as you like)
MATRIX44D[] planes = new MATRIX44D[3];
 
// Set control point position

planes[0].setIdentity();
planes[0].m14 = pos.x;
planes[0].m24 = pos.y;
planes[0].m24 = pos.z;
 
// Set control point X vector (you can use whatever vector is appropriate)
planes[0].m11 = 0;
planes[0].m21 = 1;
planes[0].m31 = 0;
 
// Set values for additional control points at planes[1] and planes[2]
SetMatrix(planes[1]);

SetMatrix(planes[2]);

 
// Create the curved MPR path. 
// Use whatever ENUM_CURVED_MPR_TYPE value is appropriate for your application
renderEngine.setCurvedMPRPath(3, planes, hdrcDefines.CURVED_MPR_TYPE_X_IS_CURVED_TRICUBIC);