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, setSelectedcontext, getContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdispose, getPlanePosition, initialize, isSelected, setSelectedgetIntPositiongetDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, positionAsLongArray, positionAsPointlocalize, localize, localize, positionAsDoubleArray, positionAsRealPointnumDimensionsbck, fwd, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPositioncontext, getContext, setContextpublic int getChannelCount()
DatasetViewgetChannelCount in interface DatasetViewpublic ARGBScreenImage getScreenImage()
getScreenImage in interface DatasetViewpublic int getCompositeDimIndex()
getCompositeDimIndex in interface DatasetViewpublic CompositeXYProjector<? extends RealType<?>> getProjector()
getProjector in interface DatasetViewpublic 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 DatasetViewpublic 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 DatasetViewpublic 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 DatasetViewpublic 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 DatasetViewpublic 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 DatasetViewpublic void setComposite(boolean composite)
setComposite in interface DatasetViewpublic List<ColorTable> getColorTables()
getColorTables in interface DatasetViewpublic void setColorTable(ColorTable colorTable, int channel)
setColorTable in interface DatasetViewpublic void resetColorTables(boolean grayscale)
resetColorTables in interface DatasetViewpublic ColorMode getColorMode()
getColorMode in interface DatasetViewpublic void setColorMode(ColorMode colorMode)
setColorMode in interface DatasetViewpublic ColorRGB getColor(ChannelCollection channels)
getColor in interface DatasetViewpublic RandomAccessibleInterval<? extends RealType<?>> xyPlane()
xyPlane in interface DatasetViewpublic RandomAccessibleInterval<? extends RealType<?>> xyPlane(RandomAccessibleInterval<? extends RealType<?>> inputInterval)
xyPlane in interface DatasetViewinputInterval - - An interval to extract the current XY slice from.public boolean isCompatible(Data data)
DataViewData.isCompatible in interface DataViewpublic Dataset getData()
DataViewData represented by this view.getData in interface DatasetViewgetData in interface DataViewgetData in class AbstractDataViewpublic int getPreferredWidth()
DataViewgetPreferredWidth in interface DataViewpublic int getPreferredHeight()
DataViewgetPreferredHeight in interface DataViewpublic void update()
DataViewpublic void rebuild()
DataViewData has changed structurally somehow.public long getLongPosition(AxisType axis)
PositionableByAxisgetLongPosition in interface PositionableByAxisgetLongPosition in class AbstractDataViewpublic void setPosition(long position,
AxisType axis)
PositionableByAxissetPosition in interface PositionableByAxissetPosition in class AbstractDataViewprotected void onEvent(DatasetTypeChangedEvent event)
protected void onEvent(DatasetRGBChangedEvent event)
protected void onEvent(DatasetUpdatedEvent event)
Copyright © 2014–2022 ImageJ. All rights reserved.