[Insight-users] Question about Fast Marching Minimal Path Extraction in ITK
Dan Mueller
dan.muel at gmail.com
Mon Jul 18 13:12:04 EDT 2011
Hi Olga,
Let me first describe the termination value for the case with just a
start and end point. The Fast Marching arrival function is computed by
expanding the front along the speed function from the end point. When
the front reaches the start point, the expansion is terminated.
Starting at the start point, the arrival function is traced towards
the end point. When the path reaches an arrival value less than the
termination value (i.e. as it gets close to the end point), the path
tracing is terminated and the resultant path returned.
The situation is similar when using a way point: the front is
propagated from the start point and is terminated when it reaches the
way point, the path is traced from the start point to the way point
and stops when the path reaches an arrival value less than the
termination value, the process is then repeated with the way point and
the end point.
As you can see, in the second case, the termination value affects
_both_ the path reaching the way point and the path reaching the end
point. i.e. the filter does not operate in the way you were expecting.
To accomplish what you want, you will need to slightly modify the
source code. You would need to add a WayPointTerminatationValue
property to the SpeedFunctionToPathFilter, then in
SpeedFunctionToPathFilter::Execute you need to detect if we are
tracing a segment to a way point (if so, use the new
WayPointTerminationValue), or if we are tracing to the end point (if
so, use the normal TerminatationValue). Then you will be able to set
WayPointTerminationValue to be larger (say 20) than TerminatationValue
(say 2), and the path will tend towards the way points but not reach
them, but the path will still terminate at the end point.
(Unfortunately I don't have time to implement these changes for you.
If you manage to implement them, please send the changes to me, and I
will upload them to the IJ article.)
HTH
Cheers, Dan
On 18 July 2011 18:14, Olga C Avila-Montes <ocamcaro at gmail.com> wrote:
> Hi everyone!
> I have a question regarding the Insight Journal publication here:
> http://www.insight-journal.org/browse/publication/213
>
> I have to segment a tubular structure and the first step is to get and
> approximated centerline.
> For this I have start, end and some way points. I want the path to reach the
> start and end points, and use the way points to guide the minimal path.
> Since I want the way points to be used as soft constrains, I'm using a big
> termination value. The problem is that my path falls short on reaching the
> start and end points. On the contrary, if I use a small termination value,
> the path reaches the start and end points, but is forced as well to pass
> exactly by my way points and I don't want this because it might cause my
> curve to loose smoothness if the way points are slightly off.
>
> What is the general practice in this case? should I, for example, use a big
> termination value and just connect the path to my start and end points with
> a straight line? or is there something else I can do to solve this problem?
>
> Thanks!!
>
> -----
> Olga C Avila-Montes
> Research Assistant, Computational Biomedicine Lab (www.cbl.uh.edu)
> Dept. of Computer Science, University of Houston, Houston, TX 77204-3010
More information about the Insight-users
mailing list