java.lang.Object
qupath.bioimageio.spec.tensor.sizes.ReferencedSize
All Implemented Interfaces:
Size

public class ReferencedSize extends Object implements Size
A tensor axis size (extent in pixels/frames) defined in relation to a reference axis.
size = reference.size * reference.scale / axis.scale + offset
  • Field Summary

    Fields inherited from interface qupath.bioimageio.spec.tensor.sizes.Size

    NO_SIZE
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the minimum shape for this axis.
    int
    Get the step size of this axis size.
    int
    getTargetSize(int target)
    Get a size as close as possible to a target.
    int
    Get the default size of this axis.
    void
    validate(List<? extends BaseTensor> tensors)
    Validate a tensor's size, ensuring that all internal fields are valid and resolving links between tensor objects.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • size

      public int size()
      Description copied from interface: Size
      Get the default size of this axis. Size.getTargetSize(int) may be more useful.
      Specified by:
      size in interface Size
      Returns:
      The size of this axis.
    • getTargetSize

      public int getTargetSize(int target)
      Description copied from interface: Size
      Get a size as close as possible to a target.
      Specified by:
      getTargetSize in interface Size
      Parameters:
      target - The target size.
      Returns:
      The fixed output size, Size.NO_SIZE or as close as we can get to the target size.
    • getStep

      public int getStep()
      Description copied from interface: Size
      Get the step size of this axis size.
      Specified by:
      getStep in interface Size
      Returns:
      Size.NO_SIZE for any axis without a step size, otherwise the size.
    • getMin

      public int getMin()
      Description copied from interface: Size
      Gets the minimum shape for this axis.
      Specified by:
      getMin in interface Size
      Returns:
      the minimum size in pixels
    • validate

      public void validate(List<? extends BaseTensor> tensors)
      Description copied from interface: Size
      Validate a tensor's size, ensuring that all internal fields are valid and resolving links between tensor objects.
      Specified by:
      validate in interface Size
      Parameters:
      tensors - Tensors that may be referenced by this Size object.