Package sc.fiji.snt

Record Class SNT.MaterializedCrop

java.lang.Object
java.lang.Record
sc.fiji.snt.SNT.MaterializedCrop
Record Components:
imp - the eagerly-copied, calibrated, tagged crop, not yet installed as this session's canvas
voxelMin - the crop's minimum voxel index in the source's own (raw, world-origin-offset-free) grid, per axis - needed by SNT.installMaterializedCrop(MaterializedCrop), together with SNT.getWorldOriginOffset(), to position every Path relative to the crop's local grid
channel - the (1-based) channel the crop's pixel data was actually read from - i.e., this session's own channel at the time SNT.buildMaterializedCrop(BoundingBox, boolean) ran. Recorded here because SNT.installMaterializedCrop(MaterializedCrop) calls SNT.initialize(ImagePlus) on imp, which resets this session's channel/ frame fields to 1/1 (a materialized crop is always single-frame, and single-channel unless built by a script like Materialize_Multichannel_Region.groovy, see SNT.getMaterializedCropChannel()/SNT.getMaterializedCropFrame()), so the crop's true source channel/frame would otherwise be lost
frame - the (1-based) frame the crop's pixel data was actually read from - see channel
Enclosing class:
SNT

public static record SNT.MaterializedCrop(ij.ImagePlus imp, long[] voxelMin, int channel, int frame) extends Record
The read-only, EDT-independent half of materializing a region, produced by SNT.buildMaterializedCrop(BoundingBox) and consumed by SNT.installMaterializedCrop(MaterializedCrop).
  • Constructor Summary

    Constructors
    Constructor
    Description
    MaterializedCrop(ij.ImagePlus imp, long[] voxelMin, int channel, int frame)
    Creates an instance of a MaterializedCrop record class.
  • Method Summary

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

    Methods inherited from class java.lang.Object

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

    • MaterializedCrop

      public MaterializedCrop(ij.ImagePlus imp, long[] voxelMin, int channel, int frame)
      Creates an instance of a MaterializedCrop record class.
      Parameters:
      imp - the value for the imp record component
      voxelMin - the value for the voxelMin record component
      channel - the value for the channel record component
      frame - the value for the frame 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.
    • imp

      public ij.ImagePlus imp()
      Returns the value of the imp record component.
      Returns:
      the value of the imp record component
    • voxelMin

      public long[] voxelMin()
      Returns the value of the voxelMin record component.
      Returns:
      the value of the voxelMin record component
    • channel

      public int channel()
      Returns the value of the channel record component.
      Returns:
      the value of the channel record component
    • frame

      public int frame()
      Returns the value of the frame record component.
      Returns:
      the value of the frame record component