[Insight-users] Question about Fast Marching Minimal Path Extraction in ITK
Dan Mueller
dan.muel at gmail.com
Tue Jul 19 01:18:10 EDT 2011
Hi Olga,
Seems you have made good progress.
> if ( m_WayTerminationValue==NULL )
If WayTerminationValue is a double or float, I don't think this line
will work as you expect. I think you will need a separate private bool
member m_HasUserSetWayTerminationValue which flags the state of the
value.
> marching->SetTargetOffset( 2.0 * Superclass::m_TerminationValue );
This line of code specifies how far passed the termination value the
front should expand. This ensures that the front totally surrounds the
point so that we can back track with gradient descent (i.e. the point
needs neighbouring arrival values to compute the gradient). You should
set this to the 2 * max(TerminationValue, WayTerminateValue).
HTH
Cheers, Dan
On 19 July 2011 01:16, Olga C Avila-Montes <ocamcaro at gmail.com> wrote:
> Hi Dan!
> Thank you very much for your fast reply, the explanation was very helpful. .
> .
> I *think* I was able to make the changes you suggested by doing the
> following:
> I changed the second if statement at SpeedFunctionToPathFilter::Execute
> from:
>
> else if ( currentValue >= Superclass::m_TerminationValue )
>
> to:
>
> else if ( (currentValue >= Superclass::m_TerminationValue &&
> m_Info[Superclass::m_CurrentOutput].HasNextFront())
> || (currentValue >= m_EndTerminationValue &&
> !m_Info[Superclass::m_CurrentOutput].HasNextFront()) )
>
> If I understood correctly, the flag
> m_Info[Superclass::m_CurrentOutput].HasNextFront() tells me if we are
> tracing a segment to a way point (when it is "true") or if we are tracing to
> the end point (when it is "false")
> So, I used it to decide if we use the normal Termination Value or the End
> Termination Value.
>
> I also added an if in the function SpeedFunctionToPathFilter::GenerateData
> that checks whether o not the user input an EndTerminationValue, and if
> there is no input, the EndTerminationValue would take the value of
> TerminationValue:
>
> if ( m_WayTerminationValue==NULL )
> {
> m_EndTerminationValue = Superclass::m_TerminationValue;
> }
>
> Now, I have a question:
> In the function SpeedFunctionToPathFilter::ComputeArrivalFunction there is a
> line that says:
>
> marching->SetTargetOffset( 2.0 * Superclass::m_TerminationValue );
>
> and with the changes I made, it will always take the normal Termination
> Value. Do you think I need to modify this in any way?
>
> 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
> --
> View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Question-about-Fast-Marching-Minimal-Path-Extraction-in-ITK-tp6595371p6596810.html
> Sent from the ITK Insight Users mailing list archive at Nabble.com.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list