VintaSoft Imaging .NET SDK 12.4: 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 DicomFile VintasoftPoint3D VintasoftVector3D VintasoftVector3D ImageFileSource DicomFrame
    Syntax
    'Declaration
    
    Public NotInheritable Class DicomFrame
       Inherits Vintasoft.Imaging.Codecs.ImageFiles.ImagePage
    
    
    public sealed class DicomFrame : Vintasoft.Imaging.Codecs.ImageFiles.ImagePage
    
    
    public __gc __sealed class DicomFrame : public Vintasoft.Imaging.Codecs.ImageFiles.ImagePage*
    
    
    public ref class DicomFrame sealed : public Vintasoft.Imaging.Codecs.ImageFiles.ImagePage^
    
    
    Example

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

    
    ''' <summary>
    ''' Gets 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.DicomFrame = 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>
    /// Gets 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.DicomFrame 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.DicomFrame

    Requirements

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

    See Also