public class JDFTransferFunction extends JDFNumList
JDFNumList.NormComparator, JDFNumList.VolumeComparatorJDFBaseDataTypes.EnumFitsValue| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
UNIT |
EPSILON, MAX_CMYK_COLOR, MAX_LAB_COLOR, MAX_MATRIX_DIMENSION, MAX_RECTANGLE_DIMENSION, MAX_RGB_COLOR, MAX_SHAPE_DIMENSION, MAX_XY_DIMENSION| Constructor and Description |
|---|
JDFTransferFunction()
constructs a xy pair with all values set to 0.0 Double
|
JDFTransferFunction(JDFNumList nl)
constructs a number list with the given number list
|
JDFTransferFunction(JDFTransferFunction tf)
copy constructor
constructs a number list with the given transfer function |
JDFTransferFunction(java.lang.String s)
constructs a number list with the given string the number of tokens must be even
|
JDFTransferFunction(java.util.Vector v)
Deprecated.
use typesafe constructors
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(double x,
double y)
add - adds a x and a y coordinate to the vector
|
void |
add(java.lang.Double x,
java.lang.Double y)
add - adds a x and a y coordinate to the vector
|
void |
add(JDFTransferFunction tf)
add - adds a complete transfer function to the vector
|
void |
add(JDFXYPair xy)
add - adds a xy coordinate to the vector
|
boolean |
add(java.lang.Object e) |
void |
add(java.lang.String s)
add - adds a x and a y coordinate to the vector
|
boolean |
addAll(java.util.Collection<? extends java.lang.Object> c) |
void |
clear() |
static JDFTransferFunction |
createTransferFunction(java.lang.String s)
factory for JDFTransferFunction that silently returns null in case of illegal strings
|
double |
getFastValue(double x)
get the Y value at x-value x - we interpolate linearly from a cache
|
static JDFTransferFunction |
getUnit() |
double |
getValue(double x)
get the Y value at x-value x - we interpolate linearly
|
double |
getX(int index)
get the x value at index note that each index consumes 2 elements (the x and y value)
|
JDFXYPair |
getXRange()
get the min and max value of X
|
double |
getY(int index)
get the Y value at index i
|
boolean |
isUnit()
isUnit - true if we are 0 0 1 1
|
boolean |
isValid()
isValid - true if the size of the vector is even and all instances are Double types
|
void |
multiply(JDFTransferFunction tf)
multiplies a complete transfer function to the vector only useful for 0-1 ranged transfer functions
|
static JDFTransferFunction |
multiply(JDFTransferFunction tf1,
JDFTransferFunction tf2)
returns the multiplied tf - in case one of thr arguments is null or unit, the other argument is returned unmodified
|
int |
numPoints() |
void |
resetCache() |
void |
set(double x0,
double dx,
java.util.Vector<java.lang.Double> v)
sets a vector of y coordinates with a common distance between points
|
abs, clone, contains, containsAll, copyNumList, doubleAt, elementAt, equals, getDouble, getDoubleList, getDoubleVector, getIntArray, getString, getString, hashCode, intAt, isValidString, matches, max, min, norm, removeElementAt, replaceElementAt, scale, scale, scaleFromCM, scaleFromCM, scaleFromMM, scaleFromMM, scaleToCM, scaleToCM, scaleToMM, scaleToMM, set, setString, setX, shift, sort, subtract, toString, unify, volumeadd, addAll, addElement, capacity, contains, containsAll, copyInto, elements, ensureCapacity, firstElement, forEach, get, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, trimToSizepublic static final java.lang.String UNIT
public JDFTransferFunction()
public JDFTransferFunction(java.lang.String s)
throws java.util.zip.DataFormatException
s - the given String in number list formatjava.util.zip.DataFormatException - - if the String has not a valid format@Deprecated
public JDFTransferFunction(java.util.Vector v)
throws java.util.zip.DataFormatException
v - the number list as a vectorjava.util.zip.DataFormatException - - if the Vector has not a valid formatpublic JDFTransferFunction(JDFNumList nl) throws java.util.zip.DataFormatException
nl - the given number listjava.util.zip.DataFormatException - - if the String has not a valid formatpublic JDFTransferFunction(JDFTransferFunction tf)
tf - the given number listjava.util.zip.DataFormatException - - if the String has not a valid formatpublic static JDFTransferFunction getUnit()
public static JDFTransferFunction createTransferFunction(java.lang.String s)
s - the string to parsepublic boolean isValid()
throws java.util.zip.DataFormatException
isValid in class JDFNumListjava.util.zip.DataFormatException - - if the Vector has not a valid formatpublic boolean isUnit()
public void add(JDFXYPair xy)
xy - the xy coordinate to addpublic void add(java.lang.Double x,
java.lang.Double y)
x - the x coordinate to addy - the y coordinate to addpublic void add(double x,
double y)
x - the x coordinate to addy - the y coordinate to addpublic void set(double x0,
double dx,
java.util.Vector<java.lang.Double> v)
x0 - dx - v - public double getX(int index)
index - public JDFXYPair getXRange()
index - public double getY(int index)
index - public double getFastValue(double x)
index - public double getValue(double x)
index - public int numPoints()
public void add(java.lang.String s)
throws java.util.zip.DataFormatException
s - a string with the x and y coordinate to addjava.util.zip.DataFormatException - - if the String has not a valid formatpublic void add(JDFTransferFunction tf)
tf - the given transfer function to addpublic boolean add(java.lang.Object e)
add in interface java.util.Collection<java.lang.Object>add in interface java.util.List<java.lang.Object>add in class java.util.Vector<java.lang.Object>Vector.add(java.lang.Object)public boolean addAll(java.util.Collection<? extends java.lang.Object> c)
addAll in interface java.util.Collection<java.lang.Object>addAll in interface java.util.List<java.lang.Object>addAll in class java.util.Vector<java.lang.Object>Vector.addAll(java.util.Collection)public void clear()
clear in interface java.util.Collection<java.lang.Object>clear in interface java.util.List<java.lang.Object>clear in class java.util.Vector<java.lang.Object>Vector.clear()public void resetCache()
public static JDFTransferFunction multiply(JDFTransferFunction tf1, JDFTransferFunction tf2)
tf1 - tf2 - public void multiply(JDFTransferFunction tf)
tf - the given transfer function to add