public class SpectralTransform extends ImageTransform implements TransformListener
| Modifier and Type | Field and Description |
|---|---|
protected SpectralWidget |
controls
Controls for this spectral mapping.
|
protected RealType[] |
range
Output range components.
|
protected double[][] |
weights
Spectral channel weights.
|
MICRON, micronHeight, micronStep, micronWidth, xType, yType, zType| Constructor and Description |
|---|
SpectralTransform()
Creates an uninitialized spectral mapping.
|
SpectralTransform(DataTransform parent,
String name,
int numRange)
Creates a spectral mapping from the given transform.
|
| Modifier and Type | Method and Description |
|---|---|
static FlatField |
doWeightedMapping(FlatField field,
RealType[] types,
double[][] weights)
Applies a spectral mapping to the given field based on the given weights
and range types.
|
String |
getCacheId(int[] pos,
boolean global)
Gets a string id uniquely describing this data transform at the given
dimensional position, for the purposes of thumbnail caching.
|
JComponent |
getControls()
Gets associated GUI controls for this transform.
|
Data |
getData(TransformLink link,
int[] pos,
int dim,
DataCache cache)
Retrieves the data corresponding to the given dimensional position, for the
given display dimensionality.
|
int |
getImageHeight()
Gets height of each image.
|
int |
getImageWidth()
Gets width of each image.
|
int |
getRangeCount()
Gets number of range components at each pixel.
|
double[][] |
getWeights()
Gets spectral channel weights.
|
void |
initState(Dynamic dyn)
Modifies this object's state to match that of the given object.
|
boolean |
isCompatible(Dynamic dyn)
Tests whether the given dynamic object can be used as an argument to
initState, for initializing this dynamic object.
|
static boolean |
isParentRequired()
Indicates whether this transform type requires a parent transform.
|
boolean |
isValidDimension(int dim)
Gets whether this transform provides data of the given dimensionality.
|
static boolean |
isValidParent(DataTransform data)
Indicates whether this transform type would accept the given transform as
its parent transform.
|
static DataTransform |
makeTransform(DataManager dm)
Creates a new spectral mapping, with user interaction.
|
boolean |
matches(Dynamic dyn)
Tests whether two dynamic objects are equivalent.
|
void |
restoreState(Element el)
Restores the current state from the given DOM element ("SpectralMapping").
|
void |
saveState(Element el)
Writes the current state to the given DOM element ("DataTransforms").
|
void |
setParameters(double[][] weights)
Assigns the parameters for this spectral mapping.
|
void |
transformChanged(TransformEvent e)
Called when parent data transform's parameters are updated.
|
canDisplay3D, getHTMLDescription, getImage, getImageUnits, getMicronHeight, getMicronStep, getMicronStep, getMicronWidth, getRangeTypes, getSuggestedMaps, getType, getXType, getYType, getZType, getZUnit, isImmediateaddTransformListener, canDisplay2D, discard, displayChanged, getDimTypes, getFont, getLabels, getLengths, getName, getParent, getThumbHandler, getTransformId, getUnitDescription, makeLabels, notifyListeners, removeTransformListener, setFont, toStringprotected RealType[] range
protected double[][] weights
protected SpectralWidget controls
public SpectralTransform()
public SpectralTransform(DataTransform parent, String name, int numRange)
public void setParameters(double[][] weights)
public double[][] getWeights()
public int getImageWidth()
getImageWidth in class ImageTransformpublic int getImageHeight()
getImageHeight in class ImageTransformpublic int getRangeCount()
getRangeCount in class ImageTransformpublic static DataTransform makeTransform(DataManager dm)
public static boolean isValidParent(DataTransform data)
public static boolean isParentRequired()
public Data getData(TransformLink link, int[] pos, int dim, DataCache cache)
getData in class ImageTransformpublic boolean isValidDimension(int dim)
isValidDimension in class DataTransformpublic String getCacheId(int[] pos, boolean global)
getCacheId in class DataTransformpublic JComponent getControls()
getControls in class DataTransformpublic boolean matches(Dynamic dyn)
matches in interface Dynamicmatches in class DataTransformpublic boolean isCompatible(Dynamic dyn)
isCompatible in interface DynamicisCompatible in class DataTransformpublic void initState(Dynamic dyn)
initState in interface DynamicinitState in class DataTransformpublic void saveState(Element el) throws SaveException
saveState in interface SaveablesaveState in class ImageTransformSaveExceptionpublic void restoreState(Element el) throws SaveException
restoreState in interface SaveablerestoreState in class ImageTransformSaveExceptionpublic void transformChanged(TransformEvent e)
transformChanged in interface TransformListenerCopyright © 2015–2022 SciJava. All rights reserved.