DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImageFusion 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 (DicomImageFusion)
    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
    Remarks
    For a DicomImageFusion object, this passes the transformation on to all images in the collection which support IProjection
    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);
                        
    SizeF offset = new SizeF(50, 50);
    Size displaySize = new Size(fusedImage.Size.Width, fusedImage.Size.Height);
    fusedImage.TranslatePixels(offset, displaySize);
    Viewer.Images.Add(fusedImage);
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also