public class DefaultImageDisplay extends AbstractDisplay<DataView> implements ImageDisplay
ImageDisplay
.isClosed
CONTEXT_MENU_ROOT
Constructor and Description |
---|
DefaultImageDisplay() |
Modifier and Type | Method and Description |
---|---|
double |
averageScale(int d)
Returns the average scale along the given axis, for some reasonable
interval.
|
void |
axes(CalibratedAxis[] axes)
Copies the space's axes into the given array.
|
CalibratedAxis |
axis(int d)
Gets the axis associated with the given dimension of the space.
|
void |
bck(int d) |
boolean |
canDisplay(Class<?> c) |
long |
dimension(int d) |
int |
dimensionIndex(AxisType axis)
Gets the dimensional index of the axis with the given type.
|
void |
dimensions(long[] dimensions) |
void |
display(Object o) |
void |
fwd(int d) |
AxisType |
getActiveAxis()
Gets the axis currently designated as active.
|
DataView |
getActiveView()
Gets the view currently designated as active.
|
ImageCanvas |
getCanvas() |
double |
getDoublePosition(int d) |
float |
getFloatPosition(int d) |
int |
getIntPosition(AxisType axis)
Returns the current position in a given dimension.
|
int |
getIntPosition(int d) |
long |
getLongPosition(AxisType axis)
Returns the current position in a given dimension.
|
long |
getLongPosition(int d) |
RealRect |
getPlaneExtents()
Gets a rectangle defining the extents of the image in the current X/Y
plane.
|
boolean |
isDisplaying(Object o) |
boolean |
isVisible(DataView view)
Tests whether the given view should currently be visible in this display.
|
void |
localize(double[] position) |
void |
localize(float[] position) |
void |
localize(int[] position) |
void |
localize(long[] position) |
long |
max(int d) |
void |
max(long[] max) |
void |
max(Positionable max) |
long |
min(int d) |
void |
min(long[] min) |
void |
min(Positionable min) |
void |
move(int[] distance) |
void |
move(int distance,
int d) |
void |
move(Localizable localizable) |
void |
move(long[] distance) |
void |
move(long distance,
int d) |
int |
numDimensions() |
protected void |
onEvent(DataRestructuredEvent event) |
protected void |
onEvent(DataUpdatedEvent event) |
protected void |
onEvent(DisplayDeletedEvent event) |
void |
realMax(double[] max) |
double |
realMax(int d) |
void |
realMax(RealPositionable max) |
void |
realMin(double[] min) |
double |
realMin(int d) |
void |
realMin(RealPositionable min) |
protected void |
rebuild() |
void |
setActiveAxis(AxisType axis)
Sets the axis currently designated as active.
|
void |
setAxis(CalibratedAxis axis,
int d)
Sets the dimensional axis associated with the given dimension.
|
void |
setPosition(int[] position) |
void |
setPosition(int position,
int d) |
void |
setPosition(Localizable localizable) |
void |
setPosition(long[] position) |
void |
setPosition(long position,
AxisType axis)
Sets the position of the element for one dimension.
|
void |
setPosition(long position,
int d) |
String |
toString() |
void |
update() |
add, add, addAll, addAll, checkObject, clear, close, contains, containsAll, get, getName, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, noteStructureChange, remove, remove, removeAll, retainAll, set, setName, size, subList, toArray, toArray
getInfo, getPriority, setInfo, setPriority
context, getContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canDisplay, close
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
parallelStream, removeIf, stream
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint
localize, positionAsLongArray, positionAsPoint
localize, positionAsDoubleArray, positionAsRealPoint
maxAsLongArray, maxAsPoint, minAsLongArray, minAsPoint
allPositive, allPositive, dimensions, dimensionsAsLongArray, dimensionsAsPoint, verify, verify, verifyAllPositive, verifyAllPositive
protected void rebuild()
rebuild
in class AbstractDisplay<DataView>
public DataView getActiveView()
ImageDisplay
getActiveView
in interface ImageDisplay
public AxisType getActiveAxis()
ImageDisplay
getActiveAxis
in interface ImageDisplay
public void setActiveAxis(AxisType axis)
ImageDisplay
setActiveAxis
in interface ImageDisplay
public boolean isVisible(DataView view)
ImageDisplay
isVisible
in interface ImageDisplay
public ImageCanvas getCanvas()
getCanvas
in interface ImageDisplay
public RealRect getPlaneExtents()
ImageDisplay
getPlaneExtents
in interface ImageDisplay
public boolean canDisplay(Class<?> c)
canDisplay
in interface Display<DataView>
canDisplay
in class AbstractDisplay<DataView>
public void display(Object o)
public boolean isDisplaying(Object o)
isDisplaying
in interface Display<DataView>
public void update()
public void min(Positionable min)
public void max(Positionable max)
public void dimensions(long[] dimensions)
dimensions
in interface Dimensions
public long dimension(int d)
dimension
in interface Dimensions
dimension
in interface Interval
public double realMin(int d)
realMin
in interface Interval
realMin
in interface RealInterval
public void realMin(double[] min)
realMin
in interface RealInterval
public void realMin(RealPositionable min)
realMin
in interface RealInterval
public double realMax(int d)
realMax
in interface Interval
realMax
in interface RealInterval
public void realMax(double[] max)
realMax
in interface RealInterval
public void realMax(RealPositionable max)
realMax
in interface RealInterval
public int numDimensions()
numDimensions
in interface EuclideanSpace
public double averageScale(int d)
CalibratedSpace
The exact interval used is implementation dependent, but reasonable effort
will be made to use the largest in-bounds range for the space; e.g., for
RealInterval
s, the range used is RealInterval.realMin(int)
to RealInterval.realMax(int)
. For spaces in general, the default
range is [0, 1]
.
averageScale
in interface CalibratedSpace<CalibratedAxis>
public int dimensionIndex(AxisType axis)
TypedSpace
Note that by convention, each AxisType
may only be used in a single
dimension of the space.
dimensionIndex
in interface TypedSpace<CalibratedAxis>
-1
if the specified axis type is not found.public CalibratedAxis axis(int d)
AnnotatedSpace
axis
in interface AnnotatedSpace<CalibratedAxis>
public void axes(CalibratedAxis[] axes)
AnnotatedSpace
axes
in interface AnnotatedSpace<CalibratedAxis>
public void setAxis(CalibratedAxis axis, int d)
AnnotatedSpace
setAxis
in interface AnnotatedSpace<CalibratedAxis>
public int getIntPosition(AxisType axis)
PositionableByAxis
getIntPosition
in interface PositionableByAxis
public long getLongPosition(AxisType axis)
PositionableByAxis
getLongPosition
in interface PositionableByAxis
public void setPosition(long position, AxisType axis)
PositionableByAxis
setPosition
in interface PositionableByAxis
public void localize(int[] position)
localize
in interface Localizable
public void localize(long[] position)
localize
in interface Localizable
public int getIntPosition(int d)
getIntPosition
in interface Localizable
public long getLongPosition(int d)
getLongPosition
in interface Localizable
public void localize(float[] position)
localize
in interface RealLocalizable
public void localize(double[] position)
localize
in interface RealLocalizable
public float getFloatPosition(int d)
getFloatPosition
in interface Localizable
getFloatPosition
in interface RealLocalizable
public double getDoublePosition(int d)
getDoublePosition
in interface Localizable
getDoublePosition
in interface RealLocalizable
public void fwd(int d)
fwd
in interface Positionable
public void bck(int d)
bck
in interface Positionable
public void move(int distance, int d)
move
in interface Positionable
public void move(long distance, int d)
move
in interface Positionable
public void move(Localizable localizable)
move
in interface Positionable
public void move(int[] distance)
move
in interface Positionable
public void move(long[] distance)
move
in interface Positionable
public void setPosition(Localizable localizable)
setPosition
in interface Positionable
public void setPosition(int[] position)
setPosition
in interface Positionable
public void setPosition(long[] position)
setPosition
in interface Positionable
public void setPosition(int position, int d)
setPosition
in interface Positionable
public void setPosition(long position, int d)
setPosition
in interface Positionable
protected void onEvent(DataRestructuredEvent event)
protected void onEvent(DataUpdatedEvent event)
protected void onEvent(DisplayDeletedEvent event)
public String toString()
toString
in class AbstractDisplay<DataView>
Copyright © 2014–2022 ImageJ. All rights reserved.