Class AbstractBoundingLineModel

All Implemented Interfaces:
INameable, IBoundingLineModel, IBoundsToFit, IMapPathModel, IScanPathModel, IScanPointGeneratorModel
Direct Known Subclasses:
TwoAxisLinePointsModel, TwoAxisLineStepModel

public abstract class AbstractBoundingLineModel extends AbstractMapModel implements IBoundingLineModel, IBoundsToFit
  • Constructor Details

    • AbstractBoundingLineModel

      protected AbstractBoundingLineModel()
  • Method Details

    • getBoundingLine

      public BoundingLine getBoundingLine()
      Specified by:
      getBoundingLine in interface IBoundingLineModel
    • setBoundingLine

      public void setBoundingLine(BoundingLine boundingLine)
      Specified by:
      setBoundingLine in interface IBoundingLineModel
    • isBoundsToFit

      public boolean isBoundsToFit()
      Specified by:
      isBoundsToFit in interface IBoundsToFit
    • setBoundsToFit

      public void setBoundsToFit(boolean boundsToFit)
      Specified by:
      setBoundsToFit in interface IBoundsToFit
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractMapModel
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class AbstractMapModel
    • toString

      public String toString()
      Overrides:
      toString in class AbstractMapModel
    • enforceShape

      public static TwoAxisLinePointsModel enforceShape(TwoAxisLineStepModel model)
      Turns a StepModel into an equivalent PointsModel. Some scans (e.g XANES) perform similar scans but with small offsets, which can catch on floating point calculation errors, giving off-by-one in dataset shapes when reconstructing. This utility method prevents this situation by converting to a PointsModel, which will always have the same shape, and performing the divison to find the number of points using BigDecimal. The BoundingLine of the returned model may differ from that of the input method, due to StepModels being able to leave a portion of a step towards their end too small for another step. PointsModel however use the entire region, so this partial line is equivalent in terms of point placement.
      Parameters:
      model - - a TwoAxisLineStepModel
      Returns:
      pointsModel - a TwoAxisLinePointsModel that will output IPositions that very closely match the IPositions generated by the input