ImageGear .NET - Updated
IImGearDICOMDisplaySettings Interface
User Guide > Concepts > Upgrading from v16 or Earlier > Resolve Assembly Cross-Dependencies > IImGearDICOMDisplaySettings Interface

The DICOMDisplaySettings Property of ImGearRasterPage Class, as well as DICOMDisplaySettings Property of ImGearPageDisplay Class, use IImGearDICOMDisplaySettings Interface type. IImGearDICOMDisplaySettings Interface has a small set of public members that are used for displaying a DICOM image. If the application needs to retrieve or modify DICOM Display Settings, it shall cast IImGearDICOMDisplaySettings Interface to the actual class ImGearDICOMDisplaySettings Class, which is defined in the ImageGear24.Formats.Dicom assembly. The following two examples demonstrate this:

ImageGear v16 Example
Copy Code
ImGearRasterPage rasterPage;
// Load an image into rasterPage
// a
// If the image does not have a DICOMDisplaySettings object attached, create and add one.
if (rasterPage.DICOMDisplaySettings == null)
 rasterPage.DICOMDisplaySettings = new ImGearDICOMDisplaySettings();
ImGearDICOMDisplaySettings displaySettings = rasterPage.DICOMDisplaySettings;
// Set Display VOI Transform to automatically calculated values
if (displaySettings != null)
 displaySettings.SetAutoVOITransform(rasterPage);
ImageGear v17 Example
Copy Code
ImGearRasterPage rasterPage;
// Load an image into rasterPage
// a
// If the image does not have a DICOMDisplaySettings object attached, create and add one.
if (rasterPage.DICOMDisplaySettings == null)
 rasterPage.DICOMDisplaySettings = new ImGearDICOMDisplaySettings();
ImGearDICOMDisplaySettings displaySettings = rasterPage.DICOMDisplaySettings as ImGearDICOMDisplaySettings;
// Set Display VOI Transform to automatically calculated values
if (displaySettings != null)
 displaySettings.SetAutoVOITransform(rasterPage);