def splitAlphaMask(image):
    """
	Splits the last channel of an image from the rest of the channels.
	Useful for splitting away the alpha channel of an image and treating
	it as the image mask.
	
	The input image should be a NumPy array of shape [h,w,c].
	
	The return value is a tuple of the image channels and the mask.
	"""
    channels = image[:, :, 0:image.shape[2] - 1]
    mask = image[:, :, (image.shape[2] - 1)]
    return channels, mask
