| [mmmaxleveltype] [Up] [mmmat2set] | Image Information and Manipulation |
Implemented in Python.
| f | Image Unsigned gray-scale (uint8 or uint16), signed (int32) or binary image.
Any image |
| type | String representation of image type: 'binary', 'uint8', 'uint16' or 'int32' |
mmdatatype returns a string that identifies the pixel datatype of the image
f.
def mmdatatype(f):
code = f.typecode()
if code == '1': type='binary'
elif code == 'b': type='uint8'
elif code == 'w': type='uint16'
elif code == 'i': type='int32'
else:
assert 0,'Does not accept this typecode:'+code
return type
| [mmmaxleveltype] [Up] [mmmat2set] | |
| Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center. |