Classes | |
struct | AboveBackgroundLevel |
struct | Background |
struct | BackgroundValue |
struct | Foreground |
struct | InMask |
struct | InSpatialMask |
struct | NotBackgroundValue |
Types which implement inside/outside image domain checks
This namespace defines auxiliary types which implement inside/outside image domain checks for voxels as static methods. These types can be used as Domain template argument as used by the ForEachVoxelIf and ParallelForEachVoxelIf template functions to restrict the evaluation of the voxel function to a specific subdomain of the image(s). Moreover, if it is known how the subdomain is defined, e.g., by a binary mask, a background value, a lower foreground threshold, or an interpolation domain, a specialized inside/outside domain check is more efficient as it only needs to test one particular condition. The more generic default domain check has to evaluate multiple conditions to first decide how the domain is being defined and then evaluate the actual inside/outside condition for this domain. This requires multiple if-statements and can be expensive when all these if-statements have to be evaluated for each voxel. Therefore, whenever possible use a specialized domain check to focus on the condition that matters.
Example: