Package net.imglib2.mesh.alg.zslicer
Class Slice
- java.lang.Object
-
- net.imglib2.mesh.alg.zslicer.Slice
-
- All Implemented Interfaces:
Iterable<Contour>,Collection<Contour>
public class Slice extends Object implements Collection<Contour>
Class that represents the intersection of a closed 3D mesh (manifold and two-manifold) with a plane. The slice is made of a collection of several closedContours. They are sorted by decreasing area.- Author:
- Jean-Yves Tinevez
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Contour e)booleanaddAll(Collection<? extends Contour> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanisEmpty()Iterator<Contour>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()Object[]toArray()<T> T[]toArray(T[] a)voidxRayCast(double y, gnu.trove.list.array.TDoubleArrayList x, double yScale)Computes the position of the intersection of this slice (as a contour collection) with the ray parallel to the X axis and of ordinate y.voidxRayCast(double y, gnu.trove.list.array.TDoubleArrayList x, gnu.trove.list.array.TDoubleArrayList nx, double yScale)Computes the position of the intersection of this slice (as a contour collection) with the ray parallel to the X axis and of ordinate y, and measure the projected normal value at these intersections.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream
-
-
-
-
Method Detail
-
size
public int size()
- Specified by:
sizein interfaceCollection<Contour>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<Contour>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<Contour>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<Contour>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<Contour>
-
add
public boolean add(Contour e)
- Specified by:
addin interfaceCollection<Contour>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<Contour>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<Contour>
-
addAll
public boolean addAll(Collection<? extends Contour> c)
- Specified by:
addAllin interfaceCollection<Contour>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<Contour>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<Contour>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<Contour>
-
xRayCast
public void xRayCast(double y, gnu.trove.list.array.TDoubleArrayList x, gnu.trove.list.array.TDoubleArrayList nx, double yScale)Computes the position of the intersection of this slice (as a contour collection) with the ray parallel to the X axis and of ordinate y, and measure the projected normal value at these intersections.- Parameters:
y- the ordinate of the ray to cast.x- an array in which to store the intersection position. Reset by this call. Is sorted by increasing X value.nx- an array in which to store the projected normal value at the intersections. Reset by this call.yScale- some scale in Y (such as the pixel size in Y), used to shift the vertices and ray position by a small fraction of this size.
-
xRayCast
public void xRayCast(double y, gnu.trove.list.array.TDoubleArrayList x, double yScale)Computes the position of the intersection of this slice (as a contour collection) with the ray parallel to the X axis and of ordinate y.- Parameters:
y- the ordinate of the ray to cast.x- an array in which to store the intersection position. Reset by this call.yScale- some scale in Y (such as the pixel size in Y), used to shift the vertices and ray position by a small fraction of this size.
-
-