DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage3D Class / Rotate Method
The angle to rotate, measured clockwise in degrees
The axis around which to rotate the view
Display parameters of this viewer instance to use for applying rotation
Example

In This Topic
    Rotate Method (DicomImage3D)
    In This Topic
    Rotate view around a defined axis and based on a DicomViewer if available
    Syntax
    'Declaration
     
    
    Public Sub Rotate( _
       ByVal Angle As System.Single, _
       ByVal Axis As System.Windows.Media.Media3D.Vector3D, _
       Optional ByVal Viewer As DicomViewer _
    ) 
    public void Rotate( 
       System.float Angle,
       System.Windows.Media.Media3D.Vector3D Axis,
       DicomViewer Viewer
    )

    Parameters

    Angle
    The angle to rotate, measured clockwise in degrees
    Axis
    The axis around which to rotate the view
    Viewer
    Display parameters of this viewer instance to use for applying rotation
    Remarks
    Viewer instance is used mainly for ImageFusion with 2D images, never used in 3D.
    Example
    DicomImage image = new DicomImage("your_3D_dicom_image.dcm");
    DicomVolume volume = new DicomVolume(image);
                        
    RenderMode3D renderMode = RenderMode3D.MPR;
    DicomImage3D image3D = new DicomImage3D(volume, renderMode);
                        
    float rotationAngle = 45.0f; 
    Vector3D rotationAxis = new Vector3D(0, 1, 0);
    image3D.Rotate(rotationAngle, rotationAxis);
    Viewer.Images.Add(image3D);
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also