public class ImgPlus<T> extends AbstractCalibratedRealInterval<CalibratedAxis> implements Img<T>, WrappedImg<T>, ImgPlusMetadata
Img together with its metadata.
Metadata includes name, dimensional axes and calibration information.
NOTE: This class is slated for redesign soon. Use at your own risk! If you need future stability, use ImgLib2 and/or ImageJ 1.x classes.
| Constructor and Description |
|---|
ImgPlus(Img<T> img) |
ImgPlus(Img<T> img,
ImgPlusMetadata metadata) |
ImgPlus(Img<T> img,
ImgPlusMetadata metadata,
boolean axesOnly)
As
ImgPlus(Img, ImgPlusMetadata) but with a flag to determine if
metadata beyond axis information is copied. |
ImgPlus(Img<T> img,
String name) |
ImgPlus(Img<T> img,
String name,
AxisType[] axes) |
ImgPlus(Img<T> img,
String name,
AxisType[] axisTypes,
double[] cal) |
ImgPlus(Img<T> img,
String name,
AxisType[] axisTypes,
double[] cal,
String[] units) |
ImgPlus(Img<T> img,
String name,
CalibratedAxis... axes) |
| Modifier and Type | Method and Description |
|---|---|
ImgPlus<T> |
copy() |
Cursor<T> |
cursor() |
long |
dimension(int d) |
void |
dimensions(long[] dimensions) |
ImgFactory<T> |
factory() |
T |
firstElement() |
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
ColorTables. |
int |
getCompositeChannelCount()
Gets the number of channels intended to be displayed together.
|
Img<T> |
getImg()
Gets the backing
Img of this ImgPlus. |
String |
getName() |
Map<String,Object> |
getProperties()
Gets a table of key/value pairs associated with the image.
|
String |
getSource()
Gets the source String
|
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.
|
Object |
iterationOrder() |
Iterator<T> |
iterator() |
Cursor<T> |
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) |
RandomAccess<T> |
randomAccess() |
RandomAccess<T> |
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 |
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 cT,
int no)
Sets the color table at the given position.
|
void |
setCompositeChannelCount(int value)
Sets the number of channels intended to be displayed together.
|
void |
setName(String name) |
void |
setSource(String source)
Sets the source String
|
void |
setValidBits(int bits)
Sets the number of valid bits.
|
long |
size() |
static <T> ImgPlus<T> |
wrap(Img<T> img)
Ensures the given
Img is an ImgPlus, wrapping if necessary. |
static <T> ImgPlus<T> |
wrap(Img<T> img,
ImgPlusMetadata metadata)
Ensures the given
Img is an ImgPlus, wrapping if necessary. |
averageScaleaxes, axis, numDimensions, setAxisclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAt, getAt, getAtforEach, spliteratormaxAsLongArray, maxAsPoint, minAsLongArray, minAsPointmaxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPointallPositive, allPositive, dimensions, dimensionsAsLongArray, dimensionsAsPoint, verify, verify, verifyAllPositive, verifyAllPositiveaverageScaledimensionIndexaxes, axis, setAxisnumDimensionspublic ImgPlus(Img<T> img, ImgPlusMetadata metadata)
public ImgPlus(Img<T> img, ImgPlusMetadata metadata, boolean axesOnly)
ImgPlus(Img, ImgPlusMetadata) but with a flag to determine if
metadata beyond axis information is copied.axesOnly - - if true, only axis metadata is copied.public ImgPlus(Img<T> img, String name, CalibratedAxis... axes)
public Img<T> getImg()
Img of this ImgPlus.
Note that most of the time, you do not need to call this method.
Rather, you can use the ImgPlus directly because it implements all
of the same interfaces. However, there are legitimate cases where you may
need access to the backing container (e.g., for performance, to cast to the
appropriate Img implementation such as ArrayImg).
getImg in interface WrappedImg<T>public RandomAccess<T> randomAccess()
randomAccess in interface RandomAccessible<T>public RandomAccess<T> randomAccess(Interval interval)
randomAccess in interface RandomAccessible<T>public void min(Positionable min)
public void max(Positionable max)
public void dimensions(long[] dimensions)
dimensions in interface Dimensionspublic long dimension(int d)
dimension in interface Dimensionsdimension in interface Intervalpublic double realMin(int d)
realMin in interface IntervalrealMin in interface RealIntervalrealMin in class AbstractCalibratedRealInterval<CalibratedAxis>public void realMin(double[] min)
realMin in interface RealIntervalrealMin in class AbstractCalibratedRealInterval<CalibratedAxis>public void realMin(RealPositionable min)
realMin in interface RealIntervalrealMin in class AbstractCalibratedRealInterval<CalibratedAxis>public double realMax(int d)
realMax in interface IntervalrealMax in interface RealIntervalrealMax in class AbstractCalibratedRealInterval<CalibratedAxis>public void realMax(double[] max)
realMax in interface RealIntervalrealMax in class AbstractCalibratedRealInterval<CalibratedAxis>public void realMax(RealPositionable max)
realMax in interface RealIntervalrealMax in class AbstractCalibratedRealInterval<CalibratedAxis>public Cursor<T> cursor()
cursor in interface IterableInterval<T>cursor in interface IterableRealInterval<T>public Cursor<T> localizingCursor()
localizingCursor in interface IterableInterval<T>localizingCursor in interface IterableRealInterval<T>public long size()
size in interface IterableRealInterval<T>public T firstElement()
firstElement in interface IterableRealInterval<T>public Object iterationOrder()
iterationOrder in interface IterableRealInterval<T>public ImgFactory<T> factory()
public int getValidBits()
ImageMetadataImg).getValidBits in interface ImageMetadatapublic void setValidBits(int bits)
ImageMetadatasetValidBits in interface ImageMetadatapublic double getChannelMinimum(int c)
ImageMetadatagetChannelMinimum in interface ImageMetadatapublic void setChannelMinimum(int c,
double min)
ImageMetadatasetChannelMinimum in interface ImageMetadatapublic double getChannelMaximum(int c)
ImageMetadatagetChannelMaximum in interface ImageMetadatapublic void setChannelMaximum(int c,
double max)
ImageMetadatasetChannelMaximum in interface ImageMetadatapublic int getCompositeChannelCount()
ImageMetadatagetCompositeChannelCount in interface ImageMetadatapublic void setCompositeChannelCount(int value)
ImageMetadatasetCompositeChannelCount in interface ImageMetadatapublic ColorTable getColorTable(int no)
ImageMetadatagetColorTable in interface ImageMetadatapublic void setColorTable(ColorTable cT, int no)
ImageMetadatasetColorTable in interface ImageMetadatacT - 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)
ImageMetadatainitializeColorTables in interface ImageMetadatapublic int getColorTableCount()
ImageMetadataColorTables. For Imgs, this
number typically matches the total number of planes.getColorTableCount in interface ImageMetadatapublic String getSource()
Sourcedpublic void setSource(String source)
Sourcedpublic static <T> ImgPlus<T> wrap(Img<T> img)
Img is an ImgPlus, wrapping if necessary.public static <T> ImgPlus<T> wrap(Img<T> img, ImgPlusMetadata metadata)
Img is an ImgPlus, wrapping if necessary.public Map<String,Object> getProperties()
ImageMetadatagetProperties in interface ImageMetadataCopyright © 2014–2022 ImageJ. All rights reserved.