Class Shape.ImplicitOutputShape

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

public static class Shape.ImplicitOutputShape extends Shape
A shape that is determined based on the shape of another tensor.
  • Constructor Details

    • ImplicitOutputShape

      public ImplicitOutputShape()
  • Method Details

    • getReferenceTensor

      public String getReferenceTensor()
      Get the reference tensor used to define this tensor shape.
      Returns:
      the reference tensor ID.
    • getScale

      public double[] getScale()
      Description copied from class: Shape
      Get the shape scale, useful for implicit shapes.
      Overrides:
      getScale in class Shape
      Returns:
      A double array of scales.
    • getOffset

      public double[] getOffset()
      Description copied from class: Shape
      Get the shape scale, useful for implicit shapes.
      Overrides:
      getOffset in class Shape
      Returns:
      A double array of offsets.
    • getTargetShape

      public int[] getTargetShape(int... target)
      Get the output shape for the given input. This uses either the explicit shape, or scale and offset.
      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.
    • toString

      public String toString()
      Overrides:
      toString in class Shape