Classes
mirtk::UnaryVoxelFunction Namespace Reference

Classes

struct  CastToGreyValue
 Casts intensities to grey values. More...
 
struct  Clamp
 
struct  GetMax
 
struct  GetMin
 
struct  GetMinMax
 
struct  InterpolateImage
 Interpolate scalar or vector image. More...
 
struct  InterpolateMultiChannelImage
 Interpolate multi-channel image (3D+c) More...
 
struct  InterpolateScalarImage
 Interpolate scalar image. More...
 
struct  LowerThreshold
 
struct  Sqrt
 
struct  UpperThreshold
 

Detailed Description

These basic unary voxel functions can be used as VoxelFunc template parameter of the unary ForEachVoxel function templates as follows:

GreyImage image(attr);
// Clamp intensities such that they are in the range [0, 255]
UnaryVoxelFunction::Clamp clamp(0, 255);
ForEachVoxel(image, clamp);
// Determine intensity range of grayscale image
UnaryVoxelFunction::GetMinMax minmax;
ParallelForEachVoxel(image, minmax);
double min = minmax.GetMinAsDouble();
double max = minmax.GetMaxAsDouble();