DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / ScreenToWorld(PointF,DicomViewer) Method
The point on the output space
The Viewer being used for display
Example

In This Topic
    ScreenToWorld(PointF,DicomViewer) Method
    In This Topic
    Calculate where in real world (X,Y,Z) space, a given screen point lies
    Syntax
    'Declaration
     
    
    Public Function ScreenToWorld( _
       ByVal ScreenLocation As System.Drawing.PointF, _
       ByVal Viewer As DicomViewer _
    ) As System.Nullable(Of Point3D)
    public System.Nullable<Point3D> ScreenToWorld( 
       System.Drawing.PointF ScreenLocation,
       DicomViewer Viewer
    )

    Parameters

    ScreenLocation
    The point on the output space
    Viewer
    The Viewer being used for display

    Return Value

    Point in 3D space if appropriate, or null, if the necessary coordinate information is not available
    Example
    DicomImage image = new DicomImage("your_dicom_image.dcm");
    PointF screenPoint = new PointF(150, 200);
    Point3D? worldPoint = image.ScreenToWorld(screenPoint, Viewer); // Example Result: {-72.5000061035156,-38.3000061035156,-110}
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also