Creates a copy of part or all of the image with controlled size
Visual Basic |
---|
Public Function SubImage( _ ByVal XOffset As Long, _ ByVal YOffset As Long, _ ByVal XSize As Long, _ ByVal YSize As Long, _ ByVal Magnification As Single, _ ByVal Frame As Long _ ) As DicomImage |
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 DicomLabel with ScaleMode set to Image.