CImage:PixelTypeStr (replaces DatatypeStr)
The PixelTypeStr method returns the name of the image pixel type as a string. The pixel type refers to the value representation stored in the pixel (integer, real, etc.).
sType = CImage:PixelTypeStr() |
wheresType is a string giving the name of the Mira pixel type (see Remarks).
The value sType returned by this method is defined in the Mira Pixel Types table. You can also use the PixelType method to retrieve the pixel type as a numeric code.
Suppose the file sPath contains an image with pixel type 4, or "long" (32 bit integer) pixels. The following script prints the pixel type of the image:
|
-- Create a CImage |
|
-- Open the image from file path sPath. |
|
-- retrieve the pixel type name string |
|
-- result: Pixel Type = long |
|
-- delete the CImage from memory |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.