public class ArbitrarySlice extends DataTransform implements TransformListener
Modifier and Type | Field and Description |
---|---|
protected int |
axis
Dimensional axis to slice through.
|
protected boolean |
compute
Flag indicating whether arbitrary slice should actually be computed.
|
protected SliceWidget |
controls
Controls for the arbitrary slice.
|
protected float |
loc
Arbitrary slice's location along slicing line.
|
protected float |
pitch
Vertical rotatational angle of slicing line.
|
protected int |
res
Resolution of arbitrary slice.
|
protected boolean |
showLine
Flag indicating whether slicing line should be shown.
|
protected float |
yaw
Horizontal rotational angle of slicing line.
|
Constructor and Description |
---|
ArbitrarySlice()
Creates an uninitialized arbitrary slice.
|
ArbitrarySlice(DataTransform parent,
String name)
Creates an overlay object for the given transform.
|
Modifier and Type | Method and Description |
---|---|
int |
getAxis()
Gets the axis through which to slice.
|
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.
|
float |
getLocation()
Gets the location for the arbitrary slice.
|
float |
getPitch()
Gets the pitch for the slicing line.
|
int |
getResolution()
Gets the resolution for the slicing line.
|
ScalarMap[] |
getSuggestedMaps()
Retrieves a set of mappings for displaying this transform effectively.
|
float |
getYaw()
Gets the yaw for the slicing line.
|
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.
|
boolean |
isImmediate()
Arbitrary slices are rendered immediately, due to frequent user
interaction.
|
boolean |
isLineVisible()
Gets whether slicing line is shown.
|
static boolean |
isParentRequired()
Indicates whether this transform type requires a parent transform.
|
boolean |
isSliceComputed()
Gets whether arbitary slice is computed.
|
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 set of overlays, 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 ("ArbitrarySlice").
|
void |
saveState(Element el)
Writes the current state to the given DOM element ("DataTransforms").
|
void |
setAxis(int axis)
Sets the axis through which to slice.
|
void |
setLineVisible(boolean showLine)
Sets whether white line is shown.
|
void |
setLocation(float loc)
Sets the location for the arbitrary slice.
|
void |
setParameters(int axis,
float yaw,
float pitch,
float loc,
int res,
boolean showLine,
boolean compute)
Sets the parameters for the arbitrary slice, recomputing the slice if the
compute flag is set.
|
void |
setPitch(float pitch)
Sets the pitch for the slicing line.
|
void |
setResolution(int res)
Sets the resolution for the slicing line.
|
void |
setSliceComputed(boolean compute)
Sets whether arbitrary slice is computed.
|
void |
setYaw(float yaw)
Sets the yaw for the slicing line.
|
void |
transformChanged(TransformEvent e)
Called when parent data transform's parameters are updated.
|
addTransformListener, canDisplay2D, canDisplay3D, discard, displayChanged, getDimTypes, getFont, getHTMLDescription, getLabels, getLengths, getName, getParent, getThumbHandler, getTransformId, getUnitDescription, makeLabels, notifyListeners, removeTransformListener, setFont, toString
protected int axis
protected float yaw
protected float pitch
protected float loc
protected int res
protected boolean showLine
protected boolean compute
protected SliceWidget controls
public ArbitrarySlice()
public ArbitrarySlice(DataTransform parent, String name)
public void setParameters(int axis, float yaw, float pitch, float loc, int res, boolean showLine, boolean compute)
public void setAxis(int axis)
public void setYaw(float yaw)
public void setPitch(float pitch)
public void setLocation(float loc)
public void setResolution(int res)
public void setLineVisible(boolean showLine)
public void setSliceComputed(boolean compute)
public int getAxis()
public float getYaw()
public float getPitch()
public float getLocation()
public int getResolution()
public boolean isLineVisible()
public boolean isSliceComputed()
public 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 DataTransform
public boolean isValidDimension(int dim)
isValidDimension
in class DataTransform
public ScalarMap[] getSuggestedMaps()
getSuggestedMaps
in class DataTransform
public String getCacheId(int[] pos, boolean global)
getCacheId
in class DataTransform
public boolean isImmediate()
isImmediate
in class DataTransform
public JComponent getControls()
getControls
in class DataTransform
public boolean matches(Dynamic dyn)
matches
in interface Dynamic
matches
in class DataTransform
public boolean isCompatible(Dynamic dyn)
isCompatible
in interface Dynamic
isCompatible
in class DataTransform
public void initState(Dynamic dyn)
initState
in interface Dynamic
initState
in class DataTransform
public void saveState(Element el) throws SaveException
saveState
in interface Saveable
saveState
in class DataTransform
SaveException
public void restoreState(Element el) throws SaveException
restoreState
in interface Saveable
restoreState
in class DataTransform
SaveException
public void transformChanged(TransformEvent e)
transformChanged
in interface TransformListener
Copyright © 2015–2022 SciJava. All rights reserved.