2014-11-06 46 views

回答

1

有一些命令將此信息作爲返回值返回,還有一些查詢特定類型的信息。你會發現下面的F1幫助部分的命令:

enter image description here

下面是一些示例代碼:

number byteIN = 4 
number sx = 10, sy = 10 
image test := RealImage("Test", byteIN, sx, sy) 

// General commands 
number dataTypeEnum = test.ImageGetDataType() 
Result("Image is of data type " + dataTypeEnum + ".\n") 

number byte = test.ImageGetDataElementByteSize() 
number bits = test.ImageGetDataElementBitSize() 
Result("Image has " + byte +" bytes/pixel (=" + bits + "bits/pixel)\n") 

// Some specific commands (there are more), all return Boolean 
if (test.ImageIsDataTypeFloat()) 
    Result("Image is a real image.\n") 

if (test.ImageIsDataTypeInteger()) 
    Result("Image is an integer image.\n") 

if (test.ImageIsDataTypeBinary()) 
    Result("Image is a binary image.\n") 

if (test.ImageIsDataTypeComplex()) 
    Result("Image is a complex image.\n")