ImageFile.asfloat

ImageFile.asfloat(normalise=True, clip=False, clip_negative=False)

Return the image converted to floating point type.

If currently an int type and normalise then floats will be normalised to the maximum allowed value of the int type. If currently a float type then no change occurs. If clip then clip values outside the range -1,1 If clip_negative then further clip values to range 0,1

Keyword Arguments:
  • normalise (bool) – normalise the image to the max value of current int type

  • clip_negative (bool) – clip negative intensity to 0