ImageGear .NET - Updated
PreparePresStateMetadata Method
Example 




ImageGear24.Formats.Dicom Assembly > ImageGear.Formats.DICOM Namespace > ImGearDICOM Class : PreparePresStateMetadata Method
Page from which presentation state settings shall be extracted.
PageDisplay from which presentation state settings shall be extracted.
User supplied metadata.
Options structure telling which settings shall be extracted to the presentation state metadata.
Prepares Presentation State metadata based on current image display settings and annotations.
Syntax
'Declaration
 
Public Shared Function PreparePresStateMetadata( _
   ByVal page As ImGearRasterPage, _
   ByVal pageDisplay As IImGearPageDisplay, _
   ByVal userMetadata As ImGearMetadataHead, _
   ByVal options As ImGearPresStateOptions _
) As ImGearMetadataHead
'Usage
 
Dim page As ImGearRasterPage
Dim pageDisplay As IImGearPageDisplay
Dim userMetadata As ImGearMetadataHead
Dim options As ImGearPresStateOptions
Dim value As ImGearMetadataHead
 
value = ImGearDICOM.PreparePresStateMetadata(page, pageDisplay, userMetadata, options)

Parameters

page
Page from which presentation state settings shall be extracted.
pageDisplay
PageDisplay from which presentation state settings shall be extracted.
userMetadata
User supplied metadata.
options
Options structure telling which settings shall be extracted to the presentation state metadata.

Return Value

New instance of ImageGear.Core.ImGearMetadataTree class object, containing presentation state metadata.
Remarks
This method prepares metadata for a presentation state object, based on page's DICOMDisplaySettings member, on pageDisplay settings, and on annotations that are attached to image, if any.

After that presentation state metadata has been prepared, application may add or edit it, and then save as presentation state object using SavePresState method.

The following features of the ImGearDICOMDisplaySettings class are saved to presentation state metadata:

The following settings of pageDisplay are saved to presentation state metadata:

The following annotations are saved to saved to presentation state metadata: Text, Callout, Polygon, Polyline, Point, Curve, Ellipse.

This method takes user metadata as a parameter. If this parameter is not null and contains a DICOM metadata tree, the method will use it as a base for building output metadata.

Example
ImGearRasterPage rasterPage = (ImGearRasterPage)igPage;
ImGearPresStateOptions opt = new ImGearPresStateOptions();
ImGearMetadataHead prepPresStateMetadata =
    ImGearDICOM.PreparePresStateMetadata(
        rasterPage, igPageView.Display, presStateOrigMetadata, opt);
Dim rasterPage As ImGearRasterPage = igPage
Dim opt As ImGearPresStateOptions = New ImGearPresStateOptions()
Dim prepPresStateMetadata As ImGearMetadataHead = ImGearDICOM.PreparePresStateMetadata(rasterPage, igPageView.Display, presStateOrigMetadata, opt)
See Also

Reference

ImGearDICOM Class
ImGearDICOM Members
ImGearRasterPage Class
ImGearMetadataHead Class
ImGearPresStateOptions Structure
ImGearPageDisplay Class
ImGearMetadataTree Class