LabTalk Object Type:
The img object provides script access for processing on image window, such as zooming the window, loading an image file, etc.
This object is introduced in Origin 2021b.
Property | Access | Description |
---|---|---|
img.Current | Read/write, numeric |
Get and set the current frame in video/multi-frame stacked image |
img.ext$ | Read only, string |
Get file type (file extension). |
img.filesize | Read only, numeric |
Get file size. |
img.fps | Read only, numeric |
Return the frames per second in video or a multi-frame image. |
img.frames | Read only, numeric |
Return number of frames in video/multi-frame stacked image. |
img.GrayMax | Read/Write, numeric |
Set the maximum value of the palette applied to the gray scale image. THe value should be 0 - 255. |
img.height | Read only, numeric |
Return the image width in pixel. |
img.inc | Read only, numeric |
Get and set the frame increment when click >> or << button. Default is 1. |
img.info | Read only, numeric |
Show or Hide the Information Bar at the top of the iamge window. 1 = show, 0 = hide. |
img.link | Read only, numeric |
Return the linked image type when insert to other window.
|
img.max | Read only, numeric |
For GeoTIFF image,return the Max values of the image. |
img.mix | Read only, numeric |
For GeoTIFF image,return the Mix values of the image. |
img.media | Read/Write, numeric |
Get or set whether the media type: 1 = single-frame image; 2 = multiple-frame image; 3 = video. Note that when setting media type, you can only switch between single frame and multi-frame. |
img.nav | Read/write, numeric |
Set or get image window stack navigation mode:
|
img.nancolor | Read/Write, numeric |
Get/Set color for missing values. See Color List here. |
img.palette$ | Read/Write, string |
Set or get the color palette applied to a gray scale image. Use For example, |
img.pause | Read/write, numeric |
Pause video on click in video/multi-frame stacked image.
|
img.path$ | Read/write, string |
Get and set the path of the image source file. After setting a new path using this property, you will need to refresh the image window to see the update. |
img.pixel | Read/write, numeric |
Wether to show image as actual size.
|
img.savedata | Read/write, numeric |
Wether to save the image to the image window.
See details about "linked file" vs. "image container" here. |
img.unit$ | Read/write, string |
Get/set the unit of the GeoTIFF image. |
img.width | Read only, numeric |
Return the image width in pixel. |
img.XY$ | Read/Write, string |
Get and set the XY coordinates mapping to the image. The coordinate string should arrange in the series of XFrom XTo YFrom YTo. The default unit of the coordinates is pixel (which can be set by img.XYUnit$). |
img.XYUnit$ | Read/write, string |
Get and set the unit of actual XY scale. |
img.ZUnit$ | Read/write, string |
Get and set the unit of image frames (Z dimension) in a multi-frame image. XYZ values of a single frame are the pixel values. |
img.ZName$ | Read/write, string |
Get and set the Long Name of image frames (Z dimension) in a multi-frame image. |
Method | Description |
---|---|
img.fit(value) | Use to fit window size to image.
0 = fit window to image |
img.load(fname$) |
Import the specified image file fname$ to the image window. |
img.media(value) | Return the image type:
0 = None |
img.RevPal() | Reverse the color palette applied to a gray scale image. |
img.transfer(GraphName) | Transfer the image inserted to a Graph window to a real Image window or inverse.
Refer to "Insert an Image File" document for details. |
image.unit() | Get and set the unit of an image.
|
Example 1
//Activate Image1 window. Get XY coordinates string strxy$=img.xy$; //Activate a Graph window you want to insert the image to layer.addImg(image1, 8);