Package net.imglib2.mesh.alg
Class MeshIterable<T>
- java.lang.Object
-
- net.imglib2.mesh.alg.MeshIterable<T>
-
- All Implemented Interfaces:
Iterable<T>,Dimensions,EuclideanSpace,Interval,IterableInterval<T>,IterableRealInterval<T>,RealInterval,Typed<T>
public class MeshIterable<T> extends Object implements IterableInterval<T>
-
-
Constructor Summary
Constructors Constructor Description MeshIterable(RandomAccessible<T> ra, Mesh mesh, double[] calibration)Creates an iterable for the pixels of the specified image inside the specified mesh.MeshIterable(RandomAccessible<T> ra, Mesh mesh, double[] calibration, RealInterval boundingBox)Creates an iterable for the pixels of the specified image inside the specified mesh.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cursor<T>cursor()TfirstElement()ObjectiterationOrder()Iterator<T>iterator()Cursor<T>localizingCursor()longmax(int d)longmin(int d)intnumDimensions()longsize()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.imglib2.Dimensions
dimensions, dimensions, dimensionsAsLongArray, dimensionsAsPoint
-
Methods inherited from interface net.imglib2.Interval
dimension, max, max, maxAsLongArray, maxAsPoint, min, min, minAsLongArray, minAsPoint, realMax, realMin
-
Methods inherited from interface net.imglib2.IterableInterval
localizingSpliterator, spliterator
-
Methods inherited from interface net.imglib2.IterableRealInterval
getType, parallelStream, stream
-
Methods inherited from interface net.imglib2.RealInterval
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMax, realMin, realMin
-
-
-
-
Constructor Detail
-
MeshIterable
public MeshIterable(RandomAccessible<T> ra, Mesh mesh, double[] calibration)
Creates an iterable for the pixels of the specified image inside the specified mesh. A calibration array (pixel sizes) is used to transform the pixel coordinates into mesh coordinates. Recompute the mesh bounding-box.- Parameters:
ra- the random accessible to iterate over. It is the caller responsibility to ensure the random accessible is extended to accommodate the mesh coordinates.mesh- the mesh to iterate in.calibration- the calibration array, used to map pixel coordinates to mesh coordinates (mesh_x = pixel_x * calibration[0]etc).
-
MeshIterable
public MeshIterable(RandomAccessible<T> ra, Mesh mesh, double[] calibration, RealInterval boundingBox)
Creates an iterable for the pixels of the specified image inside the specified mesh. A calibration array (pixel sizes) is used to transform the pixel coordinates into mesh coordinates.- Parameters:
ra- the random accessible to iterate over. It is the caller responsibility to ensure the random accessible is extended to accommodate the mesh coordinates.mesh- the mesh to iterate in.calibration- the calibration array, used to map pixel coordinates to mesh coordinates (mesh_x = pixel_x * calibration[0]etc).boundingBox- the bounding-box if it's available, to avoid recomputing it.
-
-
Method Detail
-
numDimensions
public int numDimensions()
- Specified by:
numDimensionsin interfaceEuclideanSpace
-
size
public long size()
- Specified by:
sizein interfaceIterableRealInterval<T>
-
firstElement
public T firstElement()
- Specified by:
firstElementin interfaceIterableRealInterval<T>
-
iterationOrder
public Object iterationOrder()
- Specified by:
iterationOrderin interfaceIterableRealInterval<T>
-
cursor
public Cursor<T> cursor()
- Specified by:
cursorin interfaceIterableInterval<T>- Specified by:
cursorin interfaceIterableRealInterval<T>
-
localizingCursor
public Cursor<T> localizingCursor()
- Specified by:
localizingCursorin interfaceIterableInterval<T>- Specified by:
localizingCursorin interfaceIterableRealInterval<T>
-
-