DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage3D Class / TranslatePixels Method
The movement to apply, measured in output pixels
The displaysize of the whole image as currently displayed
Example

In This Topic
    TranslatePixels Method (DicomImage3D)
    In This Topic
    Move the display Offset pixels based on output size
    Syntax
    'Declaration
     
    
    Public Sub TranslatePixels( _
       ByVal Offset As System.Drawing.SizeF, _
       ByVal Size As System.Drawing.Size _
    ) 
    public void TranslatePixels( 
       System.Drawing.SizeF Offset,
       System.Drawing.Size Size
    )

    Parameters

    Offset
    The movement to apply, measured in output pixels
    Size
    The displaysize of the whole image as currently displayed
    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);
                        
    SizeF offset = new SizeF(100, 50);
    Size displaySize = new Size(image3D.Size.Width, image3D.Size.Height);
    image3D.TranslatePixels(offset, displaySize);
    Viewer.Images.Add(image3D);
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also