Class ImageMods

java.lang.Object
  |
  +--ImageMods

public class ImageMods
extends java.lang.Object

Class containing methods to manipulate and modify TwoDArray images.

Author:
Simon Horne.

Constructor Summary
ImageMods()
          Default no-args constructor.
 
Method Summary
static double[] abs(double[] values)
          Method to convert an array of doubles to absolute values.
static double[] allPositive(double[] values)
          Method to slide and scale an array of doubles so that the minimum values is 0 (all positive).
static double[] logs(double[] values)
          A method to convert an array of doubles to an array of their log values.
static double maxValue(double[] values)
          Method to find the maximum value from an array of doubles.
static double minValue(double[] values)
          Method to find the minimum value from an array of doubles.
static int[] toPixels(double[] values)
          A method to convert an array of grey values to an array of pixel values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageMods

public ImageMods()
Default no-args constructor.
Method Detail

maxValue

public static double maxValue(double[] values)
Method to find the maximum value from an array of doubles.
Parameters:
values - an array of doubles.
Returns:
The maximum value.

minValue

public static double minValue(double[] values)
Method to find the minimum value from an array of doubles.
Parameters:
values - an array of doubles.
Returns:
The minimum value.

abs

public static double[] abs(double[] values)
Method to convert an array of doubles to absolute values.
Parameters:
values - an array of doubles.
Returns:
An array of absolute value doubles.

allPositive

public static double[] allPositive(double[] values)
Method to slide and scale an array of doubles so that the minimum values is 0 (all positive).
Parameters:
values - An array of doubles.
Returns:
An array of positive doubles.

toPixels

public static int[] toPixels(double[] values)
A method to convert an array of grey values to an array of pixel values.
Parameters:
values - An array of grey values (all positive).
Returns:
An array of pixel values.

logs

public static double[] logs(double[] values)
A method to convert an array of doubles to an array of their log values.
Parameters:
values - An array of doubles (all positive).
Returns:
An array of doubles.