DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage3D Class / RotateWorld Method
Angle to rotate by
Normalised axis of rotation in world orientation
Centre of rotation in world space
Example

In This Topic
    RotateWorld Method
    In This Topic
    Rotate the view by an angle around a vector in world orientation
    Syntax
    'Declaration
     
    
    Public Sub RotateWorld( _
       ByVal Angle As System.Single, _
       ByVal Axis As System.Windows.Media.Media3D.Vector3D, _
       ByVal Centre As System.Windows.Media.Media3D.Vector3D _
    ) 
    public void RotateWorld( 
       System.float Angle,
       System.Windows.Media.Media3D.Vector3D Axis,
       System.Windows.Media.Media3D.Vector3D Centre
    )

    Parameters

    Angle
    Angle to rotate by
    Axis
    Normalised axis of rotation in world orientation
    Centre
    Centre of rotation in world space
    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);
                        
    float angle = 45.0f;
    Vector3D rotationAxis = new Vector3D(0, 1, 0);
    Vector3D rotationCentre = new Vector3D(volume.Centre.X, volume.Centre.Y, volume.Centre.Z);
    image3D.RotateWorld(angle, rotationAxis, rotationCentre);
    Viewer.Images.Add(image3D);
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also