public class DefaultDatasetView extends AbstractDataView implements DatasetView
Dataset
, for use with a ImageDisplay
.Constructor and Description |
---|
DefaultDatasetView() |
Modifier and Type | Method and Description |
---|---|
void |
autoscale(int c)
Autoscales the display range to match the data range, for
the given channel.
|
int |
getChannelCount()
Gets the number of channels in the displayed data.
|
double |
getChannelMax(int c)
Gets the maximum value in the display range, for the given
channel.
|
double |
getChannelMin(int c)
Gets the minimum value in the display range, for the given
channel.
|
ColorRGB |
getColor(ChannelCollection channels)
Reason from a channel collection and internal state what the closest color
is.
|
ColorMode |
getColorMode() |
List<ColorTable> |
getColorTables() |
int |
getCompositeDimIndex() |
Dataset |
getData()
Gets the
Data represented by this view. |
long |
getLongPosition(AxisType axis)
Returns the current position in a given dimension.
|
int |
getPreferredHeight()
Gets the view's natural height in pixels.
|
int |
getPreferredWidth()
Gets the view's natural width in pixels.
|
CompositeXYProjector<? extends RealType<?>> |
getProjector() |
ARGBScreenImage |
getScreenImage() |
boolean |
isCompatible(Data data)
Gets whether this view is compatible with the given
Data . |
protected void |
onEvent(DatasetRGBChangedEvent event) |
protected void |
onEvent(DatasetTypeChangedEvent event) |
protected void |
onEvent(DatasetUpdatedEvent event) |
void |
rebuild()
Recreates the view.
|
void |
resetColorTables(boolean grayscale) |
void |
setChannelRange(int c,
double min,
double max)
Sets the minimum and maximum values of the display range, for the
given channel.
|
void |
setChannelRanges(double min,
double max)
Sets the minimum and maximum values of the display range, globally
for all channels.
|
void |
setColorMode(ColorMode colorMode) |
void |
setColorTable(ColorTable colorTable,
int channel) |
void |
setComposite(boolean composite) |
void |
setPosition(long position,
AxisType axis)
Sets the position of the element for one dimension.
|
void |
update()
Updates and redraws the view onscreen.
|
RandomAccessibleInterval<? extends RealType<?>> |
xyPlane() |
RandomAccessibleInterval<? extends RealType<?>> |
xyPlane(RandomAccessibleInterval<? extends RealType<?>> inputInterval) |
bck, dispose, fwd, getDoublePosition, getFloatPosition, getIntPosition, getIntPosition, getLongPosition, getPlanePosition, initialize, isSelected, localize, localize, localize, localize, move, move, move, move, move, numDimensions, publish, setPosition, setPosition, setPosition, setPosition, setPosition, setSelected
context, getContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose, getPlanePosition, initialize, isSelected, setSelected
getIntPosition
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, positionAsLongArray, positionAsPoint
localize, localize, localize, positionAsDoubleArray, positionAsRealPoint
numDimensions
bck, fwd, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
context, getContext, setContext
public int getChannelCount()
DatasetView
getChannelCount
in interface DatasetView
public ARGBScreenImage getScreenImage()
getScreenImage
in interface DatasetView
public int getCompositeDimIndex()
getCompositeDimIndex
in interface DatasetView
public CompositeXYProjector<? extends RealType<?>> getProjector()
getProjector
in interface DatasetView
public double getChannelMin(int c)
DatasetView
NB: This is a different value than that given by
ImageMetadata.getChannelMinimum(int)
; the latter is the minimum
data value for that channel, independent of any visualization.
getChannelMin
in interface DatasetView
public double getChannelMax(int c)
DatasetView
NB: This is a different value than that given by
ImageMetadata.getChannelMaximum(int)
; the latter is the maximum
data value for that channel, independent of any visualization.
getChannelMax
in interface DatasetView
public void setChannelRange(int c, double min, double max)
DatasetView
NB: This is a different range than that set by
ImageMetadata.setChannelMinimum(int, double)
and
ImageMetadata.setChannelMaximum(int, double)
; the latter methods set the
minimum and maximum data values for that channel, independent of
any visualization. They are typically kept synced with the actual data via
code such as net.imglib2.algorithm.stats.ComputeMinMax
.
setChannelRange
in interface DatasetView
public void setChannelRanges(double min, double max)
DatasetView
NB: This is a different range than that set by
ImageMetadata.setChannelMinimum(int, double)
and
ImageMetadata.setChannelMaximum(int, double)
; the latter methods set the
minimum and maximum data values for that channel, independent of
any visualization. They are typically kept synced with the actual data via
code such as net.imglib2.algorithm.stats.ComputeMinMax
.
setChannelRanges
in interface DatasetView
public void autoscale(int c)
DatasetView
NB: The data range is obtained first from
ImageMetadata.getChannelMinimum(int)
and
ImageMetadata.getChannelMaximum(int)
; if they are not set there, they are
computed and cached for later use.
autoscale
in interface DatasetView
public void setComposite(boolean composite)
setComposite
in interface DatasetView
public List<ColorTable> getColorTables()
getColorTables
in interface DatasetView
public void setColorTable(ColorTable colorTable, int channel)
setColorTable
in interface DatasetView
public void resetColorTables(boolean grayscale)
resetColorTables
in interface DatasetView
public ColorMode getColorMode()
getColorMode
in interface DatasetView
public void setColorMode(ColorMode colorMode)
setColorMode
in interface DatasetView
public ColorRGB getColor(ChannelCollection channels)
getColor
in interface DatasetView
public RandomAccessibleInterval<? extends RealType<?>> xyPlane()
xyPlane
in interface DatasetView
public RandomAccessibleInterval<? extends RealType<?>> xyPlane(RandomAccessibleInterval<? extends RealType<?>> inputInterval)
xyPlane
in interface DatasetView
inputInterval
- - An interval to extract the current XY slice from.public boolean isCompatible(Data data)
DataView
Data
.isCompatible
in interface DataView
public Dataset getData()
DataView
Data
represented by this view.getData
in interface DatasetView
getData
in interface DataView
getData
in class AbstractDataView
public int getPreferredWidth()
DataView
getPreferredWidth
in interface DataView
public int getPreferredHeight()
DataView
getPreferredHeight
in interface DataView
public void update()
DataView
public void rebuild()
DataView
Data
has changed structurally somehow.public long getLongPosition(AxisType axis)
PositionableByAxis
getLongPosition
in interface PositionableByAxis
getLongPosition
in class AbstractDataView
public void setPosition(long position, AxisType axis)
PositionableByAxis
setPosition
in interface PositionableByAxis
setPosition
in class AbstractDataView
protected void onEvent(DatasetTypeChangedEvent event)
protected void onEvent(DatasetRGBChangedEvent event)
protected void onEvent(DatasetUpdatedEvent event)
Copyright © 2014–2022 ImageJ. All rights reserved.