Leadtools.Dicom Namespace > DicomDataSet Class : GetOverlayImage Method |
public RasterImage GetOverlayImage( int index )
'Declaration Public Function GetOverlayImage( _ ByVal index As Integer _ ) As RasterImage
'Usage Dim instance As DicomDataSet Dim index As Integer Dim value As RasterImage value = instance.GetOverlayImage(index)
public RasterImage GetOverlayImage( int index )
ObjectiveC Syntax
function Leadtools.Dicom.DicomDataSet.GetOverlayImage( index )
public: RasterImage^ GetOverlayImage( int index )
If the method does not find the "Overlay Data" element inside the Data Set it will throw an DicomExceptionCode.OverlayDataMissing exception.
Before calling this method you must call GetOverlayAttributes to determine if the overlay pixel data is embedded in the "Image Pixel Data" (7FE0,0010) element or is under the "Overlay Data" (60xx,3000) element. If the overlay data is embedded in the "Image Pixel Data", Leadtools.RasterOverlayAttributes.UseBitPlane will be set to true in the attributes returned by GetOverlayAttributes.
If the overlay pixel data is embedded in the "Image Pixel Data" (7FE0, 0010), follow these steps to get the overlay data:
mainImage.Leadtools.RasterImage.UpdateOverlayAttributes(System.Int32,Leadtools.RasterOverlayAttributes,Leadtools.RasterGetSetOverlayAttributesFlags)(0, overlayAttributes, RasterGetSetOverlayAttributesFlags.Flags | RasterGetSetOverlayAttributesFlags.BitIndex | RasterGetSetOverlayAttributesFlags.Origin | RasterGetSetOverlayAttributesFlags.Dicom | RasterGetSetOverlayAttributesFlags.Color);
We are assuming that this is the first overlay in the image; this is why we are passing 0 as the overlay index.
mainImage.Leadtools.RasterImage.UpdateOverlayBits(System.Int32,Leadtools.RasterUpdateOverlayBitsFlags)(0, RasterUpdateOverlayBitsFlags.FromImage);
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2