ImageFile.asfloat

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

Return the image converted to floating point type.

Parameters:

image (ImargeArray,ImageFile) – Image data to be worked with.

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

  • clip (bool) – Clip out of range values first.

  • clip_negative (bool) – clip negative intensity to 0

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