DicomObjects.NET.V8
DicomObjects Namespace / DicomImage Class / SubImage Method / SubImage(Point,Size,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




In This Topic
    SubImage(Point,Size,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 Point, _
       ByVal Size As Size, _
       ByVal Magnification As Single, _
       ByVal Frame As Integer _
    ) As DicomImage
    'Usage
     
    Dim instance As DicomImage
    Dim Offset As Point
    Dim Size As Size
    Dim Magnification As Single
    Dim Frame As Integer
    Dim value As DicomImage
     
    value = instance.SubImage(Offset, Size, Magnification, Frame)
    public DicomImage SubImage( 
       Point Offset,
       Size Size,
       float Magnification,
       int Frame
    )
    public:
    DicomImage^ SubImage( 
       Point Offset,
       Size 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

    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: .NET CLR 3.5 or higher

    See Also