DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / SetScrollAndZoom Method
The viewer that the image is displayed in
Example

In This Topic
    SetScrollAndZoom Method
    In This Topic
    Sets the Scroll and Zoom values to values reflecting the current display
    Syntax
    'Declaration
     
    
    Public Sub SetScrollAndZoom( _
       ByVal Viewer As DicomViewer _
    ) 
    public void SetScrollAndZoom( 
       DicomViewer Viewer
    )

    Parameters

    Viewer
    The viewer that the image is displayed in
    Remarks
    The viewer used as a reference, and the current zoom and scroll values as used in that viewer are calculated. This is useful when the existing StretchMode is a dynamic mode such as DicomObjects.Enums.StretchModes.StretchCentred. After the calulations have been performed, the StretchMode is set to DicomObjects.Enums.StretchModes.NoStretch
    Example
    // Load image in Viewer and change scroll/zoom properties
    DicomImage image = Viewer.CurrentImage; 
    image.SetScrollAndZoom(Viewer);
                        
    // Updated image scroll and zoom attributes
    var scroll = image.Scroll;
    var zoom = image.Zoom;
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also