DicomObjects.NET10 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 SkiaSharp.SKSize, _
       ByVal Size As SkiaSharp.SKSizeI _
    ) 
    'Usage
     
    
    Dim instance As DicomImageFusion
    Dim Offset As SkiaSharp.SKSize
    Dim Size As SkiaSharp.SKSizeI
     
    instance.TranslatePixels(Offset, Size)
    public void TranslatePixels( 
       SkiaSharp.SKSize Offset,
       SkiaSharp.SKSizeI Size
    )
    public:
    void TranslatePixels( 
       SkiaSharp.SKSize Offset,
       SkiaSharp.SKSizeI 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);
                        
    SKSize offset = new SKSize(50, 50);
    SKSizeI displaySize = new SKSizeI(fusedImage.RenderedSize.Width, fusedImage.RenderedSize.Height);
    fusedImage.TranslatePixels(offset, displaySize);
    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