Dieser Artikel dient als umfassender Leitfaden zur Konvertierung von DICOM-Bilder in JPG, PNG, BMP und GIF-Formate in C#** mit der kraftvollen Aspose.Imaging-Bibliothek.

DICOM to Image

Was ist DICOM?

DICOM (Digital Imaging and Communications in Medicine) is a standardized format widely used for storing and sharing medical imaging data. It includes both header and image information, typically found in scans such as ultrasounds and MRIs. These images are essential for healthcare professionals to convey critical patient information effectively.

Während es zahlreiche Offline- und Online-DICOM-Zuschauern gibt, benötigt das Einfügen von DICOM-Bilder in Präsentationen oder Webseiten oft Konvertierung zu universell akzeptierten Formaten wie JPG, GIF, PNG oder BMP. In diesem Artikel erfahren Sie, wie man Programmatisch DICOM-Bilder konvertieren mit **C:

  • JPG
  • GIF
  • PNG
  • BMP

Effiziente DICOM Conversion mit C# - kostenlos herunterladen

To efficiently convert DICOM images, we will leverage Aspose.Imaging für .NET, a user-friendly API designed for creating and manipulating various image types within .NET applications. You can find Aspose.Imaging für .NET on Neugier and download the binäre for integration.

Konvertieren DICOM in JPG in C#

Um eine DICOM-Datei in JPG in C# zu konvertieren, folgen Sie diesen Schritten:

  • Load the DICOM file into a FileStream object.
  • Create an instance of the Dicomimage class and initialize it with the FileStream object.
  • Wählen Sie die aktive Seite im DICOM-Datei für die Konvertierung in JPG aus (der standardmäßige aktive Seite wird verwendet, wenn keiner eingestellt wird).
  • Save the converted JPG image using the DicomImage.Save(String, ImageOptionsBase) method.

Hier ist ein Code-Sample, das zeigt, wie man eine DICOM-Seite in JPG in C# umwandelt#:

Einführung DICOM

DICOM to JPEG

Ausgabe: DICOM zu JPEG

Convert DICOM to JPEG C#

Konvertieren DICOM in GIF in C#

Der Prozess der Konvertierung von DICOM in GIF ist einfach. Zugriff auf die DICOM-Datei und speichern Sie es mit der Erweiterung **.gif:

Hier ist ein Code-Sample für die Konvertierung von DICOM in GIF in C#:

C# DICOM zu PNG Konvertierung

Converting DICOM to PNG follows a similar process to converting to JPEG. Access the DICOM file using the Dicomimage class and save it with the .png extension. Here’s a code sample for converting DICOM to PNG in C#:

Exportieren DICOM zu BMP in C#

To convert DICOM to BMP, follow the same steps as before to access the DICOM file using the Dicomimage class. Once accessed, use the DicomImage.Save(String, ImageBaseOptions) method to save the DICOM as BMP. Here’s a code sample for this conversion:

Schlussfolgerungen

In diesem Artikel haben Sie gelernt, wie Sie DICOM-Bilder in PNG, JPG, BMP und GIF-Formate mithilfe von C# konvertieren. Sie können die bereitgestellten Code-Vorlagen in Ihre Anwendungen für effiziente DICOM-Konvertierungen, alle durch das erschwingliche Aspose-Plugin bei nur $99.

Erfahren Sie mehr über C# DICOM zur Bildkonvertierung

Explore more about Arbeiten mit Bildern using the Aspose.Imaging for .NET API.

Zusätzliche Ressourcen

Info: You may find the Aspose Text zum GIF web app interesting.

More in this category