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
ColorTable s. |
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. |
averageScale
axes, axis, numDimensions, setAxis
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAt, getAt, getAt
forEach, spliterator
maxAsLongArray, maxAsPoint, minAsLongArray, minAsPoint
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint
allPositive, allPositive, dimensions, dimensionsAsLongArray, dimensionsAsPoint, verify, verify, verifyAllPositive, verifyAllPositive
averageScale
dimensionIndex
axes, axis, setAxis
numDimensions
public 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 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 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()
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 value)
ImageMetadata
setCompositeChannelCount
in interface ImageMetadata
public ColorTable getColorTable(int no)
ImageMetadata
getColorTable
in interface ImageMetadata
public void setColorTable(ColorTable cT, int no)
ImageMetadata
setColorTable
in interface ImageMetadata
cT
- 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 String getSource()
Sourced
public void setSource(String source)
Sourced
public 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()
ImageMetadata
getProperties
in interface ImageMetadata
Copyright © 2014–2022 ImageJ. All rights reserved.