DicomOptions Class

Summary: The API for Digital Imaging and Communications in Medicine (DICOM) raster image
format creation is a specialized tool tailored for medical device applications.
It enables the seamless generation of DICOM images, crucial for storing medical
data and containing vital identification information. With features to
and set compression, define color types, and embed XMP metadata, developers
can ensure compliance and flexibility in managing DICOM images for medical
imaging purposes.

Module: aspose.imaging.imageoptions

Full Name: aspose.imaging.imageoptions.DicomOptions

Inheritance: IHasXmpData, IHasMetadata, ImageOptionsBase

Aspose.Imaging Version: 24.7.0

Constructors

NameDescription
DicomOptions()Initializes a new instance of the DicomOptions class.

Properties

NameTypeAccessDescription
buffer_size_hintintr/wGets or sets the buffer size hint which is defined max allowed size for all internal buffers.
color_typeColorTyper/wGets or sets the type of the color.
compressionCompressionr/wGets or sets the compression.
disposedboolrGets a value indicating whether this instance is disposed.
full_frameboolr/wGets or sets a value indicating whether [full frame].
keep_metadataboolr/wGets a value whether to keep original image metadata on export.
multi_page_optionsMultiPageOptionsr/wThe multipage options
paletteIColorPaletter/wGets or sets the color palette.
resolution_settingsResolutionSettingr/wGets or sets the resolution settings.
sourceSourcer/wGets or sets the source to create image in.
vector_rasterization_optionsVectorRasterizationOptionsr/wGets or sets the vector rasterization options.
xmp_dataXmpPacketWrapperr/wGets or sets the XMP metadata container.

Methods

NameDescription
clone()Clones this instance.

Constructor: DicomOptions()

 DicomOptions() 

Initializes a new instance of the DicomOptions class.

Method: clone()

 clone() 

Clones this instance.

Returns

TypeDescription
ImageOptionsBaseReturns shallow copy of this instance

Examples

The following example shows export to DICOM file format (single and multipage).


from aspose.imaging import Image
from aspose.imaging.imageoptions import DicomOptions

fileName = "sample.jpg"
inputFileNameSingle = fileName
inputFileNameMultipage = "multipage.tif"
outputFileNameSingleDcm = "output.dcm"
outputFileNameMultipageDcm = "outputMultipage.dcm"

# The next code sample converts JPEG image to DICOM file format
with Image.load(inputFileNameSingle) as image:
	image.save(outputFileNameSingleDcm, DicomOptions())

# DICOM format supports multipage images. You can convert GIF or TIFF images to DICOM in the same way as JPEG images
with Image.load(inputFileNameMultipage) as image_multiple:
	image_multiple.save(outputFileNameMultipageDcm, DicomOptions())