DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage3D Class / SetViewPlane Method / SetViewPlane(Point3D,Vector3D,Vector3D,Single) Method
The coordinates of the centre of the plane
A vector defining the direction of view
The direction to be "up" in the resulting view.
The zoom factor to use - see notes in remarks
Example

In This Topic
    SetViewPlane(Point3D,Vector3D,Vector3D,Single) Method
    In This Topic
    Set the view plane for the image, based on centre of the plane, the direction of view, and the "Up" direction.
    Syntax
    'Declaration
     
    
    Public Overloads Sub SetViewPlane( _
       ByVal Centre As System.Windows.Media.Media3D.Point3D, _
       ByVal Normal As System.Windows.Media.Media3D.Vector3D, _
       ByVal Up As System.Windows.Media.Media3D.Vector3D, _
       ByVal Zoom As System.Single _
    ) 
    public void SetViewPlane( 
       System.Windows.Media.Media3D.Point3D Centre,
       System.Windows.Media.Media3D.Vector3D Normal,
       System.Windows.Media.Media3D.Vector3D Up,
       System.float Zoom
    )

    Parameters

    Centre
    The coordinates of the centre of the plane
    Normal
    A vector defining the direction of view
    Up
    The direction to be "up" in the resulting view.
    Zoom
    The zoom factor to use - see notes in remarks
    Remarks

    All coordinates are in "real world" coordinates, measured in mm.

    Zoom is relative to a "standard" zoom which is internally calculated to include the whole image within the visible display area.

    Example
    DicomImage image = new DicomImage("your_3D_dicom_image.dcm");
    DicomVolume volume = new DicomVolume(image);
                        
    RenderMode3D renderMode = RenderMode3D.VR;
    DicomImage3D image3D = new DicomImage3D(volume, renderMode);
                        
    Point3D centre = new Point3D(volume.Centre.X, volume.Centre.Y, volume.Centre.Z);
    Vector3D normal = new Vector3D(0, 0, -1);
    Vector3D up = new Vector3D(0, 1, 0); 
    float zoom = 0.5f;
    image3D.SetViewPlane(centre, normal, up, zoom);
    Viewer.Images.Add(image3D);
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also