Package sc.fiji.snt
Class FillConverter
java.lang.Object
sc.fiji.snt.FillConverter
- Author:
- Cameron Arshadi
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionFillConverter(Collection<FillerThread> fillers) Constructs a new FillConverter with the specified collection of FillerThread objects. -
Method Summary
Modifier and TypeMethodDescription<T extends net.imglib2.type.Type<T>>
voidconvert(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>
voidconvertBinary(net.imglib2.RandomAccessible<T> out) Set 1 at fill voxel positions.<T extends net.imglib2.type.numeric.RealType<T>>
voidconvertDistance(net.imglib2.RandomAccessible<T> out) Map the node distance measure to fill voxel positions.<T extends net.imglib2.type.numeric.IntegerType<T>>
voidconvertLabels(net.imglib2.RandomAccessible<T> out) Map the fill component label to fill voxel positions.Merges the inputFillerThreads into a singleSearchImageStack.
-
Constructor Details
-
FillConverter
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 raiout- 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 asDouble.- 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 concreteIntegerTypeshould be chosen based on the cardinality of the givenCollectionofFillerThreads. For example, if there are less than 256FillerThreads, chooseUnsignedByteType. If there are more than 255 but less than 65536, chooseUnsignedShortType, 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 asListorLinkedHashSet. 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
Merges the inputFillerThreads into a singleSearchImageStack. 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
-