|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvisad.ThingImpl
visad.DataImpl
visad.FunctionImpl
visad.FieldImpl
visad.FlatField
visad.ImageFlatField
ImageFlatField is a VisAD FlatField backed by a java.awt.Image object, instead of the usual float[][] or double[][] samples array.
| Nested Class Summary |
| Nested classes inherited from class visad.DataImpl |
DataImpl.Syncher |
| Nested classes inherited from class visad.ThingImpl |
ThingImpl.RemotePair |
| Field Summary | |
protected static boolean |
DEBUG
Debugging flag. |
protected int |
height
Dimensions of the image. |
protected BufferedImage |
image
The image backing this FlatField. |
protected int |
num
Dimensions of the image. |
protected int |
width
Dimensions of the image. |
| Fields inherited from class visad.FlatField |
RangeCoordinateSystem, RangeCoordinateSystems, RangeUnits, TupleDimension |
| Fields inherited from class visad.FieldImpl |
DomainCoordinateSystem, DomainSet, DomainUnits, Length |
| Fields inherited from class visad.DataImpl |
Type |
| Fields inherited from interface visad.Data |
ABS, ACOS, ACOS_DEGREES, ADD, ASIN, ASIN_DEGREES, ATAN, ATAN_DEGREES, ATAN2, ATAN2_DEGREES, CEIL, COS, COS_DEGREES, DEGREES_TO_RADIANS, DEPENDENT, DIVIDE, EXP, FLOOR, INDEPENDENT, INV_ATAN2, INV_ATAN2_DEGREES, INV_DIVIDE, INV_POW, INV_REMAINDER, INV_SUBTRACT, LOG, MAX, MIN, MULTIPLY, NEAREST_NEIGHBOR, NEGATE, NO_ERRORS, NOP, POW, RADIANS_TO_DEGREES, REMAINDER, RINT, ROUND, SIN, SIN_DEGREES, SQRT, SUBTRACT, TAN, TAN_DEGREES, WEIGHTED_AVERAGE |
| Constructor Summary | |
ImageFlatField(BufferedImage img)
Constructs an ImageFlatField around the given BufferedImage. |
|
ImageFlatField(FunctionType type)
|
|
ImageFlatField(FunctionType type,
Set domain_set)
|
|
ImageFlatField(FunctionType type,
Set domain_set,
CoordinateSystem[] range_coord_syses,
Set[] range_sets,
Unit[] units)
|
|
ImageFlatField(FunctionType type,
Set domain_set,
CoordinateSystem range_coord_sys,
CoordinateSystem[] range_coord_syses,
Set[] range_sets,
Unit[] units)
|
|
ImageFlatField(FunctionType type,
Set domain_set,
CoordinateSystem range_coord_sys,
Set[] range_sets,
Unit[] units)
|
|
| Method Summary | |
DataShadow |
computeRanges(ShadowType type,
DataShadow shadow)
This method has been overridden to avoid a call to unpackValues or unpackFloats during range computation. |
RealType[] |
getDomainTypes()
Gets RealType for each domain component (X and Y). |
BufferedImage |
getImage()
Gets the image backing this FlatField. |
RealType[] |
getRangeTypes()
Gets RealType for each range component. |
byte[][] |
grabBytes()
|
static BufferedImage |
make3ByteRGB(BufferedImage image)
Converts the given BufferedImage to a format efficient with ImageFlatField's grabBytes method and usable with Java3D texturing by reference. |
static Set |
makeDomainSet(BufferedImage img)
Constructs a domain Set suitable for use with the given image. |
static FunctionType |
makeFunctionType(BufferedImage img)
Constructs a FunctionType suitable for use with the given image. |
protected void |
pr(String message)
|
void |
setImage(BufferedImage image)
Sets the image backing this FlatField. |
void |
setSamples(Data[] range,
boolean copy)
set the range values of the function; the order of range values must be the same as the order of domain indices in the DomainSet; copy argument included for consistency with Field, but ignored |
void |
setSamples(double[][] range,
boolean copy)
set range array as range values of this FlatField; the array is dimensioned double[number_of_range_components][number_of_range_samples]; the order of range values must be the same as the order of domain indices in the DomainSet; copy array if copy flag is true |
void |
setSamples(double[][] range,
ErrorEstimate[] errors,
boolean copy)
set the range values of the function including ErrorEstimate-s; the order of range values must be the same as the order of domain indices in the DomainSet |
void |
setSamples(float[][] range,
boolean copy)
set range array as range values of this FlatField; the array is dimensioned float[number_of_range_components][number_of_range_samples]; the order of range values must be the same as the order of domain indices in the DomainSet; copy array if copy flag is true |
void |
setSamples(float[][] range,
ErrorEstimate[] errors,
boolean copy)
set the range values of the function including ErrorEstimate-s; the order of range values must be the same as the order of domain indices in the DomainSet |
void |
setSamples(int start,
double[][] range)
update a subset of a FlatField's range samples, where start is the index of the first sample to update and range[0].length is the number of samples to update; the array is dimensioned double[number_of_range_components][number_of_range_samples] |
protected float[][] |
unpackFloats(boolean copy)
Unpacks an array of floats from field sample values. |
protected float[] |
unpackFloats(int s_index)
|
protected double[] |
unpackOneRangeComp(int comp)
|
protected double[][] |
unpackValues(boolean copy)
Unpacks an array of doubles from field sample values. |
protected double[] |
unpackValues(int s_index)
|
| Methods inherited from class visad.FieldImpl |
__getitem__, __len__, __setitem__, __setitem__, combine, combine, combine, combine, combine, domainEnumeration, domainFactor, domainFactor, domainMultiply, domainMultiply, domainMultiply, domainMultiply, extract, extract, getDomainCoordinateSystem, getDomainSet, getDomainUnits, getLength, setSample, setSample, setSample, setSamples |
| Methods inherited from class visad.FunctionImpl |
__getitem__, __getitem__, evaluate, evaluate, evaluate, evaluate, getDomainDimension, resample |
| Methods inherited from class visad.DataImpl |
__add__, __add__, __div__, __div__, __mod__, __mod__, __mul__, __mul__, __neg__, __pow__, __pow__, __radd__, __rdiv__, __rmod__, __rmul__, __rpow__, __rsub__, __sub__, __sub__, abs, abs, acos, acos, acosDegrees, acosDegrees, add, add, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, binary, ceil, ceil, changeMathType, computeRanges, computeRanges, computeReferenceRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, invertOp, local, log, log, longString, max, max, min, min, multiply, multiply, negate, negate, notifyReferences, pow, pow, remainder, remainder, rint, rint, round, round, setParent, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegrees, unary |
| Methods inherited from class visad.ThingImpl |
adaptedAddReference, adaptedRemoveReference, addReference, removeReference |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface visad.Field |
domainEnumeration, domainFactor, domainMultiply, domainMultiply, getDomainSet, getLength, setSample, setSample |
| Methods inherited from interface visad.Function |
evaluate, evaluate, evaluate, evaluate, getDomainCoordinateSystem, getDomainDimension, getDomainUnits, resample |
| Methods inherited from interface visad.Data |
abs, abs, acos, acos, acosDegrees, acosDegrees, add, add, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, binary, ceil, ceil, changeMathType, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, local, log, log, longString, max, max, min, min, multiply, multiply, negate, negate, pow, pow, remainder, remainder, rint, rint, round, round, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegrees, unary |
| Methods inherited from interface visad.Thing |
addReference, removeReference |
| Field Detail |
protected static final boolean DEBUG
protected BufferedImage image
protected int num
protected int width
protected int height
| Constructor Detail |
public ImageFlatField(BufferedImage img)
throws VisADException,
RemoteException
public ImageFlatField(FunctionType type)
throws VisADException
public ImageFlatField(FunctionType type,
Set domain_set)
throws VisADException
public ImageFlatField(FunctionType type,
Set domain_set,
CoordinateSystem range_coord_sys,
Set[] range_sets,
Unit[] units)
throws VisADException
public ImageFlatField(FunctionType type,
Set domain_set,
CoordinateSystem[] range_coord_syses,
Set[] range_sets,
Unit[] units)
throws VisADException
public ImageFlatField(FunctionType type,
Set domain_set,
CoordinateSystem range_coord_sys,
CoordinateSystem[] range_coord_syses,
Set[] range_sets,
Unit[] units)
throws VisADException
| Method Detail |
public static BufferedImage make3ByteRGB(BufferedImage image)
public static FunctionType makeFunctionType(BufferedImage img)
throws VisADException
VisADException
public static Set makeDomainSet(BufferedImage img)
throws VisADException
VisADExceptionpublic BufferedImage getImage()
public void setImage(BufferedImage image)
throws VisADException,
RemoteException
VisADException
RemoteExceptionpublic RealType[] getDomainTypes()
public RealType[] getRangeTypes()
public void setSamples(Data[] range,
boolean copy)
throws VisADException,
RemoteException
FlatField
setSamples in interface FieldsetSamples in class FlatFieldVisADException
RemoteException
public DataShadow computeRanges(ShadowType type,
DataShadow shadow)
throws VisADException
computeRanges in interface DatacomputeRanges in class FlatFieldVisADException
protected double[][] unpackValues(boolean copy)
throws VisADException
unpackValues in class FlatFieldcopy - Ignored (always returns a copy).
VisADException - if Set.indexToValue(int) on a range set
fails.
protected float[][] unpackFloats(boolean copy)
throws VisADException
unpackFloats in class FlatFieldcopy - Ignored (always returns a copy).
VisADException
protected double[] unpackValues(int s_index)
throws VisADException
unpackValues in class FlatFieldVisADException
protected float[] unpackFloats(int s_index)
throws VisADException
unpackFloats in class FlatFieldVisADException
protected double[] unpackOneRangeComp(int comp)
throws VisADException
unpackOneRangeComp in class FlatFieldVisADExceptionprotected void pr(String message)
pr in class FlatField
public void setSamples(double[][] range,
boolean copy)
throws RemoteException,
VisADException
FlatField
setSamples in interface FlatFieldIfacesetSamples in class FlatFieldRemoteException
VisADException
public void setSamples(float[][] range,
boolean copy)
throws RemoteException,
VisADException
FlatField
setSamples in interface FlatFieldIfacesetSamples in class FlatFieldRemoteException
VisADException
public void setSamples(double[][] range,
ErrorEstimate[] errors,
boolean copy)
throws RemoteException,
VisADException
FlatField
setSamples in interface FlatFieldIfacesetSamples in class FlatFieldRemoteException
VisADException
public void setSamples(int start,
double[][] range)
throws RemoteException,
VisADException
FlatField
setSamples in interface FlatFieldIfacesetSamples in class FlatFieldRemoteException
VisADException
public void setSamples(float[][] range,
ErrorEstimate[] errors,
boolean copy)
throws RemoteException,
VisADException
FlatField
setSamples in interface FlatFieldIfacesetSamples in class FlatFieldRemoteException
VisADExceptionpublic byte[][] grabBytes()
grabBytes in interface FlatFieldIfacegrabBytes in class FlatField
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||