Class MapToRotatedCartesian

java.lang.Object
org.eclipse.dawnsci.analysis.dataset.impl.function.MapToRotatedCartesian
All Implemented Interfaces:
DatasetToDatasetFunction

public class MapToRotatedCartesian extends Object implements DatasetToDatasetFunction
Map a 2D dataset from Cartesian to rotated Cartesian coordinates and return that remapped dataset from a rotated rectangle return a dataset and an unclipped unit version (for clipping compensation)
  • Constructor Details

    • MapToRotatedCartesian

      public MapToRotatedCartesian(int x, int y, int width, int height, double angle)
      Set up mapping of rotated 2D dataset
      Parameters:
      x - top left x (in pixel coordinates)
      y - top left y
      width -
      height -
      angle - in degrees (clockwise from positive x axis)
    • MapToRotatedCartesian

      public MapToRotatedCartesian(int x, int y, int width, int height, double angle, boolean isDegrees)
      Parameters:
      x -
      y -
      width -
      height -
      angle -
      isDegrees -
    • MapToRotatedCartesian

      public MapToRotatedCartesian(IRectangularROI roi)
      Parameters:
      roi -
  • Method Details

    • getPoint

      public int[] getPoint(int i, int j)
      Parameters:
      i -
      j -
      Returns:
      position of indexed point on grid
    • getPoint

      public int[] getPoint(int[] pos)
      Parameters:
      pos -
      Returns:
      position of point on grid
    • value

      public List<org.eclipse.january.dataset.Dataset> value(org.eclipse.january.dataset.IDataset... datasets)
      The class implements mapping of a Cartesian grid sampled data (pixels) to another Cartesian grid
      Specified by:
      value in interface DatasetToDatasetFunction
      Parameters:
      datasets - input 2D dataset
      Returns:
      two 2D dataset where rows label tilted rows and columns label tilted columns