public class DefaultDataset extends AbstractData implements Dataset
Dataset
.Constructor and Description |
---|
DefaultDataset(Context context,
ImgPlus<? extends RealType<?>> imgPlus) |
Modifier and Type | Method and Description |
---|---|
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.
|
Dataset |
copy() |
void |
copyDataFrom(Dataset other)
Changes a Dataset's internal data and metadata to match that from a given
Dataset.
|
void |
copyInto(Dataset target)
Copies the dataset's pixels into the given target dataset.
|
Cursor<RealType<?>> |
cursor() |
protected void |
delete()
Informs interested parties that the data object is no longer relevant and
should be deleted.
|
long |
dimension(int d) |
int |
dimensionIndex(AxisType axis)
Gets the dimensional index of the axis with the given type.
|
void |
dimensions(long[] dimensions) |
Dataset |
duplicate()
Creates a copy of the dataset.
|
Dataset |
duplicateBlank()
Creates a copy of the dataset, but without copying any pixel values.
|
DatasetFactory |
factory() |
RealType<?> |
firstElement() |
double |
getBytesOfInfo() |
double |
getChannelMaximum(int c)
Gets the maximum actual pixel value for the given channel.
|
double |
getChannelMinimum(int c)
Gets the minimum actual pixel value for the given channel.
|
ColorTable |
getColorTable(int no)
Gets the color table at the given position.
|
int |
getColorTableCount()
Gets the number of available
ColorTable s. |
int |
getCompositeChannelCount()
Gets the number of channels intended to be displayed together.
|
ImgPlus<? extends RealType<?>> |
getImgPlus()
TODO
|
String |
getName() |
Object |
getPlane(int planeNumber)
gets a plane of data from the Dataset.
|
Object |
getPlane(int planeNumber,
boolean copyOK)
gets a plane of data from the Dataset.
|
Map<String,Object> |
getProperties()
Gets a table of key/value pairs associated with the image.
|
String |
getSource()
Gets the source String
|
RealType<?> |
getType()
TODO
|
String |
getTypeLabelLong()
Gets the full string description of the dataset's pixel type.
|
String |
getTypeLabelShort()
Gets a short string description of the dataset's pixel type.
|
int |
getValidBits()
Gets the number of valid bits (if applicable to this
Img ). |
void |
initializeColorTables(int count)
Sets the number of available color tables to the given value.
|
boolean |
isDirty()
TODO
|
boolean |
isInteger()
TODO
|
boolean |
isRGBMerged()
For use in legacy layer only, this flag allows the various legacy layer
image translators to support color images correctly.
|
boolean |
isSigned()
TODO
|
Object |
iterationOrder() |
Iterator<RealType<?>> |
iterator() |
Cursor<RealType<?>> |
localizingCursor() |
long |
max(int d) |
void |
max(long[] max) |
void |
max(Positionable max) |
long |
min(int d) |
void |
min(long[] min) |
void |
min(Positionable min) |
int |
numDimensions() |
RandomAccess<RealType<?>> |
randomAccess() |
RandomAccess<RealType<?>> |
randomAccess(Interval interval) |
void |
realMax(double[] max) |
double |
realMax(int d) |
void |
realMax(RealPositionable max) |
void |
realMin(double[] min) |
double |
realMin(int d) |
void |
realMin(RealPositionable min) |
void |
rebuild()
Informs interested parties that the data object has undergone a major
change, such as the dimensional extents changing.
|
protected void |
register()
Informs interested parties that the data object has become relevant and
should be registered.
|
void |
rgbChange()
TODO
|
void |
setAxes(CalibratedAxis[] axes) |
void |
setAxis(CalibratedAxis axis,
int d)
Sets the dimensional axis associated with the given dimension.
|
void |
setChannelMaximum(int c,
double max)
Sets the maximum actual pixel value for the given channel.
|
void |
setChannelMinimum(int c,
double min)
Sets the minimum actual pixel value for the given channel.
|
void |
setColorTable(ColorTable lut,
int no)
Sets the color table at the given position.
|
void |
setCompositeChannelCount(int count)
Sets the number of channels intended to be displayed together.
|
void |
setDirty(boolean value)
TODO
|
void |
setImgPlus(ImgPlus<? extends RealType<?>> imgPlus)
TODO
|
void |
setName(String name) |
boolean |
setPlane(int planeNum,
Object newPlane)
sets a plane of data within the dataset.
|
boolean |
setPlaneSilently(int planeNum,
Object newPlane)
sets a plane of data within the dataset.
|
void |
setRGBMerged(boolean rgbMerged)
For use in legacy layer only, this flag allows the various legacy layer
image translators to support color images correctly.
|
void |
setSource(String source)
Sets the source String
|
void |
setValidBits(int bits)
Sets the number of valid bits.
|
long |
size() |
void |
typeChange()
TODO
|
void |
update()
Informs interested parties that the data object has undergone a
non-structural change, such as sample values being updated.
|
compareTo, context, decrementReferences, getContext, incrementReferences, publish, readExternal, setContext, toString, writeExternal
averageScale
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
axis, dimension, getChannels, getDepth, getFrames, getHeight, getWidth, typedImg
decrementReferences, incrementReferences
averageScale
context, getContext, setContext
getAt, getAt, getAt
forEach, spliterator
maxAsLongArray, maxAsPoint, minAsLongArray, minAsPoint
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint
allPositive, allPositive, dimensions, dimensionsAsLongArray, dimensionsAsPoint, verify, verify, verifyAllPositive, verifyAllPositive
protected void register()
AbstractData
register
in class AbstractData
protected void delete()
AbstractData
delete
in class AbstractData
public boolean isDirty()
Dataset
public void setDirty(boolean value)
Dataset
public ImgPlus<? extends RealType<?>> getImgPlus()
Dataset
getImgPlus
in interface Dataset
public void setImgPlus(ImgPlus<? extends RealType<?>> imgPlus)
Dataset
setImgPlus
in interface Dataset
public Object getPlane(int planeNumber)
Dataset
public Object getPlane(int planeNumber, boolean copyOK)
public boolean setPlaneSilently(int planeNum, Object newPlane)
Dataset
setPlaneSilently
in interface Dataset
public boolean setPlane(int planeNum, Object newPlane)
Dataset
public boolean isSigned()
Dataset
public boolean isInteger()
Dataset
public String getTypeLabelShort()
Dataset
getTypeLabelShort
in interface Dataset
public String getTypeLabelLong()
Dataset
getTypeLabelLong
in interface Dataset
public Dataset duplicate()
Dataset
public Dataset duplicateBlank()
Dataset
duplicateBlank
in interface Dataset
public void copyInto(Dataset target)
Dataset
public void setRGBMerged(boolean rgbMerged)
Dataset
setRGBMerged
in interface Dataset
public boolean isRGBMerged()
Dataset
isRGBMerged
in interface Dataset
public void typeChange()
Dataset
typeChange
in interface Dataset
public void rgbChange()
Dataset
public void copyDataFrom(Dataset other)
Dataset
copyDataFrom
in interface Dataset
public void update()
Dataset
update
in interface Data
update
in interface Dataset
DatasetUpdatedEvent
public void rebuild()
Dataset
rebuild
in interface Data
rebuild
in interface Dataset
DatasetRestructuredEvent
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>
axis
in class AbstractAnnotatedSpace<CalibratedAxis>
public void axes(CalibratedAxis[] axes)
AnnotatedSpace
axes
in interface AnnotatedSpace<CalibratedAxis>
axes
in class AbstractAnnotatedSpace<CalibratedAxis>
public void setAxes(CalibratedAxis[] axes)
public void setAxis(CalibratedAxis axis, int d)
AnnotatedSpace
setAxis
in interface AnnotatedSpace<CalibratedAxis>
setAxis
in class AbstractAnnotatedSpace<CalibratedAxis>
public int numDimensions()
numDimensions
in interface EuclideanSpace
numDimensions
in class AbstractAnnotatedSpace<CalibratedAxis>
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
realMin
in class AbstractCalibratedRealInterval<CalibratedAxis>
public void realMin(double[] min)
realMin
in interface RealInterval
realMin
in class AbstractCalibratedRealInterval<CalibratedAxis>
public void realMin(RealPositionable min)
realMin
in interface RealInterval
realMin
in class AbstractCalibratedRealInterval<CalibratedAxis>
public double realMax(int d)
realMax
in interface Interval
realMax
in interface RealInterval
realMax
in class AbstractCalibratedRealInterval<CalibratedAxis>
public void realMax(double[] max)
realMax
in interface RealInterval
realMax
in class AbstractCalibratedRealInterval<CalibratedAxis>
public void realMax(RealPositionable max)
realMax
in interface RealInterval
realMax
in class AbstractCalibratedRealInterval<CalibratedAxis>
public String getName()
getName
in interface Named
getName
in class AbstractData
public void setName(String name)
setName
in interface Named
setName
in class AbstractData
public String getSource()
Sourced
public void setSource(String source)
Sourced
public int getValidBits()
ImageMetadata
Img
).getValidBits
in interface ImageMetadata
public void setValidBits(int bits)
ImageMetadata
setValidBits
in interface ImageMetadata
public double getChannelMinimum(int c)
ImageMetadata
getChannelMinimum
in interface ImageMetadata
public void setChannelMinimum(int c, double min)
ImageMetadata
setChannelMinimum
in interface ImageMetadata
public double getChannelMaximum(int c)
ImageMetadata
getChannelMaximum
in interface ImageMetadata
public void setChannelMaximum(int c, double max)
ImageMetadata
setChannelMaximum
in interface ImageMetadata
public int getCompositeChannelCount()
ImageMetadata
getCompositeChannelCount
in interface ImageMetadata
public void setCompositeChannelCount(int count)
ImageMetadata
setCompositeChannelCount
in interface ImageMetadata
public ColorTable getColorTable(int no)
ImageMetadata
getColorTable
in interface ImageMetadata
public void setColorTable(ColorTable lut, int no)
ImageMetadata
setColorTable
in interface ImageMetadata
lut
- The color table to store.no
- The position of the color table, typically (but not necessarily)
a 1D dimensional planar index rasterized from an N-dimensional
planar position array.public void initializeColorTables(int count)
ImageMetadata
initializeColorTables
in interface ImageMetadata
public int getColorTableCount()
ImageMetadata
ColorTable
s. For Img
s, this
number typically matches the total number of planes.getColorTableCount
in interface ImageMetadata
public double getBytesOfInfo()
getBytesOfInfo
in interface Dataset
public Dataset copy()
public DatasetFactory factory()
public RandomAccess<RealType<?>> randomAccess()
randomAccess
in interface RandomAccessible<RealType<?>>
public RandomAccess<RealType<?>> randomAccess(Interval interval)
randomAccess
in interface RandomAccessible<RealType<?>>
public Cursor<RealType<?>> cursor()
cursor
in interface IterableInterval<RealType<?>>
cursor
in interface IterableRealInterval<RealType<?>>
public Cursor<RealType<?>> localizingCursor()
localizingCursor
in interface IterableInterval<RealType<?>>
localizingCursor
in interface IterableRealInterval<RealType<?>>
public RealType<?> firstElement()
firstElement
in interface IterableRealInterval<RealType<?>>
public Object iterationOrder()
iterationOrder
in interface IterableRealInterval<RealType<?>>
public long size()
size
in interface IterableRealInterval<RealType<?>>
public Map<String,Object> getProperties()
ImageMetadata
getProperties
in interface ImageMetadata
Copyright © 2014–2022 ImageJ. All rights reserved.