GetStructuredDisplayImage(DicomDataSet,GetSopInstanceCallBack,DicomGetImageFlags,StructuredDisplayImageOptions) Method (original) (raw)

Syntax

Parameters

cb

A callback method takes a SOPInstanceUID as an argument, and returns a DicomDataSet that contains the SOPInstanceUID.

getImageFlags

Flags that affect how the referenced DICOM images are displayed.

options

Options that specify RasterImage resolution, and overlay options.

Return Value

A RasterImage containing an image representation of a DICOM Structured Display DicomDataSet.

Example

using Leadtools.Dicom; using Leadtools.Dicom.Common; using Leadtools.Dicom.Common.Extensions; using Leadtools; using Leadtools.Dicom.Common.Linq.BasicDirectory; using Leadtools.Dicom.Common.DataTypes; using Leadtools.Codecs; public DicomDataSet GetSopInstanceCallBack(string sopInstanceUid) { DicomDataSet dsImage = null; // Find the DicomDataSet that matches sopInstanceUid // Here we simulate this by loading an existing image dsImage = new DicomDataSet(); dsImage.Load("image2.dcm", DicomDataSetLoadFlags.None); return dsImage; } public RasterImage TestGetStructuredDisplayImage(DicomDataSet dsSD) { DicomExtensions.StructuredDisplayImageOptions options = new DicomExtensions.StructuredDisplayImageOptions { BackColor = Color.Black, EmptyCellColor = Color.Gray, ImageWidth = 800, OverlayBackgroundBrush = Brushes.Yellow, OverlayBrush = Brushes.Red, OverlayFontName = "Courier", OverlayFontSize = 12, ShowOverlay = true }; RasterImage image = dsSD.GetStructuredDisplayImage(GetSopInstanceCallBack, DicomGetImageFlags.None, options); return image; }

Leadtools.Dicom.Common Assembly