Package qupath.bioimageio.spec.tensor
Class Shape.SizesShape
java.lang.Object
qupath.bioimageio.spec.tensor.Shape
qupath.bioimageio.spec.tensor.Shape.SizesShape
- Enclosing class:
- Shape
A Shape that wraps tensor Size objects from the 0.5 spec.
Provides compatibility with code that expects 0.4-type tensor specifications.
-
Nested Class Summary
Nested classes/interfaces inherited from class qupath.bioimageio.spec.tensor.Shape
Shape.ImplicitOutputShape, Shape.ParameterizedInputShape, Shape.SizesShape -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint[]getShape()Get the shape, if this is defined explicitly.int[]Get the minimum shape; useful for parameterized shapes.int[]Get the shape step (increment), useful for parameterized shapes.int[]getTargetShape(int[] target) Get a compatible shape given the specified target.
-
Method Details
-
getShape
public int[] getShape()Description copied from class:ShapeGet the shape, if this is defined explicitly. UsuallyShape.getTargetShape(int...)is more useful. -
getTargetShape
public int[] getTargetShape(int[] target) Description copied from class:ShapeGet a compatible shape given the specified target.For an explicit shape (without scale/offset/step etc.) the target does not influence the result.
- 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.
-
getShapeMin
public int[] getShapeMin()Description copied from class:ShapeGet the minimum shape; useful for parameterized shapes.- Overrides:
getShapeMinin classShape- Returns:
- An int array of minimum shape sizes.
-
getShapeStep
public int[] getShapeStep()Description copied from class:ShapeGet the shape step (increment), useful for parameterized shapes.- Overrides:
getShapeStepin classShape- Returns:
- An int array of shape steps.
-