DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / WorldToScreen(Point3D,DicomViewer) Method
The point on the output space
The Viewer being used to display the image
Example

In This Topic
    WorldToScreen(Point3D,DicomViewer) Method
    In This Topic
    Calculate where in real world (X,Y,Z) space, a given screen point lies
    Syntax
    'Declaration
     
    
    Public Function WorldToScreen( _
       ByVal WorldLocation As System.Windows.Media.Media3D.Point3D, _
       ByVal Viewer As DicomViewer _
    ) As System.Drawing.PointF
    public System.Drawing.PointF WorldToScreen( 
       System.Windows.Media.Media3D.Point3D WorldLocation,
       DicomViewer Viewer
    )

    Parameters

    WorldLocation
    The point on the output space
    Viewer
    The Viewer being used to display the image

    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");
    Point3D realWorldPoint = new Point3D(50.2, 30.5, -10.8);
    // Assumes you have an existing DicomViewer object
    PointF? screenPoint = image.WorldToScreen(realWorldPoint, Viewer); // Example Result: {X = 329.386 Y = 300.5848}
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also