public class StackLink extends TransformLink
Modifier and Type | Field and Description |
---|---|
protected boolean |
axisValid
Flag indicating whether stackAxis is valid.
|
protected int |
currentSlice
Data transform's current slice.
|
protected static Data |
DUMMY
Dummy data to avoid "Data is null" message for volume reference.
|
protected int[] |
lastPos
Last known dimensional position of the link.
|
protected Vector<DataReference> |
references
Data references linking data to the display.
|
protected Vector<DataRenderer> |
renderers
Data renderers for toggling data's visibility and other parameters.
|
protected int |
stackAxis
Dimensional axis to use for image stacks.
|
protected boolean[] |
visSlices
Flags indicating visibility of each slice of the stack.
|
protected boolean |
volume
Whether volume rendering is currently enabled.
|
protected DataReferenceImpl |
volumeRef
Data reference for volume rendered cube.
|
protected int |
volumeRes
Resolution of rendered volumes.
|
alive, burnNow, burnThread, burnTime, cachedPos, clearWhenDone, colorHandler, cursor, handler, ref, rend, status, trans, visible
Constructor and Description |
---|
StackLink(StackHandler h)
Constructs an uninitialized stack link.
|
StackLink(StackHandler h,
DataTransform t)
Creates a link between the given data transform and the specified stack
handler's display.
|
Modifier and Type | Method and Description |
---|---|
protected void |
computeCursor()
Computes range values at the current cursor location.
|
protected void |
computeData(boolean thumbs)
Computes the reference data at the current position, utilizing thumbnails
as appropriate.
|
protected void |
doTransform()
Updates the currently displayed data for the given transform.
|
int |
getCurrentSlice()
Gets the current slice index, assuming the currently assigned stack axis.
|
protected Data |
getImageData(int[] pos)
Gets 2D data from the specified data transform.
|
DataReferenceImpl[] |
getReferences()
Gets references corresponding to each plane in the image stack.
|
DataRenderer[] |
getRenderers()
Gets renderers corresponding to each plane in the image stack.
|
int |
getSliceCount()
Gets the number of slices, assuming the currently assigned stack axis.
|
int |
getStackAxis()
Gets the currently assigned stack axis.
|
int |
getVolumeResolution()
Gets maximum resolution per axis of rendered volumes.
|
void |
initState(Dynamic dyn)
Modifies this object's state to match that of the given object.
|
boolean |
isBoundingBoxVisible()
Gets visibility of the given data transform's yellow bounding box.
|
boolean |
isCompatible(Dynamic dyn)
Tests whether the given dynamic object can be used as an argument to
initState, for initializing this dynamic object.
|
boolean |
isSliceVisible(int slice)
Gets visibility at the specified slice index.
|
boolean |
isVisible()
Gets visibility of the transform.
|
boolean |
isVolumeRendered()
Gets status of volume rendering.
|
void |
link()
Links this stack into the display.
|
boolean |
matches(Dynamic dyn)
Tests whether two dynamic objects are equivalent.
|
void |
restoreState(Element el)
Restores the current state from the given DOM element ("StackLink").
|
void |
saveState(Element el)
Writes the current state to the given DOM element ("LinkedData").
|
void |
setBoundingBoxVisible(boolean vis)
Enables or disables visibility of the yellow bounding box.
|
protected void |
setData(Data d,
DataReference dataRef,
DataRenderer dataRend,
boolean autoSwitch,
double zval)
Assigns the given data object to the specified data reference, switching to
the proper types if the flag is set.
|
void |
setSliceVisible(int slice,
boolean vis)
Enables or disables visibility at the specified slice index.
|
void |
setStackAxis(int axis)
Assigns the given axis as the stack axis.
|
void |
setVisible(boolean vis)
Toggles visibility of the transform.
|
void |
setVolumeRendered(boolean volume)
Enables or disables volume rendering.
|
void |
setVolumeResolution(int res)
Sets maximum resolution per axis of rendered volumes.
|
protected void |
setZLevel(DataRenderer rend,
double zval,
int len)
Assigns the given value to the specified data renderer's ConstantMap to the
Z axis.
|
void |
unlink()
Unlinks this stack from the display.
|
destroy, discard, displayChanged, doTransform, doTransform, getColorHandler, getHandler, getReference, getRenderer, getTransform, run, setData, setData, setData, setData, setMessage, transformChanged
protected static final Data DUMMY
protected Vector<DataReference> references
protected Vector<DataRenderer> renderers
protected int stackAxis
protected boolean axisValid
protected int[] lastPos
protected DataReferenceImpl volumeRef
protected boolean volume
protected int volumeRes
protected int currentSlice
protected boolean[] visSlices
public StackLink(StackHandler h)
public StackLink(StackHandler h, DataTransform t)
public DataReferenceImpl[] getReferences()
public DataRenderer[] getRenderers()
public void setStackAxis(int axis)
public int getStackAxis()
public int getSliceCount()
public int getCurrentSlice()
public void setSliceVisible(int slice, boolean vis)
public boolean isSliceVisible(int slice)
public void setBoundingBoxVisible(boolean vis)
public boolean isBoundingBoxVisible()
public void setVolumeRendered(boolean volume)
public boolean isVolumeRendered()
public void setVolumeResolution(int res)
public int getVolumeResolution()
public void link()
link
in class TransformLink
public void unlink()
unlink
in class TransformLink
public void setVisible(boolean vis)
setVisible
in class TransformLink
public boolean isVisible()
isVisible
in class TransformLink
public boolean matches(Dynamic dyn)
matches
in interface Dynamic
matches
in class TransformLink
public boolean isCompatible(Dynamic dyn)
isCompatible
in interface Dynamic
isCompatible
in class TransformLink
public void initState(Dynamic dyn)
initState
in interface Dynamic
initState
in class TransformLink
public void saveState(Element el) throws SaveException
saveState
in interface Saveable
saveState
in class TransformLink
SaveException
public void restoreState(Element el) throws SaveException
restoreState
in interface Saveable
restoreState
in class TransformLink
SaveException
protected void setData(Data d, DataReference dataRef, DataRenderer dataRend, boolean autoSwitch, double zval)
protected void setZLevel(DataRenderer rend, double zval, int len)
protected void doTransform()
doTransform
in class TransformLink
protected void computeData(boolean thumbs)
computeData
in class TransformLink
protected Data getImageData(int[] pos)
getImageData
in class TransformLink
protected void computeCursor()
computeCursor
in class TransformLink
Copyright © 2015–2022 SciJava. All rights reserved.