DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / CurrentToPresentationState Method / CurrentToPresentationState(DicomViewer,Boolean) Method
The viewer the image is displayed in
Controls whether additional private elements are included.






In This Topic
    CurrentToPresentationState(DicomViewer,Boolean) Method
    In This Topic
    Encapsulate current display properties into a DICOM GreyScale Presentation State object
    Syntax
    'Declaration
     
    
    Public Overloads Sub CurrentToPresentationState( _
       ByVal Viewer As DicomViewer, _
       ByVal UsePrivate As System.Boolean _
    ) 
    'Usage
     
    
    Dim instance As DicomImage
    Dim Viewer As DicomViewer
    Dim UsePrivate As System.Boolean
     
    instance.CurrentToPresentationState(Viewer, UsePrivate)
    public void CurrentToPresentationState( 
       DicomViewer Viewer,
       System.bool UsePrivate
    )
    public procedure CurrentToPresentationState( 
        Viewer: DicomViewer;
        UsePrivate: System.Boolean
    ); 
    public function CurrentToPresentationState( 
       Viewer : DicomViewer,
       UsePrivate : System.boolean
    );
    public: void CurrentToPresentationState( 
       DicomViewer* Viewer,
       System.bool UsePrivate
    ) 
    public:
    void CurrentToPresentationState( 
       DicomViewer^ Viewer,
       System.bool UsePrivate
    ) 

    Parameters

    Viewer
    The viewer the image is displayed in
    UsePrivate
    Controls whether additional private elements are included.
    Remarks

    The presentation state created is immediately used as the image�s PresentationState property, so after this call, the display should not be visibly altered, though small changes may be seen due to the reduced flexibility of colours etc. in DICOM presentation states compared with DicomObjects' DicomLabel objects.

    The properties encapsulated into the presentation state include:

    There are several properties of DicomLabel objects which do not have official DICOM equivalents, such as font details,RotationMode and AutoSizeMode. If usePrivate is true, then private attribute in the range 6E15,7Axx are added to the presentation state to store them, but if usePrivate is false, then these properties must be discarded.

    This method does have some limitations, and the following objects/properties are not currently converted:

    These issues will be addressed in a future version of DicomObjects
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also