Package inra.ijpb.data
Class Cursor3D
java.lang.Object
inra.ijpb.data.Cursor3D
public class Cursor3D
extends java.lang.Object
Identifies the position of a voxel in a 3D image by using 3 integer coordinates.
- See Also:
Cursor2D
-
Constructor Summary
Constructors Constructor Description Cursor3D(int x, int y, int z)
Creates a new cursor from two coordinates. -
Method Summary
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Cursor3D
public Cursor3D(int x, int y, int z)Creates a new cursor from two coordinates.- Parameters:
x
- the x-coordinatey
- the y-coordinatez
- the z-coordinate
-
-
Method Details
-
set
public void set(int x, int y, int z)Sets the position of this cursor.- Parameters:
x
- the new x-coordinatey
- the new y-coordinatez
- the new z-coordinate
-
getX
public int getX()- Returns:
- the x-position of this cursor
-
getY
public int getY()- Returns:
- the y-position of this cursor
-
getZ
public int getZ()- Returns:
- the z-position of this cursor
-
equals
public boolean equals(java.lang.Object other)- Overrides:
equals
in classjava.lang.Object
-
euclideanDistance
Calculate Euclidean distance to another cursor- Parameters:
c
- cursor to calculate distance to- Returns:
- Euclidean distance between this cursor and the input one
-