'Return the segmented image with white representing the foreground
and black the background.'

def getSegmentedImage(self, whiteFG=True):

    retVal = None
    img = self._floatToInt(self.mDiffImg)
    if whiteFG:
        retVal = img.binarize(thresh=self.mThresh)
    else:
        retVal = img.binarize(thresh=self.mThresh).invert()
    return retVal
