Class Shape.SizesShape

java.lang.Object
qupath.bioimageio.spec.tensor.Shape
qupath.bioimageio.spec.tensor.Shape.SizesShape
Enclosing class:
Shape

public static class Shape.SizesShape extends Shape
A Shape that wraps tensor Size objects from the 0.5 spec. Provides compatibility with code that expects 0.4-type tensor specifications.
  • Method Details

    • getShape

      public int[] getShape()
      Description copied from class: Shape
      Get the shape, if this is defined explicitly. Usually Shape.getTargetShape(int...) is more useful.
      Overrides:
      getShape in class Shape
      Returns:
      The shape in pixels.
    • getTargetShape

      public int[] getTargetShape(int[] target)
      Description copied from class: Shape
      Get a compatible shape given the specified target.

      For an explicit shape (without scale/offset/step etc.) the target does not influence the result.

      Overrides:
      getTargetShape in class Shape
      Parameters:
      target - The shape (in pixel width/height/etc.) in pixels that we are requesting.
      Returns:
      As close to the shape as the Shape object allows if a parameterized shape, or the fixed shape if fixed.
    • getShapeMin

      public int[] getShapeMin()
      Description copied from class: Shape
      Get the minimum shape; useful for parameterized shapes.
      Overrides:
      getShapeMin in class Shape
      Returns:
      An int array of minimum shape sizes.
    • getShapeStep

      public int[] getShapeStep()
      Description copied from class: Shape
      Get the shape step (increment), useful for parameterized shapes.
      Overrides:
      getShapeStep in class Shape
      Returns:
      An int array of shape steps.