DicomObjects Reference
DicomObjects Reference / DicomImage Object / Blt Method
The image to copy from
The X coordinate of the left edge of the area to copy from
The Y coordinate of the top edge of the area to copy from
The X coordinate of the left edge of the area to copy into
The Y coordinate of the top edge of the area to copy into
The width of the source area to copy
The height of the source area to copy
The frame to copy from (1-based)
The frame to copy to (1-based)
The magnification factor to apply
Whether to apply standard windowing to the image data during the transfer
In This Topic
    Blt Method
    In This Topic
    Description
    Copy pixel data from one image to another
    Syntax
    Visual Basic
    Public Sub Blt( _
       ByVal Source As DicomImage, _
       ByVal SourceX As Long, _
       ByVal SourceY As Long, _
       ByVal DestinationX As Long, _
       ByVal DestinationY As Long, _
       ByVal SizeX As Long, _
       ByVal SizeY As Long, _
       ByVal SourceFrame As Long, _
       ByVal DestinationFrame As Long, _
       ByVal Zoom As Single, _
       ByVal Window As Boolean _
    ) 
    Parameters
    Source
    The image to copy from
    SourceX
    The X coordinate of the left edge of the area to copy from
    SourceY
    The Y coordinate of the top edge of the area to copy from
    DestinationX
    The X coordinate of the left edge of the area to copy into
    DestinationY
    The Y coordinate of the top edge of the area to copy into
    SizeX
    The width of the source area to copy
    SizeY
    The height of the source area to copy
    SourceFrame
    The frame to copy from (1-based)
    DestinationFrame
    The frame to copy to (1-based)
    Zoom
    The magnification factor to apply
    Window
    Whether to apply standard windowing to the image data during the transfer
    Remarks

    This method takes frame SourceFrame of Source, and magnifies by the factor Zoom.  It extracts from that a rectangle with a top left corner at Source/Y and  size SizeX/Y.   It then overwrites this onto an area of DestinationFrame of the destination image (the image on which this method is called), putting the top left corner of the rectangle at DestinationX/Y.

    If Window is true, the data is windowed before transfer, and scaled to match the full bit depth of the destination.  If window is false, then data is copied "as is", but in this case, the photometric interpretation of the two images must be the same (RGB, MONOCHROME2 etc.)  Note that Zoom is applied BEFORE selecting the rectangle.

    Because this image over-writes existing pixels, it is necessary that the destination image must have allocated and writeable pixels.  When making a montage from scratch, this is commonly done either by using AllocatePixelSpace, or when starting with an “base” image, PrinterImage is useful, as it produces images scaled to the full bit depth.  Where the destination image has been read from disk, it may be necessary to call the DecompressAll method to ensure that a writeable copy of the pixel data is made, rather than the read-only copy mapped from the disk.

    Any type of image may be used for the source, but when windowing, the destination image must have unsigned pixel values.

    See Also