Visual Basic
C#
Managed Extensions for C++
C++/CLI
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.This method loads Presentation State object from a stream and applies settings, found in this object, to the page and to the
pageDisplay
. Specifically:
- Adjusts page's ImGearDICOMDisplaySettings class member using VOI, Modality and Presentation LUTs, found in the Presentation State DataSet.
- Sets image rectangle and orientation of the
pageDisplay
; - Adds annotation objects to the
pageDisplay
.
All previous settings and annotations of the page and pageDisplay are discarded.
This method also returns all metadata found in the Presentation State object.
C# | Copy Code |
---|---|
ImGearMetadataHead presStateOrigMetadata; using (FileStream fileContent = new FileStream(fileName, FileMode.Open)) { ImGearPresStateOptions opts = new ImGearPresStateOptions(); presStateOrigMetadata = ImGearDICOM.LoadPresState(fileContent, (ImGearRasterPage)igPage, igPageView.Display, opts); } |
Visual Basic | Copy Code |
---|---|
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 |