VintaSoft Imaging .NET SDK 15.1: Документация для .NET разработчика
Vintasoft.Imaging.Codecs.Decoders Namespace / EcgRenderingSettings Class
Члены типа Объект Синтаксис Example Иерархия Требования Смотрите также
В этом разделе
Класс EcgRenderingSettings
В этом разделе
Содержит настройки рендеринга для DICOM-страницы с электрокардиограммой.
Объектная модель
PaddingF RenderingSettings Resolution ColorBase EcgRenderingSettings
Синтаксис
'Declaration

Public Class EcgRenderingSettings
   Inherits RenderingSettings

public class EcgRenderingSettings : RenderingSettings

Пример

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


''' <summary>
''' Returns the electrocardiogram image with custom electrocardiogram settings.
''' </summary>
''' <param name="filePath">A path to a DICOM file with electrocardiogram.</param>
''' <returns>
''' The image with custom electrocardiogram settings.
''' </returns>
Friend Shared Function GetEcgImageWithCustomEcgSettings(filePath As String) As Vintasoft.Imaging.VintasoftImage
    ' create custom electrocardiogram settings
    Dim renderingSettings As New Vintasoft.Imaging.Codecs.Decoders.EcgRenderingSettings()
    renderingSettings.BackgroundColor = System.Drawing.Color.Black
    renderingSettings.MajorGridColor = System.Drawing.Color.Gray
    renderingSettings.MinorGridColor = System.Drawing.Color.FromArgb(96, 96, 96)
    renderingSettings.SignalColor = System.Drawing.Color.Lime
    renderingSettings.LegendFontColor = System.Drawing.Color.Lime

    ' open DICOM file
    Using stream As System.IO.Stream = System.IO.File.OpenRead(filePath)
        ' create decoder for DICOM image
        Using decoder As New Vintasoft.Imaging.Codecs.Decoders.DicomDecoder(stream)
            ' return image with custom electrocardiogram settings
            Return decoder.GetImage(0, renderingSettings)
        End Using
    End Using
End Function


/// <summary>
/// Returns the electrocardiogram image with custom electrocardiogram settings.
/// </summary>
/// <param name="filePath">A path to a DICOM file with electrocardiogram.</param>
/// <returns>
/// The image with custom electrocardiogram settings.
/// </returns>
internal static Vintasoft.Imaging.VintasoftImage GetEcgImageWithCustomEcgSettings(string filePath)
{
    // create custom electrocardiogram settings
    Vintasoft.Imaging.Codecs.Decoders.EcgRenderingSettings renderingSettings = new Vintasoft.Imaging.Codecs.Decoders.EcgRenderingSettings();
    renderingSettings.BackgroundColor = System.Drawing.Color.Black;
    renderingSettings.MajorGridColor = System.Drawing.Color.Gray;
    renderingSettings.MinorGridColor = System.Drawing.Color.FromArgb(96, 96, 96);
    renderingSettings.SignalColor = System.Drawing.Color.Lime;
    renderingSettings.LegendFontColor = System.Drawing.Color.Lime;

    // open DICOM file
    using (System.IO.Stream stream = System.IO.File.OpenRead(filePath))
    {
        // create decoder for DICOM image
        using (Vintasoft.Imaging.Codecs.Decoders.DicomDecoder decoder = new Vintasoft.Imaging.Codecs.Decoders.DicomDecoder(stream))
        {
            // return image with custom electrocardiogram settings
            return decoder.GetImage(0, renderingSettings);
        }
    }
}

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

System.Object
   Vintasoft.Imaging.Codecs.Decoders.RenderingSettings
      Vintasoft.Imaging.Codecs.Decoders.EcgRenderingSettings

Требования

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

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