Skip to content

BUG: avoid false positives on geometry check

Add an epsilon value to the volumes logic and use it in the fuzzy compare instead of the VTK default value. Add a precision calculation from the epsilon so that any warning messages are printed out with the same precision as was used to check the values. Added a sanity check to see if the smallest volume spacing is within 3-10 orders of magnitude of epsilon and print a warning if not. Use a copy of the CTK significant decimals utility method to calculate the precision with which to display differences in compared volumes. Use a copy of the CTK order of magnitude utility method to compare the spacing of the volumes with the current epsilon being used to check them. To avoid CTK includes which pull in a dependency on Qt, rehome the CTK core utility methods here in the anonymous namespace until they get ported to VTK. Reimplemented significantDecimals and orderOfMagnitude using standard strings and stringstreams rather than Qt strings. Added a python test to exercise the epsilon, precision and geometry check.

TBD: GUI for setting epsilon or just always use a volume spacing based value.

Merge request reports