[ITK] Level Sets v4 CFL calculation

David S. Paik (Elucid Bioimaging) david.paik at elucidbio.com
Tue Jun 21 15:15:32 EDT 2016


I am going through the level sets v4 code and finding different areas of the code that appear to be dead cruft yet still in the code making understanding of the code difficult for a new comer.

LevelSetEquationTermContainer (which represents a single equation), stores its CFL contributions in a std::map for each term.  No problem.

However, LevelSetEquationTermBase also has m_CFLContribution which is set to zero (in constructor and SetUp) and no other code seems to ever change.  So I’m guessing that in this class, it is some leftover dead code but it makes the code very confusing if you happen to start looking at this class first.

But much more seriously, in LevelSetEvolution::ComputeTimeStepForNextiteration specialized for LevelSetDenseImage (itkLevelSetEvolution.hxx line 128-130), there are the following two lines:

    LevelSetOutputRealType contribution = this->m_EquationContainer->ComputeCFLContribution();
    contribution = 1;

This negates the whole CFL computation and instead chooses a totally arbitrary value.  Perhaps this was accidentally left in the code?  I seem to recall seeing something similar in the v3 level set framework.  If the true value was actually larger, this can lead to too large a time step and thus severe numerical instability.

Does anybody who maintains any of the level set v4 code read this?  Is there anybody I should be contacting directly?

David



More information about the Community mailing list