Class StagePosition

java.lang.Object
org.micromanager.StagePosition

public class StagePosition extends Object
Description of the position of a 1 or 2 axis stage.
  • Field Details

  • Constructor Details

  • Method Details

    • create1D

      public static StagePosition create1D(String stageDeviceLabel, double z)
      Creates a new StapePosition for a 1 axis drive.
      Parameters:
      stageDeviceLabel - name of the stage/drive
      z - position
      Returns:
      StagePosition object based on the input
    • create2D

      public static StagePosition create2D(String stageDeviceLabel, double x, double y)
      Creates a new StapePosition for a 2 axis drive.
      Parameters:
      stageDeviceLabel - name of the stage/drive
      x - position-x
      y - position-y
      Returns:
      StagePosition object based on the input
    • newInstance

      public static StagePosition newInstance(StagePosition aPos)
      Creates a copy of a StagePosition object.
      Parameters:
      aPos - StagePosition to be copied. Should not be null/
      Returns:
      Copy of the given StagePosition
    • set2DPosition

      public void set2DPosition(String stageDeviceLabel, double x, double y)
      Sets the position of an XY stage device in this StagePosition instance.
      Parameters:
      stageDeviceLabel - String identifying the stage
      x - New x position
      y - New Y position
    • set1DPosition

      public void set1DPosition(String stageDeviceLabel, double z)
      Sets the position of a stage device in this StagePosition instance.
      Parameters:
      stageDeviceLabel - String identifying the stage
      z - New position
    • getStageDeviceLabel

      public String getStageDeviceLabel()
    • getNumberOfStageAxes

      public int getNumberOfStageAxes()
    • is2DStagePosition

      public boolean is2DStagePosition()
    • is1DStagePosition

      public boolean is1DStagePosition()
    • get2DPositionX

      public double get2DPositionX()
    • get2DPositionY

      public double get2DPositionY()
    • get1DPosition

      public double get1DPosition()
    • getVerbose

      public String getVerbose()
      Verbose description of this StagePosition.
      Returns:
      Description of this StagePosition as a String.
    • equals

      public boolean equals(Object alt)
      Compare us against the provided StagePosition and return true only if we are equal in all respects.
      Overrides:
      equals in class Object
      Parameters:
      alt - Other StagePosition to compare against.
      Returns:
      true if every field in alt equals our corresponding field.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toPropertyMap

      public PropertyMap toPropertyMap()
      Returns this StagePosition instance as a PropertyMap.
      Returns:
      PropertyMap representation of this StagePosition.
    • fromPropertyMap

      public static StagePosition fromPropertyMap(PropertyMap pmap)
      Returns the given PrropertyMap as a StagePosition.
      Parameters:
      pmap - Input PropertyMap
      Returns:
      StagePosition representation of this PropertyMap.