Package sc.fiji.snt

Class FillConverter

java.lang.Object
sc.fiji.snt.FillConverter

public class FillConverter extends Object
Map filled nodes from a Collection of FillerThreads to and between RandomAccessibles.
Author:
Cameron Arshadi
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new FillConverter with the specified collection of FillerThread objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends net.imglib2.type.Type<T>>
    void
    convert(net.imglib2.RandomAccessible<T> in, net.imglib2.RandomAccessible<T> out)
    Map values between the input and output at fill voxel positions.
    <T extends net.imglib2.type.operators.SetOne>
    void
    convertBinary(net.imglib2.RandomAccessible<T> out)
    Set 1 at fill voxel positions.
    <T extends net.imglib2.type.numeric.RealType<T>>
    void
    convertDistance(net.imglib2.RandomAccessible<T> out)
    Map the node distance measure to fill voxel positions.
    <T extends net.imglib2.type.numeric.IntegerType<T>>
    void
    convertLabels(net.imglib2.RandomAccessible<T> out)
    Map the fill component label to fill voxel positions.
    Merges the input FillerThreads into a single SearchImageStack.

    Methods inherited from class java.lang.Object

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

    • FillConverter

      public FillConverter(Collection<FillerThread> fillers)
      Constructs a new FillConverter with the specified collection of FillerThread objects.
      Parameters:
      fillers - the collection of FillerThread objects to be used for conversion
  • Method Details

    • convert

      public <T extends net.imglib2.type.Type<T>> void convert(net.imglib2.RandomAccessible<T> in, net.imglib2.RandomAccessible<T> out)
      Map values between the input and output at fill voxel positions.
      Type Parameters:
      T -
      Parameters:
      in - the input rai
      out - the output rai
    • convertBinary

      public <T extends net.imglib2.type.operators.SetOne> void convertBinary(net.imglib2.RandomAccessible<T> out)
      Set 1 at fill voxel positions.
      Type Parameters:
      T -
      Parameters:
      out - the output rai
    • convertDistance

      public <T extends net.imglib2.type.numeric.RealType<T>> void convertDistance(net.imglib2.RandomAccessible<T> out)
      Map the node distance measure to fill voxel positions. This corresponds to the g-score of a node assigned during the Dijkstra search. This value is stored as Double.
      Type Parameters:
      T -
      Parameters:
      out - the output rai
    • convertLabels

      public <T extends net.imglib2.type.numeric.IntegerType<T>> void convertLabels(net.imglib2.RandomAccessible<T> out)
      Map the fill component label to fill voxel positions. The concrete IntegerType should be chosen based on the cardinality of the given Collection of FillerThreads. For example, if there are less than 256 FillerThreads, choose UnsignedByteType. If there are more than 255 but less than 65536, choose UnsignedShortType, etc. Fill components are assigned labels based on their order in the collection. If you want to ensure labels are assigned based on insertion order, make sure to use an ordered collection such as List or LinkedHashSet. The first component will have label == 1, the second label == 2, and so on. The label 0 is not assigned to any voxel positions. 0-valued voxels may already exist in the output image.
      Type Parameters:
      T -
      Parameters:
      out - the output rai
    • getFillerStack

      public SearchImageStack<DefaultSearchNode> getFillerStack()
      Merges the input FillerThreads into a single SearchImageStack. When a filled voxel position is present in multiple filler instances, the node with the lowest g-score is chosen for inclusion in the merged stack.
      Returns:
      the merged filler stack