Friends

Detailed Description

Implements linear iterative search for an iso-value of the level set along the direction of the ray.

Note

Since this class is used internally in LevelSetRayIntersector (define above) and LevelSetHDDA (defined below) client code should never interact directly with its API. This also explains why we are not concerned with the fact that several of its methods are unsafe to call unless roots were already detected.

It is approximate due to the limited number of iterations which can can be defined with a template parameter. However the default value has proven surprisingly accurate and fast. In fact more iterations are not guaranteed to give significantly better results.

Warning

Since the root-searching algorithm is approximate (first-order) it is possible to miss intersections if the iso-value is too close to the inside or outside of the narrow band (typically a distance less than a voxel unit).

Since this class internally stores a ValueAccessor it is NOT thread-safe, so make sure to give each thread its own instance. This of course also means that the cost of allocating an instance should (if possible) be amortized over as many ray intersections as possible.