VintaSoft Imaging .NET SDK 14.0: Документация для .NET разработчика
Vintasoft.Imaging.Codecs.ImageFiles.Dicom Namespace / DicomFrame Class
Члены типа Объект Синтаксис Example Иерархия Требования Смотрите также
В этом разделе
    Класс DicomFrame
    В этом разделе
    Представляет кадр DICOM.
    Объектная модель
    Resolution Palette DicomOverlayImage DicomImageVoiLookupTable DicomImageVoiLookupTable DicomImageModalityLookupTable VintasoftPoint3D VintasoftVector3D VintasoftVector3D DicomFile ImageFileSource DicomFrame
    Синтаксис
    'Declaration
    
    Public NotInheritable Class DicomFrame
       Inherits DicomPage
    
    
    public sealed class DicomFrame : DicomPage
    
    
    public __gc __sealed class DicomFrame : public DicomPage*
    
    
    public ref class DicomFrame sealed : public DicomPage^
    
    
    Пример

    Вот C#/VB.NET код, который демонстрирует, как получить изображение кадра DICOM и сохранить его в виде файла PNG.

    
    ''' <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");
            }
        }
    }
    
    

    Иерархия наследования

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

    Требования

    Целевые платформы: .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    Смотрите также