In This Topic
Provides the ability to reconstruct images in planar or curvilinear planes from the series of 2D DICOM images.
Object Model
Syntax
'Declaration
Public Class MprImage
public __gc class MprImage
public ref class MprImage
Remarks
Main features:
The MPR (multiplanar reconstruction) provides the ability to reconstruct images in planar planes (coronal, sagittal, axial or oblique) and curvilinear planes from the series of 2D images.
The MPR image can be created only from images series, which meets the following requirements:
- the planes of all images in the series must be parallel
- the distance between neighboring images must not exceed the SliceIntervalMaxDelta
The MPR image stores reconstructed data set as the grayscale values with 16-bit precision.
The MPR image uses two coordinate spaces:
- World space - 3D coordinate system in which the location and directions of source DICOM images are specified. The coordinate system uses millimeters as unit of measure.
- MPR Image space - 3D coordinate system in which the location and directions are specified relative to the location and directions of source DICOM images. The coordinate system uses millimeters as unit of measure.
- Slice space - 2D coordinate system, which defines planar or curvilinear slice of MPR Image space. The coordinate system uses millimeters as unit of measure. The coordinate system's center equals to the slice location (Location) in MPR Image space.
Example
This C#/VB.NET code shows how to create, initialize and synchronously fill DICOM MPR image.
''' <summary>
''' Creates the initialized <see cref="Vintasoft.Imaging.Dicom.Mpr.MprImage"/>
''' from <see cref="Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomFile"/> array.
''' </summary>
''' <param name="sourceDicomFiles">The source DICOM files.</param>
''' <returns>
''' The initialized <see cref="Vintasoft.Imaging.Dicom.Mpr.MprImage"/>.
''' </returns>
''' <exception cref="System.ArgumentNullException">Thrown if <i>sourceDicomFiles</i> is <b>null</b>.</exception>
Public Shared Function CreateInitAndSyncFill(ParamArray sourceDicomFiles As Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomFile()) As Vintasoft.Imaging.Dicom.Mpr.MprImage
' if source DICOM files are not specified
If sourceDicomFiles Is Nothing Then
Throw New System.ArgumentNullException()
End If
' a list of source MPR slices
Dim sourceMprSlices As New System.Collections.Generic.List(Of Vintasoft.Imaging.Dicom.Mpr.MprDicomImagePlanarSlice)()
' for each DICOM file
For Each sourceDicomFile As Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomFile In sourceDicomFiles
' for each DICOM frame
For Each sourceDicomFrame As Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomFrame In sourceDicomFile.Pages
' create MPR slice from DICOM frame
sourceMprSlices.Add(New Vintasoft.Imaging.Dicom.Mpr.MprDicomImagePlanarSlice(sourceDicomFrame))
Next
Next
' create the MPR image
Dim mprImage As New Vintasoft.Imaging.Dicom.Mpr.MprImage()
' initialize the source data
mprImage.Initialize(sourceMprSlices.ToArray())
' fill the MPR image data synchronously
mprImage.FillDataSync()
Return mprImage
End Function
/// <summary>
/// Creates the initialized <see cref="Vintasoft.Imaging.Dicom.Mpr.MprImage"/>
/// from <see cref="Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomFile"/> array.
/// </summary>
/// <param name="sourceDicomFiles">The source DICOM files.</param>
/// <returns>
/// The initialized <see cref="Vintasoft.Imaging.Dicom.Mpr.MprImage"/>.
/// </returns>
/// <exception cref="System.ArgumentNullException">Thrown if <i>sourceDicomFiles</i> is <b>null</b>.</exception>
public static Vintasoft.Imaging.Dicom.Mpr.MprImage CreateInitAndSyncFill(
params Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomFile[] sourceDicomFiles)
{
// if source DICOM files are not specified
if (sourceDicomFiles == null)
throw new System.ArgumentNullException();
// a list of source MPR slices
System.Collections.Generic.List<Vintasoft.Imaging.Dicom.Mpr.MprDicomImagePlanarSlice> sourceMprSlices =
new System.Collections.Generic.List<Vintasoft.Imaging.Dicom.Mpr.MprDicomImagePlanarSlice>();
// for each DICOM file
foreach (Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomFile sourceDicomFile in sourceDicomFiles)
{
// for each DICOM frame
foreach (Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomFrame sourceDicomFrame in sourceDicomFile.Pages)
{
// create MPR slice from DICOM frame
sourceMprSlices.Add(new Vintasoft.Imaging.Dicom.Mpr.MprDicomImagePlanarSlice(sourceDicomFrame));
}
}
// create the MPR image
Vintasoft.Imaging.Dicom.Mpr.MprImage mprImage = new Vintasoft.Imaging.Dicom.Mpr.MprImage();
// initialize the source data
mprImage.Initialize(sourceMprSlices.ToArray());
// fill the MPR image data synchronously
mprImage.FillDataSync();
return mprImage;
}
Inheritance Hierarchy
System.Object
 Vintasoft.Imaging.Dicom.Mpr.MprImage
Requirements
Target Platforms: .NET9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5
See Also