Bounds image pixels to be between these two values

@param img Image
@param min minimum value.
@param max maximum value.
196332
public static void boundImage( GrayS64 img , long min , long max ) {
		ImplPixelMath.boundImage(img,min,max);
	}
1130560
public void setBounds(int minOccurs, int maxOccurs) {
    if (minOccurs < 0 || maxOccurs < -1)
      throw new IllegalArgumentException("Bounds cannot be negative");
    else if (maxOccurs > 0 && minOccurs > maxOccurs)
      throw new IllegalArgumentException("Minimum bounds less than maximum bounds");
    limits = new int[] { minOccurs, maxOccurs };
  }
795007
private static int getTrimmedWidth(BufferedImage img) {
    int height = img.getHeight();
    int width = img.getWidth();
    int trimmedWidth = 0;

    for (int i = 0; i < height; i++) {
      for (int j = width - 1; j >= 0; j--) {
        if (img.getRGB(j, i) != Color.WHITE.getRGB() && j > trimmedWidth) {
          trimmedWidth = j;
          break;
        }
      }
    }

    return trimmedWidth;
  }
708237
public void setClipping(double[] min, double[] max) {
    // if only one dimension was given, expand to all dimensions.
    if(min.length == 1 && max.length == 1) {
      if(min[0] >= max[0]) {
        throw new AbortException("Clipping range empty.");
      }
      clipmin = new double[dim];
      clipmax = new double[dim];
      Arrays.fill(clipmin, min[0]);
      Arrays.fill(clipmax, max[0]);
      return;
    }
    if(dim != min.length) {
      throw new AbortException("Clipping double[] dimensionalities do not match: " + dim + " vs. " + min.length);
    }
    if(dim != max.length) {
      throw new AbortException("Clipping double[] dimensionalities do not match: " + dim + " vs. " + max.length);
    }
    for(int i = 0; i < dim; i++) {
      if(min[i] >= max[i]) {
        throw new AbortException("Clipping range empty in dimension " + (i + 1));
      }
    }
    clipmin = min;
    clipmax = max;
  }
316737
@Override
	public void set(int x, int y, int value) {
		if (!isInBounds(x, y))
			throw new ImageAccessException("Requested pixel is out of bounds: "+x+" "+y);

		data[getIndex(x, y)] = (byte) value;
	}
277621
public void setDimension(double min, double max) {
        this.minx = min;
        this.maxx = max;
        this.miny = min;
        this.maxy = max;
        this.minz = min;
        this.maxz = max;
    }
727107
public static void boundImage( GrayS16 img , int min , int max ) {
		ImplPixelMath.boundImage(img,min,max);
	}
1236903
def norm(image):
    """"""
    min_value = image.min()
    max_value = image.max()
    if min_value == max_value:
        return image - min_value
    return (image - min_value) / (max_value - min_value)
193363
public static boolean isLimited(String string, int min, int max) {
        return isNotEmpty(string) && string.length() >= min && string.length() <= max;
    }
456544
public static void boundImage( GrayS32 img , int min , int max ) {
		ImplPixelMath.boundImage(img,min,max);
	}
938380
private boolean checkMax(T image, double adj, double bestScore, int c_x, int c_y) {
		sparseLaplace.setImage(image);
		boolean isMax = true;
		beginLoop:
		for (int i = c_y - 1; i <= c_y + 1; i++) {
			for (int j = c_x - 1; j <= c_x + 1; j++) {
				double value = adj*sparseLaplace.compute(j, i);
				if (value >= bestScore) {
					isMax = false;
					break beginLoop;
				}
			}
		}
		return isMax;
	}
1035253
public static void minMax(Integer min, Integer max) {
		if(!validation) return;
		Validate.notNull(min);
		Validate.notNull(max);
		if(min > max)
			throw new ParameterException(ErrorCode.RANGEVIOLATION, "Minumum is bigger than maximum.");
	}
649590
public void setMax (float max) {
		if (min > max) throw new IllegalArgumentException("min can't be > max");

		this.max = max;

		if (current > max) {
			current = max;
			spinner.notifyValueChanged(spinner.isProgrammaticChangeEvents());
		}
	}
1141713
public final void setMaxValue(final int maxValue) {
        Condition.INSTANCE.ensureGreater(maxValue, getMinValue(),
                "The maximum value must be greater than the minimum value");
        this.maxValue = maxValue;
        setValue(Math.min(getValue(), maxValue));
    }
393070
private void initPixelsArray(BufferedImage image) {
        int width = image.getWidth();
        int height = image.getHeight();
        pixels = new int[width * height];
        image.getRGB(0, 0, width, height, pixels, 0, width);

    }
1078260
public void setMaxIn( double max ) {
    long imax = Double.doubleToRawLongBits(max);
    double old = _maxIn;
    while( max > old && !_unsafe.compareAndSwapLong(this, _max2Offset, Double.doubleToRawLongBits(old), imax ) )
      old = _maxIn;
  }
611694
public void setMaxImageWidth(String maxImageWidth) {
        try {
            if (Integer.parseInt(maxImageWidth) > 0) {
                this.maxImageWidth = maxImageWidth;
            }
        } catch (NumberFormatException ex) {
            LOGGER.info(String.format("You are trying to parse '%s' as a number for maxImageWidth.", maxImageWidth));
        }
    }