VintaSoft Imaging .NET SDK 15.1: Documentation for .NET developer
Vintasoft.Imaging.Codecs.ImageFiles.Dicom Namespace / DicomFrame Class
Members Object Syntax Example Hierarchy Requirements SeeAlso
In This Topic
DicomFrame Class
In This Topic
Represents a DICOM frame.
Object Model
Resolution Palette DicomOverlayImage DicomImageVoiLookupTable DicomImageVoiLookupTable DicomImageModalityLookupTable VintasoftPoint3D VintasoftVector3D VintasoftVector3D DicomFile ImageFileSource DicomFrame
Syntax
'Declaration

Public NotInheritable Class DicomFrame
   Inherits DicomPage

public sealed class DicomFrame : DicomPage

Example

This C#/VB.NET code shows how to get an image of DICOM frame and save it as PNG file.


''' <summary>
''' Returns an image of DICOM frame and saves image to a PNG file.
''' </summary>
''' <param name="filePath">Path to a DICOM file.</param>
''' <param name="pageIndex">Index of DICOM page.</param>
Public Sub GetAndSaveDicomImage(filePath As String, pageIndex As Integer)
    ' open DICOM file
    Using dicomFile As New Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomFile(filePath)
        ' get DICOM page
        Dim page As Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomPage = dicomFile.Pages(pageIndex)
        ' get DICOM image
        Using image As Vintasoft.Imaging.VintasoftImage = page.GetImage()
            ' save image to a PNG file
            image.Save("E:\DicomImage.png")
        End Using
    End Using
End Sub


/// <summary>
/// Returns an image of DICOM frame and saves image to a PNG file.
/// </summary>
/// <param name="filePath">Path to a DICOM file.</param>
/// <param name="pageIndex">Index of DICOM page.</param>
public void GetAndSaveDicomImage(string filePath, int pageIndex)
{
    // open DICOM file
    using (Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomFile dicomFile =
        new Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomFile(filePath))
    {
        // get DICOM page
        Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomPage page = dicomFile.Pages[pageIndex];
        // get DICOM image
        using (Vintasoft.Imaging.VintasoftImage image = page.GetImage())
        {
            // save image to a PNG file
            image.Save(@"E:\DicomImage.png");
        }
    }
}

Inheritance Hierarchy

System.Object
   Vintasoft.Imaging.Codecs.ImageFiles.ImageFileBlock
      Vintasoft.Imaging.Codecs.ImageFiles.ImagePage
         Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomPage
            Vintasoft.Imaging.Codecs.ImageFiles.Dicom.DicomFrame

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