-
-
Notifications
You must be signed in to change notification settings - Fork 703
Description
Description
itkFastMarchingImageFilter
is called when executing itkSpeedFunctionToPathFilter
. Under some circumstances itkFastMarchingImageFilter
issues an exception with the description:
Discriminant of quadratic equation is negative
err.SetDescription("Discriminant of quadratic equation is negative"); |
However it is not obvious what the reason is that causes this problem. It is unclear when this condition is reached and how to avoid it (and if it depends on
itkSpeedFunctionToPathFilter
).
Impact analysis
It is good to have an error thrown and a description of the actual problem, as is the current case, but it would be good to have more details on why this happened and possibly how to avoid it.
Expected behavior
err.SetDescription("Discriminant of quadratic equation is negative. This happens when ... and can possibly be avoided by ...");
Actual behavior
I'm hitting this problem with one of my ITK-CLIs here:
https://github.com/romangrothausmann/ITK-CLIs/blob/e883088ebf6b19cf945ac01dec1ce81878f8c181/min-path_seg.cxx#L285-L291
It seems to be very input data dependent. The speed function that lead to this error is constructed by the sigmoid of a fast-marching map run inside a binary segmentation starting from the centerlines extracted by itkBinaryThinningImageFilter3D
.
When using e.g. ParabolicOpenImageFilter
on the binary segmentation (as built in) this error does not arise for otherwise same parameters.
Versions
Tested with ITK-4.13.1