endrov.flowLevelsets
Class EvOpLevelsetsFastMarching3D

java.lang.Object
  extended by endrov.flow.EvOpGeneral
      extended by endrov.flow.EvOpStack
          extended by endrov.flowLevelsets.EvOpLevelsetsFastMarching3D

public class EvOpLevelsetsFastMarching3D
extends EvOpStack

3D levelsets distance calculation by fast marching. As EvOp, give speed, then starting points as mask (!=0 is a starting point). returns distance and origin color.


Field Summary
static byte stateDead
           
static byte stateFar
           
static byte stateOpen
           
 
Constructor Summary
EvOpLevelsetsFastMarching3D()
           
 
Method Summary
static EvStack collectIntensities(ProgressHandle progh, EvStack s, Vector3i[][] origin)
          Get intensity of origin
 EvStack[] exec(ProgressHandle ph, EvStack... s)
          Apply given several stacks, returns one or more stacks depending on operation
 int getNumberChannels()
          Get the number of channels/stacks/image planes that this operation will return
static void runLevelset(int width, int height, int depth, java.util.Map<Vector3i,java.lang.Double> startPoints, double[][] Ddistance, byte[][] Sstate, Vector3i[][] Qorigin, double[][] Wspeed, java.util.HashSet<Vector3i> endPointsHash)
          Run fast marching on general input
static Tuple<EvStack,Vector3i[][]> runLevelset(ProgressHandle progh, EvStack stackSpeed, EvStack stackStartPoints)
          Run level sets on stacks.
 
Methods inherited from class endrov.flow.EvOpStack
applyStackOpOnChannelsDifferentSize, applyStackOpOnChannelsSameSize, exec, exec, exec1, exec1, exec1
 
Methods inherited from class endrov.flow.EvOpGeneral
exec11, exec11, exec1Untyped, execUntyped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stateDead

public static final byte stateDead
See Also:
Constant Field Values

stateOpen

public static final byte stateOpen
See Also:
Constant Field Values

stateFar

public static final byte stateFar
See Also:
Constant Field Values
Constructor Detail

EvOpLevelsetsFastMarching3D

public EvOpLevelsetsFastMarching3D()
Method Detail

exec

public EvStack[] exec(ProgressHandle ph,
                      EvStack... s)
Description copied from class: EvOpGeneral
Apply given several stacks, returns one or more stacks depending on operation

Specified by:
exec in class EvOpGeneral

getNumberChannels

public int getNumberChannels()
Description copied from class: EvOpGeneral
Get the number of channels/stacks/image planes that this operation will return

Specified by:
getNumberChannels in class EvOpGeneral

collectIntensities

public static EvStack collectIntensities(ProgressHandle progh,
                                         EvStack s,
                                         Vector3i[][] origin)
Get intensity of origin


runLevelset

public static Tuple<EvStack,Vector3i[][]> runLevelset(ProgressHandle progh,
                                                      EvStack stackSpeed,
                                                      EvStack stackStartPoints)
Run level sets on stacks. Returns distance and origin location

Parameters:
stackSpeed - Every pixel is speed
stackStartPoints - Non-zero pixels are start points

runLevelset

public static void runLevelset(int width,
                               int height,
                               int depth,
                               java.util.Map<Vector3i,java.lang.Double> startPoints,
                               double[][] Ddistance,
                               byte[][] Sstate,
                               Vector3i[][] Qorigin,
                               double[][] Wspeed,
                               java.util.HashSet<Vector3i> endPointsHash)
Run fast marching on general input

Parameters:
width -
height -
depth -
startPoints - Start points and distance to them (normally 0)
Ddistance - Distances (returned)
Sstate - State of calculation (returned)
Qorigin - Origin of shortest path (returned)
Wspeed - Speed
endPointsHash - End points, stop calculation if reached