Class SplitIntoSquares

Object
AnchorBean<ObjectCollectionProvider>
InitializableBean<ObjectCollectionProvider, ImageInitialization>
ImageBean<ObjectCollectionProvider>
ObjectCollectionProvider
ObjectCollectionProviderUnary
SplitIntoSquares
All Implemented Interfaces:
Provider<ObjectCollection>

public class SplitIntoSquares extends ObjectCollectionProviderUnary
Splits objects into sub-objects by cutting by an orthogonal square lattice (like a chessboard).

Only splits in x and y dimensions; the z-dimension is unaffected.

The cuts are mostly squares, but sometimes cuts are rectangles in the leftover space, which are never larger in any dimension than squareSize

An optional minimim number of on voxels is applied to any object (after it has been cut) to exist in the created collection.

Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    ObjectCollection
    createFromObjects(ObjectCollection objectCollection)
     
    int
    Only includes squares that have at least this number of voxels.
    int
     
    void
    setMinNumberVoxels(int minNumberVoxels)
    Only includes squares that have at least this number of voxels.
    void
    setSquareSize(int squareSize)
     

    Methods inherited from class org.anchoranalysis.image.bean.provider.ObjectCollectionProviderUnary

    get, getObjects, setObjects

    Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean

    getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

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

    • SplitIntoSquares

      public SplitIntoSquares()
  • Method Details

    • createFromObjects

      public ObjectCollection createFromObjects(ObjectCollection objectCollection)
      Specified by:
      createFromObjects in class ObjectCollectionProviderUnary
    • getSquareSize

      public int getSquareSize()
    • setSquareSize

      public void setSquareSize(int squareSize)
    • getMinNumberVoxels

      public int getMinNumberVoxels()
      Only includes squares that have at least this number of voxels.
    • setMinNumberVoxels

      public void setMinNumberVoxels(int minNumberVoxels)
      Only includes squares that have at least this number of voxels.