DicomObjects.NET8 Documentation
DicomObjects Namespace / DicomImage Class / SubImage Method / SubImage(SKPointI,SKSizeI,Single,Int32) Method

The left top corner point of the sub Image

The total size of the original image to capture

The zooming factor which determines the output size

The frame number to use. This is 1-index, i.e. first frame is 1 not 0




In This Topic
    SubImage(SKPointI,SKSizeI,Single,Int32) Method
    In This Topic
    Creates a copy of part or all of the image with controlled size
    Syntax
    'Declaration
     
    
    Public Overloads Function SubImage( _
       ByVal Offset As SkiaSharp.SKPointI, _
       ByVal size As SkiaSharp.SKSizeI, _
       ByVal magnification As Single, _
       ByVal frame As Integer _
    ) As DicomImage
    'Usage
     
    
    Dim instance As DicomImage
    Dim Offset As SkiaSharp.SKPointI
    Dim size As SkiaSharp.SKSizeI
    Dim magnification As Single
    Dim frame As Integer
    Dim value As DicomImage
     
    value = instance.SubImage(Offset, size, magnification, frame)
    public DicomImage SubImage( 
       SkiaSharp.SKPointI Offset,
       SkiaSharp.SKSizeI size,
       float magnification,
       int frame
    )
    public:
    DicomImage^ SubImage( 
       SkiaSharp.SKPointI Offset,
       SkiaSharp.SKSizeI size,
       float magnification,
       int frame
    ) 

    Parameters

    Offset

    The left top corner point of the sub Image

    size

    The total size of the original image to capture

    magnification

    The zooming factor which determines the output size

    frame

    The frame number to use. This is 1-index, i.e. first frame is 1 not 0

    Return Value

    Remarks
    Makes a derived image (of same basic DICOM type as the original) scaled and cropped as required. Unlike PrinterImage, the pixel data is not modified or scaled, and XSize and YSize refer to the final image size, not the input (useful for making fixed size thumbnails etc.) If the original image is flipped and/or rotated, then the SubImage will be similarly modified, and the coordinates used for the offsets and sizes apply in the rotated/flipped coordinate space. This makes it simple to select sub-images using a GUI, as the coordinates used for SubImage are compatible with those used for an "ImageTied" DicomLabel.
    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