Package sc.fiji.snt

Record Class SNT.VoxelBounds

java.lang.Object
java.lang.Record
sc.fiji.snt.SNT.VoxelBounds
Record Components:
min - the resolved region's minimum voxel index, per axis (inclusive)
max - the resolved region's maximum voxel index, per axis (inclusive)
clamped - true if the requested region had to be trimmed on at least one side to fit within the loaded source's own extent (e.g. padding, or a fixed-size/center region, pushed past an edge) - i.e. the resolved region is smaller than what was asked for, though never empty (an empty result throws instead, see below)
Enclosing class:
SNT

public static record SNT.VoxelBounds(long[] min, long[] max, boolean clamped) extends Record
The result of SNT.resolveVoxelBounds(BoundingBox, Calibration): a world-space region resolved and clamped to voxel-index bounds within this session's streamed source.
  • Constructor Summary

    Constructors
    Constructor
    Description
    VoxelBounds(long[] min, long[] max, boolean clamped)
    Creates an instance of a VoxelBounds record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the clamped record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    long[]
    max()
    Returns the value of the max record component.
    long[]
    min()
    Returns the value of the min record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • VoxelBounds

      public VoxelBounds(long[] min, long[] max, boolean clamped)
      Creates an instance of a VoxelBounds record class.
      Parameters:
      min - the value for the min record component
      max - the value for the max record component
      clamped - the value for the clamped record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • min

      public long[] min()
      Returns the value of the min record component.
      Returns:
      the value of the min record component
    • max

      public long[] max()
      Returns the value of the max record component.
      Returns:
      the value of the max record component
    • clamped

      public boolean clamped()
      Returns the value of the clamped record component.
      Returns:
      the value of the clamped record component