Previous topic

IPLT command line

Next topic

Applying a Fourier Transform to an image

Extracting and Pasting ImagesΒΆ

An image can be extracted and pasted into another image using the Extract() and Paste() member functions:

# import the necessary classes
from ost.img import *
from import LoadImage
# load the image
# gererate a subimage from the region going from (10,10) to (30,30)
# generate an empty image with the same size as the original image
# paste the subimage into the empty image

Note that the extent is fully honored for the paste operation, i.e. only the region where the pasted-to and the pasted-in image overlap will be affected.