Page tree


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:

  • FRACTIONAL: 8 bits per channel, 255 corresponds to 1.0.
  • FIXED_POINT: 12.4 fixed point format. Nominal range −8.0 to 7.9998. Code value 4096 corresponds to 1.0, and 0 to 0.0.
  • FLOAT: Single-precision floating point.
  • DOUBLE: Double-precision floating point.

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.



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



Sequence, name of item


thing to be stored.


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



Sequence, name of item