DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage3D Class / ScreenNormal Method
Example

In This Topic
    ScreenNormal Method
    In This Topic
    Screen normal in World units
    Syntax
    'Declaration
     
    
    Public Function ScreenNormal() As SharpDX.Vector3
    public SharpDX.Vector3 ScreenNormal()
    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);
                        
    var normal = image3D.ScreenNormal();
                        
    // Example: Adjust the view plane by rotating along the screen normal
    float rotationAngle = 30.0f; // Rotate 30 degrees    
    Vector3D normalVector3D = new Vector3D(normal.X, normal.Y, normal.Z); // note: normal is Vector3 (sharpDX)
    Vector3D center = new Vector3D(volume.Centre.X, volume.Centre.Y, volume.Centre.Z);
    image3D.RotateWorld(rotationAngle, normalVector3D, center);
                
    Viewer.Images.Add(image3D);
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also