DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / PresentationStateToCurrent Method / PresentationStateToCurrent(DicomViewer,PresentationStateFeatures) Method
The viewer this image is displayed in
Controls which properties are updated from the presentation state.
Example

In This Topic
    PresentationStateToCurrent(DicomViewer,PresentationStateFeatures) Method
    In This Topic
    Modifies current display properties to match the DICOM presentation state.
    Syntax
    'Declaration
     
    
    Public Overloads Sub PresentationStateToCurrent( _
       ByVal Viewer As DicomViewer, _
       ByVal Features As PresentationStateFeatures _
    ) 
    public void PresentationStateToCurrent( 
       DicomViewer Viewer,
       PresentationStateFeatures Features
    )

    Parameters

    Viewer
    The viewer this image is displayed in
    Features
    Controls which properties are updated from the presentation state.
    Remarks

    This is essentially the reverse of CurrentToPresentationState. DicomObjects properties such as Scroll, Zoom and Labels are set to reflect as accurately as possible the data in the current PresentationState property. If private attributes have been added by CurrentToPresentationState, then they are utilized in this method.

    The viewer is used to determine the scroll values.

    Properties which are not updated from the presentation state continue to use the presentation state itself, as the PresentationStateFeaturesUsed property is updated to unset only the bits in the Features parameter

    Example
    DicomImage image = new DicomImage("your_dicom_image.dcm");
    image.PresentationState = new DicomDataSet("your_presentation_state_dataset.dcm");
    // Assumes an existing DicomViewer obj
    image.PresentationStateToCurrent(Viewer, PresentationStateFeatures.ModalityTransform); // Example 1 
    image.PresentationStateToCurrent(Viewer, PresentationStateFeatures.GraphicAnnotations); // Example 2 
    image.PresentationStateToCurrent(Viewer, PresentationStateFeatures.All); // Example 3
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also