VintaSoft Imaging .NET SDK 15.1: Documentation for .NET developer
Vintasoft.Imaging.Dicom.Mpr Namespace / MprDicomImagePlanarSlice Class
Members Object Syntax Example Hierarchy Requirements SeeAlso
In This Topic
MprDicomImagePlanarSlice Class
In This Topic
Represents MPR planar slice, which is obtained from DICOM frame.
Object Model
DicomFrame DicomDecodingSettings MprSlice ImageSize MprDicomImagePlanarSlice
Syntax
'Declaration

Public Class MprDicomImagePlanarSlice
   Inherits MprImagePlanarSlice

public class MprDicomImagePlanarSlice : MprImagePlanarSlice

Example

This C#/VB.NET code shows how to create the source data for DICOM MPR.


''' <summary>
''' Creates the <see cref="Vintasoft.Imaging.Dicom.Mpr.MprDicomImagePlanarSlice"/> for DICOM MPR.
''' </summary>
''' <param name="sourceDicomFiles">The source DICOM files.</param>
''' <returns>
''' The source data for DICOM MPR.
''' </returns>
''' <exception cref="System.ArgumentNullException">Thrown if <i>sourceDicomFiles</i> is <b>null</b>.</exception>
Public Shared Function CreateSourceDicomFrames(ParamArray sourceDicomFiles As Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomFile()) As Vintasoft.Imaging.Dicom.Mpr.MprDicomImagePlanarSlice()
    ' 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 frame As Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomFrame In sourceDicomFile.Pages
            ' create MPR slice from DICOM frame
            sourceMprSlices.Add(New Vintasoft.Imaging.Dicom.Mpr.MprDicomImagePlanarSlice(frame))
        Next
    Next

    Return sourceMprSlices.ToArray()
End Function


/// <summary>
/// Creates the <see cref="Vintasoft.Imaging.Dicom.Mpr.MprDicomImagePlanarSlice"/> for DICOM MPR.
/// </summary>
/// <param name="sourceDicomFiles">The source DICOM files.</param>
/// <returns>
/// The source data for DICOM MPR.
/// </returns>
/// <exception cref="System.ArgumentNullException">Thrown if <i>sourceDicomFiles</i> is <b>null</b>.</exception>
public static Vintasoft.Imaging.Dicom.Mpr.MprDicomImagePlanarSlice[] CreateSourceDicomFrames(
    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 frame in sourceDicomFile.Pages)
        {
            // create MPR slice from DICOM frame
            sourceMprSlices.Add(new Vintasoft.Imaging.Dicom.Mpr.MprDicomImagePlanarSlice(frame));
        }
    }

    return sourceMprSlices.ToArray();
}

Inheritance Hierarchy

System.Object
   Vintasoft.Imaging.Dicom.Mpr.MprImageSlice
      Vintasoft.Imaging.Dicom.Mpr.MprImagePlanarSlice
         Vintasoft.Imaging.Dicom.Mpr.MprDicomImagePlanarSlice

Requirements

Target Platforms: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

See Also