บทความนี้ใช้เป็นคําแนะนําที่ครอบคลุมเกี่ยวกับวิธีการแปลงภาพ DICOM ไปยังรูปแบบ JPG, PNG, BMP และ GIF ใน C#** โดยใช้ห้องสมุด Aspose.Imaging ที่มีประสิทธิภาพ

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.
ในขณะที่มีผู้ชม DICOM ออนไลน์และออนไลน์จํานวนมากการรวมภาพ DICOM ในตัวอักษรหรือหน้าเว็บมักจะจําเป็นต้องแปลงเป็นรูปแบบที่ยอมรับทั่วไปมากขึ้นเช่น JPG, GIF, PNG หรือ BMP ในบทความนี้คุณจะเรียนรู้วิธีการแปลงภาพ DICOM โดยโปรแกรมโดยใช้ C# ในตอนท้ายของคู่มือนี้คุณจะมีความสามารถในการแปลงภาพ DICOM ในรูปแบบต่อไปนี้:
- JPG
- GIF
- PNG
- BMP
การแปลง DICOM ที่มีประสิทธิภาพด้วย C# - ดาวน์โหลดฟรี
To efficiently convert DICOM images, we will leverage Aspose.Imaging สําหรับ .NET, a user-friendly API designed for creating and manipulating various image types within .NET applications. You can find Aspose.Imaging สําหรับ .NET on ปริศนา and download the บินเนียร์ for integration.
การแปลง DICOM ไปยัง JPG ใน C#
เพื่อแปลงไฟล์ DICOM ไปยัง JPG ใน C# ทําตามขั้นตอนต่อไปนี้:
- Load the DICOM file into a ฟิล์ม object.
- Create an instance of the แคสติ้ง class and initialize it with the ฟิล์ม object.
- เลือกหน้าที่ใช้งานในไฟล์ DICOM เพื่อแปลงเป็น JPG (หน้าที่ใช้งานแบบกําหนดเองจะใช้หากไม่มีการตั้งค่า)
- Save the converted JPG image using the DicomImage.Save(string, ImageOptionsBase) method.
นี่คือตัวอย่างรหัสที่แสดงให้เห็นวิธีการแปลงหน้า DICOM ไปยัง JPG ใน C#:
ตัวอย่างการเข้า DICOM

การส่งออก: DICOM ไปยัง JPEG

การแปลง DICOM ไปยัง GIF ใน C#
กระบวนการแปลง DICOM ไปยัง GIF นั้นเรียบง่าย เพียงเข้าถึงไฟล์ DICOM และบันทึกมันด้วยการขยาย .gif นี่คือวิธี:
- Access the DICOM file using the แคสติ้ง class.
- Save the converted GIF image using the DicomImage.Save(string, ImageOptionsBase) method.
นี่คือตัวอย่างรหัสสําหรับการแปลง DICOM ไปยัง GIF ใน C#:
C# DICOM ไปยัง PNG การแปลง
Converting DICOM to PNG follows a similar process to converting to JPEG. Access the DICOM file using the แคสติ้ง class and save it with the .png extension. Here’s a code sample for converting DICOM to PNG in C#:
การส่งออก DICOM ไปยัง BMP ใน C#
To convert DICOM to BMP, follow the same steps as before to access the DICOM file using the แคสติ้ง class. Once accessed, use the DicomImage.Save(String, ImageBaseOptions) method to save the DICOM as BMP. Here’s a code sample for this conversion:
ข้อสรุป
ในบทความนี้คุณได้เรียนรู้วิธีการแปลงภาพ DICOM ไปยังรูปแบบ PNG, JPG, BMP, และ GIF โดยใช้ C# คุณสามารถรวมตัวอย่างรหัสที่ได้รับในแอพลิเคชันของคุณเพื่อการแปลง DICOM ที่มีประสิทธิภาพ ทั้งหมดจะได้รับความสะดวกโดยปลั๊กอิน Aspose ที่ราคาไม่แพงเพียง $ 99
เรียนรู้เพิ่มเติมเกี่ยวกับ C# DICOM ไปยัง การแปลงภาพ
Explore more about การทํางานกับภาพ using the Aspose.Imaging for .NET API.
แหล่งข้อมูลเพิ่มเติม
Info: You may find the Aspose ข้อความ GIF web app interesting.
More in this category
- C# Animation Maker Plugin: สร้างภาพเคลื่อนไหวที่น่าตื่นเต้นด้วย Aspose.Imaging
- Aspose.Imaging Image Effect Plugin: ปรับปรุงภาพของคุณด้วยตัวกรองขั้นสูง
- รวมภาพใน C# ด้วยปลั๊กอิน $99 Aspose.Imaging Image Merger
- การประมวลผลภาพสำหรับองค์กรที่มีราคาไม่แพงด้วย Aspose.Imaging
- การหมุนภาพที่ราคาไม่แพงใน C# | Aspose.Imaging ปลั๊กอิน $99