public final class DataUtil extends Object
Modifier and Type | Method and Description |
---|---|
static FlatField |
collapse(FieldImpl f)
Collapses a field from the form
(z -> ((x, y) -> (v1, ..., vn)))
into the form ((x, y, z) -> (v1, ..., vn)) . |
static ScalarMap[] |
getMaps(DisplayImpl display,
RealType[] types)
Gets an array of ScalarMaps from the given display, corresponding to the
specified RealTypes.
|
static RealType |
getRealType(String name)
Gets a RealType with the given name, converting invalid characters within
the name to underscores.
|
static RealType |
getRealType(String name,
Unit unit)
Gets a RealType with the given name and unit, converting invalid characters
within the name to underscores.
|
static FlatField |
makeCube(FlatField volume,
int res)
Resamples a volume of the form
((x, y, z) -> (v1, ..., vn)) to the
given resolution along each of its three spatial axes. |
static FieldImpl |
makeField(FlatField[] fields,
RealType zType)
Creates a field of the form
(z -> type) from the given list of
fields, where type is the MathType of each component field. |
static FieldImpl |
makeField(FlatField[] fields,
RealType zType,
double min,
double max)
Creates a field of the form
(z -> type) from the given list of
fields, where type is the MathType of each component field. |
static FieldImpl |
makeField(FlatField[] fields,
RealType zType,
double min,
double max,
Unit setUnit)
Creates a field of the form
(z -> type) from the given list of
fields, where type is the MathType of each component field. |
static FieldImpl |
makeField(FlatField[] fields,
RealType zType,
SampledSet fieldSet)
Creates a field of the form
(z -> type) from the given list of
fields, where type is the MathType of each component field. |
static FieldImpl |
makeField(FlatField[] fields,
RealType zType,
Unit setUnit)
Creates a field of the form
(z -> type) from the given list of
fields, where type is the MathType of each component field. |
static FlatField |
resample(FlatField f,
int[] res,
boolean[] range)
Resamples the given FlatField to the specified resolution, keeping only the
flagged range components (or null to keep them all), leaving the domain
set's low and high values untouched.
|
static FlatField |
resample(FlatField f,
int[] res,
boolean[] range,
boolean forceIntegerSet)
Resamples the given FlatField to the specified resolution, keeping only the
flagged range components (or null to keep them all), forcing the result
onto an IntegerSet of appropriate length if the relevant flag is set.
|
static FlatField |
resample(FlatField f,
int[] res,
boolean[] range,
float[] min,
float[] max)
Resamples the given FlatField to the specified resolution, keeping only the
flagged range components (or null to keep them all), and using the given
minimum and maximum domain set values.
|
static FlatField |
switchType(FlatField field,
FunctionType newType)
Converts a FlatField's MathType into the one given (if compatible).
|
static FlatField |
switchType(FlatField field,
FunctionType newType,
Unit[] units)
Converts a FlatField's MathType into the one given (if compatible), and
uses the specified domain set units.
|
public static FlatField resample(FlatField f, int[] res, boolean[] range) throws VisADException, RemoteException
VisADException
RemoteException
public static FlatField resample(FlatField f, int[] res, boolean[] range, boolean forceIntegerSet) throws VisADException, RemoteException
VisADException
RemoteException
public static FlatField resample(FlatField f, int[] res, boolean[] range, float[] min, float[] max) throws VisADException, RemoteException
VisADException
RemoteException
public static FieldImpl makeField(FlatField[] fields, RealType zType) throws VisADException, RemoteException
(z -> type)
from the given list of
fields, where type is the MathType
of each component field.VisADException
RemoteException
public static FieldImpl makeField(FlatField[] fields, RealType zType, Unit setUnit) throws VisADException, RemoteException
(z -> type)
from the given list of
fields, where type is the MathType
of each component field.VisADException
RemoteException
public static FieldImpl makeField(FlatField[] fields, RealType zType, double min, double max) throws VisADException, RemoteException
(z -> type)
from the given list of
fields, where type is the MathType
of each component field.VisADException
RemoteException
public static FieldImpl makeField(FlatField[] fields, RealType zType, double min, double max, Unit setUnit) throws VisADException, RemoteException
(z -> type)
from the given list of
fields, where type is the MathType
of each component field.VisADException
RemoteException
public static FieldImpl makeField(FlatField[] fields, RealType zType, SampledSet fieldSet) throws VisADException, RemoteException
(z -> type)
from the given list of
fields, where type is the MathType
of each component field.VisADException
RemoteException
public static FlatField collapse(FieldImpl f) throws VisADException, RemoteException
(z -> ((x, y) -> (v1, ..., vn)))
into the form ((x, y, z) -> (v1, ..., vn))
.VisADException
RemoteException
public static FlatField makeCube(FlatField volume, int res) throws VisADException, RemoteException
((x, y, z) -> (v1, ..., vn))
to the
given resolution along each of its three spatial axes.VisADException
RemoteException
public static ScalarMap[] getMaps(DisplayImpl display, RealType[] types)
public static FlatField switchType(FlatField field, FunctionType newType) throws VisADException, RemoteException
VisADException
RemoteException
public static FlatField switchType(FlatField field, FunctionType newType, Unit[] units) throws VisADException, RemoteException
VisADException
RemoteException
public static RealType getRealType(String name)
Copyright © 2015–2022 SciJava. All rights reserved.