Applies the transformation table to the provided input image.

@param input Input image.
@param minValue Minimum possible pixel value.
@param transform Input transformation table.
@param output Output image.
961048
public static void applyTransform(GrayS8 input , int transform[] , int minValue, GrayS8 output ) {
		output.reshape(input.width,input.height);

		if( BoofConcurrency.USE_CONCURRENT ) {
			ImplEnhanceHistogram_MT.applyTransform(input, transform, minValue, output);
		} else {
			ImplEnhanceHistogram.applyTransform(input, transform, minValue, output);
		}
	}
1235805
public void transform(Transform3D transform, Point3D pivot) {
		Point3D refPoint = (pivot == null) ? getPivot() : pivot;
		Vector3f v = new Vector3f(this.getEquationComponentA(),this.getEquationComponentB(),this.getEquationComponentC());
    	transform.transform(v);

    	// Update the plane equation according
    	// to the desired normal (computed from
    	// the identity vector and the rotations).
    	
    	// a.x + b.y + c.z + d = 0
    	// where (x,y,z) is the translation point
    	
    	
    	this.set(v.getX(),v.getY(),v.getZ(),- (this.getEquationComponentA()*(refPoint.getX()+transform.m03) +
    				this.getEquationComponentB()*(refPoint.getY()+transform.m13) +
    				this.getEquationComponentC()*(refPoint.getZ()+transform.m23)));
    	
		clearBufferedValues();
	}
514133
public void setMinScaled(double minFeature)
    {
        if(Double.isNaN(minFeature))
            throw new ArithmeticException("NaN is not a valid feature value");
        else if(minFeature < -1)
            throw new ArithmeticException("Minimum possible feature value is -1, can not use " + minFeature);
        else if(minFeature >= maxScaled)
            throw new ArithmeticException("Minimum feature value must be smaller than the maximum");
        this.minScaled = minFeature;
    }
1010278
public void transform( GrayU8 binary )
	{
		ImageMiscOps.fill(transform, 0);

		originX = binary.width/2;
		originY = binary.height/2;
		r_max = Math.sqrt(originX*originX+originY*originY);

		for( int y = 0; y < binary.height; y++ ) {
			int start = binary.startIndex + y*binary.stride;
			int stop = start + binary.width;

			for( int index = start; index < stop; index++ ) {
				if( binary.data[index] != 0 ) {
					parameterize(index-start,y);
				}
			}
		}
	}
215671
@Override
    public ImageSource apply(ImageSource input) {
        if (input.isGrayscale()) {
            return input;
        }
        if (!isAlgorithm) {
            double r, g, b, gray;

            for (int i = 0; i < EffectHelper.getSize(input); i++) {
                r = EffectHelper.getRed(i, input);
                g = EffectHelper.getGreen(i, input);
                b = EffectHelper.getBlue(i, input);
                int a = EffectHelper.getAlpha(i, input);

                gray = (r * redCoefficient + g * greenCoefficient + b * blueCoefficient);

                EffectHelper.setRGB(i, (int) gray, (int) gray, (int) gray, a, input);
            }
            return input;
        } else {
            return apply(input, grayscaleMethod);
        }
    }
491556
public static void transformSq(final GrayF32 input , final GrayF64 transformed )
	{
		int indexSrc = input.startIndex;
		int indexDst = transformed.startIndex;
		int end = indexSrc + input.width;

		double total = 0;
		for( ; indexSrc < end; indexSrc++ ) {
			float value = input.data[indexSrc];
			transformed.data[indexDst++] = total += value*value;
		}

		for( int y = 1; y < input.height; y++ ) {
			indexSrc = input.startIndex + input.stride*y;
			indexDst = transformed.startIndex + transformed.stride*y;
			int indexPrev = indexDst - transformed.stride;

			end = indexSrc + input.width;

			total = 0;
			for( ; indexSrc < end; indexSrc++ ) {
				float value = input.data[indexSrc];
				total +=  value*value;
				transformed.data[indexDst++] = transformed.data[indexPrev++] + total;
			}
		}
	}
1211734
public static <K, V1, V2> Iterable<Map.Entry<K, V2>> transformValues(
      Iterable<Map.Entry<K, V1>> input,
      final Function<? super V1, V2> valueTransformer) {
    return Iterables.transform(input, new Function<Entry<K, V1>, Entry<K, V2>>() {
      @Override
      public Entry<K, V2> apply(final Entry<K, V1> input) {
        return Maps.immutableEntry(input.getKey(), valueTransformer.apply(input.getValue()));
      }
    });
  }
291947
@Override
	public void setX(double min, double max) {
		if (min <= max) {
			this.minxProperty.set(min);
			this.maxxProperty.set(max);
		} else {
			this.minxProperty.set(max);
			this.maxxProperty.set(min);
		}
	}
200626
public static void checkImageArguments( ImageBase image , ImageInterleaved transform ) {
		InputSanityCheck.checkSameShape(image,transform);
		if( 2 != transform.getNumBands() )
			throw new IllegalArgumentException("The transform must have two bands");
	}
135021
public static void rotateImage(File input, File output, String format, int degrees) 
	  throws IOException
	  {
	   	   
		  BufferedImage inputImage = ImageIO.read(input);	   

		    Graphics2D g = (Graphics2D) inputImage.getGraphics();
		    g.drawImage(inputImage, 0, 0, null);
	
		    AffineTransform at = new AffineTransform();
	
		    // scale image
		    //at.scale(2.0, 2.0);
	
		    // rotate 45 degrees around image center
		    at.rotate(degrees * Math.PI / 180.0, inputImage.getWidth() / 2.0, inputImage.getHeight() / 2.0);
		    //at.rotate(Math.toRadians(degrees), inputImage.getWidth() / 2.0, inputImage.getHeight() / 2.0);
	
		   
		    /*
		     * translate to make sure the rotation doesn't cut off any image data
		     */
		    AffineTransform translationTransform;
		    translationTransform = findTranslation(at, inputImage);
		    at.preConcatenate(translationTransform);
		   
		    
		    // instantiate and apply transformation filter
		    BufferedImageOp bio = new AffineTransformOp(at, AffineTransformOp.TYPE_BILINEAR);
		    
		    BufferedImage destinationBI = bio.filter(inputImage, null);
	
		    ImageIO.write(destinationBI, format, output);
		    
	  }
517196
public static void grayMagnitude(GrayS32 input , int maxAbsValue , Bitmap output , byte[] storage) {
		shapeShape(input, output);

		if( storage == null )
			storage = declareStorage(output,null);

		if( maxAbsValue < 0 )
			maxAbsValue = ImageStatistics.maxAbs(input);

		int indexDst = 0;

		for( int y = 0; y < input.height; y++ ) {
			int indexSrc = input.startIndex + y*input.stride;
			for( int x = 0; x < input.width; x++ ) {
				byte gray = (byte)(255*Math.abs(input.data[ indexSrc++ ])/maxAbsValue);
				storage[indexDst++] = gray;
				storage[indexDst++] = gray;
				storage[indexDst++] = gray;
				storage[indexDst++] = (byte) 0xFF;
			}
		}

		output.copyPixelsFromBuffer(ByteBuffer.wrap(storage));
	}
704023
def _set_min_value(self, min_value):

        """"""

        # Check that the min value can be transformed if a transformation is present
        if self._transformation is not None:

            if min_value is not None:

                try:

                    _ = self._transformation.forward(min_value)

                except FloatingPointError:

                    raise ValueError("The provided minimum %s cannot be transformed with the transformation %s which "
                                     "is defined for the parameter %s" % (min_value,
                                                                          type(self._transformation),
                                                                          self.path))

        # Store the minimum as a pure float

        self._external_min_value = min_value

        # Check that the current value of the parameter is still within the boundaries. If not, issue a warning

        if self._external_min_value is not None and self.value < self._external_min_value:

            warnings.warn("The current value of the parameter %s (%s) "
                          "was below the new minimum %s." % (self.name, self.value, self._external_min_value),
                          exceptions.RuntimeWarning)

            self.value = self._external_min_value
389738
public void transform(final File inputFile, final File outputFile, final List<XMLFilter> filters) throws DITAOTException {
        if (inputFile.equals(outputFile)) {
            transform(inputFile, filters);
        } else {
            transformFile(inputFile, outputFile, filters);
        }
    }
470890
public static void format(final Source input, final Result output) {
        try {
            // Use an identity transformation to write the source to the result.
            final Transformer transformer = createTransformer(null);
            transformer.setOutputProperty(OutputKeys.INDENT, "yes");

            transformer.transform(input, output);
        } catch (final Exception ex) {
            LOGGER.error("Problem formatting DOM representation.", ex);
        }
    }
264565
@Override
    protected ImageWritable doTransform(ImageWritable image, Random random) {
        if (image == null) {
            return null;
        }
        Mat mat = converter.convert(image.getFrame());
        int top = random != null ? random.nextInt(cropTop + 1) : cropTop;
        int left = random != null ? random.nextInt(cropLeft + 1) : cropLeft;
        int bottom = random != null ? random.nextInt(cropBottom + 1) : cropBottom;
        int right = random != null ? random.nextInt(cropRight + 1) : cropRight;

        y = Math.min(top, mat.rows() - 1);
        x = Math.min(left, mat.cols() - 1);
        int h = Math.max(1, mat.rows() - bottom - y);
        int w = Math.max(1, mat.cols() - right - x);
        Mat result = mat.apply(new Rect(x, y, w, h));

        return new ImageWritable(converter.convert(result));
    }
959937
public void setImage(I image, D derivX, D derivY) {
		InputSanityCheck.checkSameShape(image, derivX, derivY);

		this.image = image;
		this.interpInput.setImage(image);

		this.derivX = derivX;
		this.derivY = derivY;
	}
403008
public void setMinMax(int min, int max)
    {
        if(min >= max)
            throw new IllegalArgumentException("The input minimum (" + min + ") must be less than the given max (" + max  + ")");
        this.min = min;
        this.max = max;
    }