Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | image |
outfile | in | Output image file name | |
Allowed: | String | ||
Default: | unset | ||
region | in | Region of interest | |
Allowed: | Region tool | ||
Default: | Whole image | ||
mask | in | OTF mask | |
Allowed: | Boolean LEL expression or mask region | ||
Default: | None | ||
dropdeg | in | Drop degenerate axes | |
Allowed: | T or F | ||
Default: | F | ||
overwrite | in | Overwrite (unprompted) pre-existing output file ? | |
Allowed: | T or F | ||
Default: | F | ||
list | in | List informative messages to the logger | |
Allowed: | T or F | ||
Default: | T |
This function (short-hand name subim) copies all or part of the image to another (there is also a subimage constructor).
If outfile is given, the subimage is written to the specified disk file. If outfile is unset, the Image tool actually references the input image file (i.e. that associated with the Image tool to which you are applying this function). So if you deleted the input image disk file, it would render this tool useless. When you destroy this tool (with the done function) the reference connection is broken.
Sometimes it is useful to drop axes of length one (degenerate axes). Use the dropdeg argument if you want to do this.
The output mask is the combination (logical OR) of the default input pixel mask (if any) and the OTF mask. Any other input pixel masks will not be copied. Use function maskhandler if you need to copy other masks too.
- im := image('myfile') - im2 := im.subimage() # a complete copy - r1 := drm.box([10,10],[30,40],[5,5]) # A strided pixel box region - im3 := im.subimage(outfile='/tmp/foo', region=r1) # Explicitly named subimage