|
Page 3 of 6
Another feature of this library, that is required for the oriented anisotropic Gaussian filtering, is the availability of routines that run 1D convolution along user-specified directions. The demanded filter width, the Sigma, needs to be adjusted in this case because the sampling unit changes. The unit length changes to the length of the direction-specifying vector as illustrated in the next image.
 The IIR Gaussian along the (2,1) direction, visualized with arrows, in the 2D image. Three applications of filter coefficients on the image is shown with pixels denoted with corresponding letters and indices.
We support the following configurations for the specification of a 1D convolution direction (currently, only 3D directions are supported):
- (x,1,0) with x being real number,
- (x,y,1) with x and y being real numbers,
- (x,y,z) with x,y and z being integers.
The disadvantage of the first two options is the fact that convolution may "fall off" the voxel grid when x or y is not integer. Under such circumstances, the linear, or bilinear, interpolations are used both for "reading" and "writing" values from and to the images. This introduces additional speed penalty as well as some loss of accuracy.
Last but not least, the following paradigms were kept in mind during the programming:
- utilize modern processors' pipeline processing by not putting if-statements inside loops,
- utilize the availability of n-way caches by accessing small memory amounts at small number of different physical addresses,
- disassemble the process of the whole image filtering and compute certain filtering stages in parallel,
- don't use assembler language and don't do low-level optimalizations in the code.
We believe that, by following these requirements, we can achieve a good performace on most of modern PC-based computers.
|