Trace

Module to trace paths of minimal resitance between two points in a 3d array.

new_get_distutils_extension(modname, pyxfilename, language_level=None)[source]
trace(source, score, start, stop, costPerDistance=1.0, minimumCostPerDistance=0.016666666666666666, tubenessMultiplier=4.0, minimalTubeness=0.1, returnQuality=False, maxSteps=None, verbose=False)[source]

Trace a path in the 3d source image from start to stop

Arguments

sroucearray

Input source.

scorearray

A measure at each point to score a path. The higher the more likely is it that the path will go through and thus the score is a reward like measure. The cost for the path is approximately 1/score.

startarray

Start position.

stoparray

Stop position.

costPerDistancefloat

Cost used to when estimating remaining distance. Can be used to weigh the estimated distance measure.

minimalCostperDistancefloat

Minimal cost per distance used when tubeness measure is below this value.

tubenessMultiplerfloat

Multiply the tubeness measure by this value before estimating coadt via inverse. Can be used to weigh tubness vs. distiance measures.

minimalTubenessfloat

Minimal tubness measure to use (note the inverse of the tubness measure is used to calculate the cost, this effectively limits the maximal cost).

maxStepsint or None

Number of maximal iteration steps.

Returns

path2-D array

The path a list of coordinates.

trace_to_mask(source, tubeness, start, mask, costPerDistance=1.0, minimumCostPerDistance=0.016666666666666666, tubenessMultiplier=4.0, minimalTubeness=0.1, returnQuality=False, maxSteps=None, verbose=False)[source]

Trace a path in the 3d source image from start to a point on the mask

Parameters
  • source (array) – Input source.

  • tubeness (array) – Tubness measure used to score path

  • start (array) – starting point for tracing

  • mask (3-D array) – distance array to mask (goal points on mask == 0).

  • costPerDistance (float) – Cost used to when estimating remaining distance. Can be used to weigh the estimated distance measure

  • minimalCostperDistance (float) – Minimal cost per distance used when tubeness measure is below this value.

  • tubenessMultipler (float) – Multiply the tubeness measure by this value before estimating coadt via inverse. Can be used to weigh tubness vs. distiance measures.

  • maxSteps (int or None) – Number of maximal iteration steps.

Returns

path2-D array

the path a list of coordinates