geometry
Interface Coordinates

All Known Implementing Classes:
Coordinates2D, Coordinates3D

public interface Coordinates

The Coordinates interface provides the encapsulation of coordinates with more than two dimensions.


Method Summary
 boolean equals(Coordinates coordinates)
          test if two coordinates are equal, that is, all of their components are equal.
 double getDistance(Coordinates coordinates)
          get the distance between two coordinates.
 double getX()
          get x coordinate
 double getY()
          get y coordinate
 double getZ()
          get z coordinate
 boolean isNeighbor(Coordinates coordinates)
          check if the coordinates specified by the parameter are neighbor coordinates.
 void setX(double x)
          set x coordinate
 void setY(double y)
          set y coordinate
 void setZ(double z)
          set z coordinate
 

Method Detail

getX

double getX()
get x coordinate

Returns:
x

setX

void setX(double x)
set x coordinate

Parameters:
x -

getY

double getY()
get y coordinate

Returns:
y

setY

void setY(double y)
set y coordinate

Parameters:
y -

getZ

double getZ()
get z coordinate

Returns:
z

setZ

void setZ(double z)
set z coordinate

Parameters:
z -

getDistance

double getDistance(Coordinates coordinates)
get the distance between two coordinates.

Parameters:
coordinates - the coordinates to get the distance from
Returns:
the distance between this object's coordinates and the parameter

equals

boolean equals(Coordinates coordinates)
test if two coordinates are equal, that is, all of their components are equal.


isNeighbor

boolean isNeighbor(Coordinates coordinates)
check if the coordinates specified by the parameter are neighbor coordinates. Will work only for unit pixels/voxels, that is, when Coordinates == Index

Parameters:
coordinates - the coordinates to check neighborhood to
Returns:
true if the two coordinates are directly adjacent, false if not.