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 _ ) |
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.