ImageGear .NET v25.2 - Updated
LoadPresState Method
Example 




ImageGear.Formats.Dicom Assembly > ImageGear.Formats.DICOM Namespace > ImGearDICOM Class : LoadPresState Method
Stream, containing presentation state object.
Page to apply Presentation State to.
PageDisplay to apply Presentation State to.
Options structure, tells which settings need to be applied.
Loads Presentation State object and applies it to an image.
Syntax
'Declaration
 
Public Shared Function LoadPresState( _
   ByVal stream As Stream, _
   ByVal page As ImGearRasterPage, _
   ByVal pageDisplay As IImGearPageDisplay, _
   ByVal options As ImGearPresStateOptions _
) As ImGearMetadataHead
'Usage
 
Dim stream As Stream
Dim page As ImGearRasterPage
Dim pageDisplay As IImGearPageDisplay
Dim options As ImGearPresStateOptions
Dim value As ImGearMetadataHead
 
value = ImGearDICOM.LoadPresState(stream, page, pageDisplay, options)

Parameters

stream
Stream, containing presentation state object.
page
Page to apply Presentation State to.
pageDisplay
PageDisplay to apply Presentation State to.
options
Options structure, tells which settings need to be applied.

Return Value

New instance of ImageGear.Core.ImGearMetadataHead class object, containing metadata loaded from the Presentation State object.
Remarks
This method loads Presentation State object from a stream and applies settings, found in this object, to the page and to the pageDisplay. Specifically:

All previous settings and annotations of the page and pageDisplay are discarded.

This method also returns all metadata found in the Presentation State object.

Example
ImGearMetadataHead presStateOrigMetadata;
using (FileStream fileContent = new FileStream(fileName, FileMode.Open))
{
    ImGearPresStateOptions opts = new ImGearPresStateOptions();
    presStateOrigMetadata =
        ImGearDICOM.LoadPresState(fileContent, (ImGearRasterPage)igPage, igPageView.Display, opts);
}
Dim presStateOrigMetadata As ImGearMetadataHead
Using fileContent = New FileStream(fileName, FileMode.Open)
    Dim opts As ImGearPresStateOptions = New ImGearPresStateOptions()
    presStateOrigMetadata = ImGearDICOM.LoadPresState(fileContent, igPage, igPageView.Display, opts)
End Using
See Also

Reference

ImGearDICOM Class
ImGearDICOM Members
ImGearRasterPage Class
ImGearPresStateOptions Structure
IImGearPageDisplay Interface

Is this page helpful?
Yes No
Thanks for your feedback.