DicomObjects.NET10 Documentation
DicomObjects Namespace / DicomImageFusion 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 (DicomImageFusion)
    In This Topic
    Rotate view around a defined axis and based on a DicomViewer if available
    Syntax
    'Declaration
     
    
    Public Sub Rotate( _
       ByVal Angle As Single, _
       ByVal Axis As OpenTK.Mathematics.Vector3, _
       Optional ByVal Viewer As DicomViewer _
    ) 
    'Usage
     
    
    Dim instance As DicomImageFusion
    Dim Angle As Single
    Dim Axis As OpenTK.Mathematics.Vector3
    Dim Viewer As DicomViewer
     
    instance.Rotate(Angle, Axis, Viewer)
    public void Rotate( 
       float Angle,
       OpenTK.Mathematics.Vector3 Axis,
       DicomViewer Viewer
    )
    public:
    void Rotate( 
       float Angle,
       OpenTK.Mathematics.Vector3 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);
    DicomImage3D image3D = new DicomImage3D(volume, RenderMode3D.MPR);
    DicomImageCollection collection3D = new DicomImageCollection()
    {
        image3D
    }
    DicomImageFusion fusedImage = new DicomImageFusion(collection3D);
                        
    float angle = 45.0f;
    Vector3 rotationAxis = new Vector3(0, 1, 0); // Rotate around Y-axis
    fusedImage.Rotate(angle, rotationAxis);
    Viewer.Images.Add(fusedImage);
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also