Package qupath.bioimageio.spec.tensor
Class Shape.ImplicitOutputShape
java.lang.Object
qupath.bioimageio.spec.tensor.Shape
qupath.bioimageio.spec.tensor.Shape.ImplicitOutputShape
- Enclosing class:
- Shape
A shape that is determined based on the shape of another tensor.
-
Nested Class Summary
Nested classes/interfaces inherited from class qupath.bioimageio.spec.tensor.Shape
Shape.ImplicitOutputShape, Shape.ParameterizedInputShape, Shape.SizesShape -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]Get the shape scale, useful for implicit shapes.Get the reference tensor used to define this tensor shape.double[]getScale()Get the shape scale, useful for implicit shapes.int[]getTargetShape(int... target) Get the output shape for the given input.toString()Methods inherited from class qupath.bioimageio.spec.tensor.Shape
createShapeArray, getLength, getShape, getShapeMin, getShapeStep
-
Constructor Details
-
ImplicitOutputShape
public ImplicitOutputShape()
-
-
Method Details
-
getReferenceTensor
Get the reference tensor used to define this tensor shape.- Returns:
- the reference tensor ID.
-
getScale
public double[] getScale()Description copied from class:ShapeGet the shape scale, useful for implicit shapes. -
getOffset
public double[] getOffset()Description copied from class:ShapeGet the shape scale, useful for implicit shapes. -
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:
getTargetShapein classShape- 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
-