.NET API for DICOM Medical Imaging
Read, write, anonymize, convert and transcode DICOM files in .NET C# without any external software or native dependencies.
Download Free TrialAspose.Medical for .NET is a powerful, pure .NET class library for working with DICOM (Digital Imaging and Communications in Medicine) files. It enables developers to read, write, modify, anonymize, convert, and transcode medical imaging data programmatically without requiring any external software or native dependencies.
The library is written entirely in managed C# code, ensuring true cross-platform compatibility across Windows, Linux, and macOS. With no native binaries or third-party dependencies, Aspose.Medical integrates seamlessly into any .NET application, from desktop tools to cloud-based healthcare systems.
Key Features:
- Read and write DICOM files with full support for all standard DICOM data elements and value representations.
- Anonymize DICOM files to protect patient privacy and ensure HIPAA compliance using configurable confidentiality profiles.
- Convert DICOM images to common formats: JPEG, PNG, TIFF, and back to DICOM from raster images.
- Serialize and deserialize DICOM data to JSON and XML for integration with modern web services and APIs.
- Transcode between transfer syntaxes including JPEG, JPEG 2000, HTJ2K, JPEG-LS, and RLE compression.
- Full support for multi-frame DICOM images and image overlays.
- Advanced image processing with modality and VOI lookup tables for proper windowing and leveling.
- HTJ2K (High-Throughput JPEG 2000) support for next-generation medical imaging compression.
- Coming soon: DICOM to NIfTI conversion for neuroimaging and research applications.
Aspose.Medical for .NET is a standalone, self-contained library that does not require any DICOM viewers, medical imaging software, or native codecs to be installed. It is ideal for healthcare IT systems, PACS integration, telemedicine platforms, and any application requiring reliable DICOM processing.
Advanced .NET DICOM API Features
Read and write DICOM files from files, streams, or pipes
Access and manipulate all DICOM tags and data elements
Anonymize patient data with customizable confidentiality profiles
Transcode between different transfer syntaxes
Convert DICOM images to JPEG, PNG, and TIFF formats
Serialize DICOM data to JSON and XML for web integration
Support for JPEG, JPEG 2000, HTJ2K, JPEG-LS, and RLE compression
Process multi-frame DICOM images and image sequences
Apply window/level adjustments with modality and VOI LUTs
Pure .NET Library - Zero Dependencies
Aspose.Medical for .NET is written entirely in managed C# code with no native dependencies whatsoever. Unlike other medical imaging libraries that rely on native codecs or external tools, Aspose.Medical is completely self-contained. All image compression codecs (JPEG, JPEG 2000, HTJ2K, JPEG-LS, RLE) are implemented in pure .NET, ensuring seamless deployment across Windows, Linux, and macOS without any platform-specific configuration. This makes it ideal for containerized deployments, cloud environments, and scenarios where installing native libraries is not feasible.
Anonymize DICOM Files for Privacy Compliance
Protecting patient privacy is critical in healthcare applications. Aspose.Medical for .NET provides comprehensive DICOM anonymization capabilities based on DICOM PS 3.15 confidentiality profiles. You can remove or modify patient identifying information (PII) while preserving the clinical value of the imaging data. The library supports configurable anonymization profiles, including options to retain safe private attributes, UIDs, device and institution identifiers, patient characteristics, and longitudinal temporal information.
Anonymize DICOM file - C#
// Load the DICOM file
using var dicomFile = DicomFile.Open("patient_scan.dcm");
// Create anonymizer with default profile
var profile = ConfidentialityProfile.CreateDefault();
var anonymizer = new Anonymizer(profile);
// Anonymize and save
anonymizer.Anonymize(dicomFile, "anonymized_scan.dcm");Convert DICOM to Image Formats in .NET C#
Aspose.Medical for .NET makes it easy to convert DICOM images to standard image formats for viewing, sharing, or integration with non-medical systems. The library handles all the complexity of DICOM image rendering, including proper application of modality LUTs, VOI LUTs (window/level), and photometric interpretation. Whether you need to generate thumbnails, create image exports, or build a DICOM viewer, the API provides high-quality rendering with minimal code.
Convert DICOM to PNG - C#
// Load the DICOM file
using var dicomFile = DicomFile.Open("chest_xray.dcm");
// Render to image
var renderOptions = new GrayscaleRenderOptions
{
WindowWidth = 400,
WindowCenter = 40
};
var image = dicomFile.RenderImage(renderOptions);
// Save as PNG
image.Save("chest_xray.png");Transcode Between Transfer Syntaxes
Different medical imaging systems and archives may require specific DICOM transfer syntaxes. Aspose.Medical for .NET enables transcoding between various transfer syntaxes including uncompressed formats, JPEG Baseline, JPEG Lossless, JPEG 2000, HTJ2K (High-Throughput JPEG 2000), JPEG-LS, and RLE. This is essential for PACS integration, archive optimization, and ensuring compatibility across different healthcare systems. All codecs are implemented in pure .NET, guaranteeing consistent behavior across all platforms.
Transcode DICOM to JPEG 2000 - C#
// Load existing DICOM file
using var dicomFile = DicomFile.Open("input.dcm");
// Transcode to JPEG 2000 Lossy Transfer Syntax
var transcodedFile = dicomFile.Transcode(TransferSyntax.Jpeg2000Lossy);
// Save the transcoded file
transcodedFile.Save("output.dcm");DICOM to JSON and XML Serialization
Modern healthcare systems increasingly rely on web services and APIs for data exchange. Aspose.Medical for .NET provides full support for serializing DICOM data to JSON (per the DICOM JSON Model) and XML formats. This enables seamless integration with RESTful APIs, FHIR-based systems, and web applications. The serialization is bidirectional - you can also parse JSON and XML back into DICOM datasets.
Serialize DICOM to JSON and XML - C#
// Load the DICOM file
using var dicomFile = DicomFile.Open("patient_scan.dcm");
var dataset = dicomFile.Dataset;
// Serialize DICOM dataset to JSON (DICOM JSON Model)
string json = DicomJsonSerializer.Serialize(dataset, writeIndented: true);
// Serialize DICOM dataset to XML
string xml = DicomXmlSerializer.Serialize(dataset);
// Deserialize JSON back to DICOM dataset
var restoredFromJson = DicomJsonSerializer.Deserialize(json);
// Deserialize XML back to DICOM dataset
var restoredFromXml = DicomXmlSerializer.Deserialize(xml);NIfTI Format Support for Neuroimaging (Coming Soon)
Support for conversion between DICOM and NIfTI (Neuroimaging Informatics Technology Initiative) formats is on the roadmap. NIfTI is the standard format for brain imaging research, and the upcoming ability to convert clinical DICOM data to NIfTI will open up possibilities for advanced analysis, machine learning, and research workflows.
Support and Learning Resources
- Learning Resources
- Documentation
- Source Code
- API References
- Product Support
- Free Support
- Paid Support
- Blog
- Release Notes
- Why Aspose.Medical for .NET?
- Customers List
- Success Stories