Aspose.Medical 25.4.0

dotnet add package Aspose.Medical --version 25.4.0
                    
NuGet\Install-Package Aspose.Medical -Version 25.4.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aspose.Medical" Version="25.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aspose.Medical" Version="25.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Aspose.Medical" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aspose.Medical --version 25.4.0
                    
#r "nuget: Aspose.Medical, 25.4.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Aspose.Medical&version=25.4.0
                    
Install Aspose.Medical as a Cake Addin
#tool nuget:?package=Aspose.Medical&version=25.4.0
                    
Install Aspose.Medical as a Cake Tool

Medical Imaging Manipulation .NET API

Version 25.3 Nuget

Product Page | Docs | Demos | API Reference | Examples | Blog | Releases | Free Support | Temporary License

Aspose.Medical for .NET is a cross-platform API that helps in developing applications with the ability to create, manipulate, inspect, or convert DICOM files and other medical imaging formats without any dependency.

Without having to install specialized medical imaging software or any 3rd party component, you can use Aspose.Medical to build different types of .NET applications, e.g., Windows Forms Apps, Windows Web Apps, as well as to deploy Web Services for medical image processing and analysis.

Medical Imaging Processing Features

  • Intuitive DICOM Data Model: Aspose.Medical's object model gives complete control over DICOM elements, datasets, and pixel data. Developers can use this model to create complex medical imaging applications that can dynamically generate, load, modify, and analyze DICOM files.
  • DICOM Data Manipulation: Access, modify, add, and remove data elements from DICOM files with comprehensive support for standard DICOM tags and data types.
  • Image Rendering & Processing: Render DICOM images to standard formats, access pixel data, and work with multi-frame files.
  • Anonymization: Protect patient privacy with built-in confidentiality profiles for DICOM file anonymization in compliance with HIPAA and GDPR regulations.
  • Transcoding: Convert between different DICOM transfer syntaxes including uncompressed, JPEG, JPEG-LS, JPEG 2000, and RLE.

Read & Write Medical Files

DICOM: DCM files, DICOMDIR

Platform Independence

Aspose.Medical for .NET can be used to build any type of .NET 8.0 application including ASP.NET, WCF & WinForms. The package provides assemblies to be used with .NET 8.0 on various flavors of Windows and Linux.

Current Development Status

Aspose.Medical for .NET is actively under development with new features being added in each release. Currently, there are some limitations regarding codec support:

  • JPEG Codecs: All JPEG codecs are implemented in pure C# and are platform-independent. JPEG Lossless support is currently limited to 8-bit images only.
  • JPEG 2000: Supports 8-bit and 16-bit reading, but only 8-bit writing.
  • Unsupported Codecs: JPEG Extended (Process 2 & 4), JPEG XL, and High-Throughput JPEG 2000 (HTJ2K) are not currently supported.

We are continuously improving the library based on user feedback and industry needs. Future releases will add support for additional transfer syntaxes and enhance existing codec functionality. If you have specific requirements or encounter any issues, please share your feedback through our support forum to help us prioritize development efforts.

Get Started

Execute Install-Package Aspose.Medical from Package Manager Console in Visual Studio to fetch the NuGet package. If you already have Aspose.Medical for .NET and want to upgrade the version, please execute Update-Package Aspose.Medical to get the latest version.

Open a DICOM File with C# Code

You can execute the below code snippet to see how Aspose.Medical API performs in your environment.

// Open a DICOM file using the specified file path
string dcmFilePath = "sample.dcm";
Aspose.Medical.Dicom.DicomFile dcm = DicomFile.Open(dcmFilePath);

// Access the dataset
Aspose.Medical.Dicom.Dataset dataset = dcm.Dataset;

// Retrieve patient information
if (dataset.Contains(Tag.PatientName))
{
    string patientName = dataset.GetSingleValue<string>(Tag.PatientName);
    Console.WriteLine($"Patient Name: {patientName}");
}

Create a DICOM File from Scratch with C# Code

// Create an empty DICOM file
Aspose.Medical.Dicom.DicomFile dicomFile = new();

// Add data to the newly created DICOM file
dicomFile.Dataset.AddOrUpdate(Tag.PatientName, "John Doe");
dicomFile.Dataset.AddOrUpdate(Tag.PatientID, "12345");
dicomFile.Dataset.AddOrUpdate(Tag.PatientBirthDate, new DateOnly(1980, 1, 1));
dicomFile.Dataset.AddOrUpdate(Tag.StudyDate, new DateOnly(2025, 3, 25));
dicomFile.Dataset.AddOrUpdate(Tag.XAAcquisitionFrameRate, 17.95);

// Save the DICOM file
dicomFile.Save("output.dcm");

Render DICOM Images

// Load a DICOM file
Aspose.Medical.Dicom.DicomFile dicomFile = DicomFile.Open("input.dcm");

// Get the total number of frames
int frameCount = dicomFile.NumberOfFrames;
Console.WriteLine($"Total Frames: {frameCount}");

// Render the first frame
Aspose.Medical.Imaging.IRawImage rawImage = dicomFile.RenderImage(0);

// Display image properties
Console.WriteLine($"Image Dimensions: {rawImage.Width} x {rawImage.Height}");

// Access pixel values if needed
Aspose.Medical.Imaging.PixelFormats.Bgra32 pixelColor = rawImage[10, 10];
Console.WriteLine($"Pixel at (10,10): R={pixelColor.R}, G={pixelColor.G}, B={pixelColor.B}");

Anonymize a DICOM File

// Load a DICOM file
Aspose.Medical.Dicom.DicomFile dicomFile = DicomFile.Open("input.dcm");

// Create an anonymizer with the default profile
Aspose.Medical.Dicom.Anonymization.Anonymizer anonymizer = new();

// Anonymize the DICOM file
Aspose.Medical.Dicom.DicomFile anonymizedFile = anonymizer.Anonymize(dicomFile);

// Save the anonymized file
anonymizedFile.Save("anonymized_output.dcm");

Transcode a DICOM File to Different Transfer Syntax

// Load existing file
Aspose.Medical.Dicom.DicomFile dcm = DicomFile.Open("input.dcm");

// Transcode the loaded file to JPEG 2000 Lossless Transfer Syntax
Aspose.Medical.Dicom.DicomFile transcodedDcm = dcm.Transcode(Aspose.Medical.Dicom.TransferSyntax.Jpeg2000Lossless);

// Save the transcoded file
transcodedDcm.Save("transcoded_output.dcm");

Product Page | Docs | Demos | API Reference | Examples | Blog | Releases | Free Support | Temporary License

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
25.4.0 152 4/2/2025