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

    Modifier and Type Method Description
    boolean equals​(java.lang.Object other)  
    double euclideanDistance​(Cursor3D c)
    Calculate Euclidean distance to another cursor
    int getX()  
    int getY()  
    int getZ()  
    void set​(int x, int y, int z)
    Sets the position of this cursor.

    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-coordinate
      y - the y-coordinate
      z - 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-coordinate
      y - the new y-coordinate
      z - 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 class java.lang.Object
    • euclideanDistance

      public double euclideanDistance​(Cursor3D c)
      Calculate Euclidean distance to another cursor
      Parameters:
      c - cursor to calculate distance to
      Returns:
      Euclidean distance between this cursor and the input one