code: public ColorImg scaleChannelToUnitRange(int channel) {
  		double min=getMinValue(channel), max=getMaxValue(channel);
  		double range = max-min;
  		if(range != 0){
  			double[] channelData = getData()[channel];
  			for(int i=0; i<channelData.length; i++){
  				channelData[i] = (channelData[i]-min)/range;
  			}
  		} else {
  			fill(channel, 0);
  		}
  		return this;
  	}
docs: Scales all values of the specified channel to unit range [0,1].
  This means that the values are shifted and scaled (proportionally) to fit in unit range.
  It is a 1-dimensional affine transform from the current value range [min,max] to [0,1].
  If all values are the same (min=max), the channel is set to 0.
  @param channel one of {@link #channel_r},{@link #channel_g},{@link #channel_b},{@link #channel_a} (0,1,2,3)
  @return this for chaining
  @throws ArrayIndexOutOfBoundsException if the specified channel is not in [0,3]
  or is 3 but the image has no alpha (check using {@link #hasAlpha()}).
  
  @see #scaleRGBToUnitRange()
  @see #clampChannelToUnitRange(int)