There are a number of operators which retrieve information about an image.

int ComponentType()

Returns one of the following constants available from ice.constants object:

list DataBox()

Returns a box corresponding to the read/write region of the image. This is the rectangle conventionally thought of as the "image". The format of the list returned should be: [xmin, xmax, ymin, ymax]

list RequestBox()


Returns a box corresponding to the read-only region of the image.

ice.Image GetInput(int i)


Returns the i'th input of a node in an image processing expression.

Parameters

i

Index of input desired

bool IsCard()

Returns true if an image is a card (image of constant value), false otherwise.

str Operation()

Returns the operation name of a node.

str GetChannelPacking()

Returns a string with one character for each channel, intended to represent the meaning of each channel.

The channel packing string is not used in any image processing operation: it is mostly useful when an image with non-standard channel interpretation is read from a file.

 

dict GetMetaData()

Returns the meta-data dictionary stored in the image.  Images read in from file will often contain useful information not directly related to image content. Values stored in the dictionary can be retrieved with the following script (assuming "image" is of type ice.Image):

d = image.GetMetaData()
for key in d: print "KEY: %s VALUE: %s" % (key,d[key])

Meta-data dictionaries are not transmitted through image processing nodes. If you need the information in a node, you should retrieve the dictionary and stash it away.


SetMetaDataItem(key, value)


Store the meta-data value in image's dictionary

Parameters

key

Sequence, name of item


value

thing to be stored.

GetMetaDataItem(key)


Returns the meta-data value stored in the image's dictionary or nil if the key is not found.

Parameters


key

Sequence, name of item