<<

Digital Comprehensive Summaries of Uppsala Dissertations from the Faculty of Science and Technology 1314

Image processing on optimal volume sampling lattices

Thinking outside the box

ELISABETH SCHOLD LINNÉR

ACTA UNIVERSITATIS UPSALIENSIS ISSN 1651-6214 ISBN 978-91-554-9406-3 UPPSALA urn:nbn:se:uu:diva-265340 2015 Dissertation presented at Uppsala University to be publicly examined in Pol2447, Informationsteknologiskt centrum (ITC), Lägerhyddsvägen 2, hus 2, Uppsala, Friday, 18 December 2015 at 10:00 for the degree of Doctor of Philosophy. The examination will be conducted in English. Faculty examiner: Professor Alexandre Falcão (Institute of Computing, University of Campinas, Brazil).

Abstract Schold Linnér, E. 2015. Image processing on optimal volume sampling lattices. Thinking outside the box. (Bildbehandling på optimala samplingsgitter. Att tänka utanför ramen). Digital Comprehensive Summaries of Uppsala Dissertations from the Faculty of Science and Technology 1314. 98 pp. Uppsala: Acta Universitatis Upsaliensis. ISBN 978-91-554-9406-3.

This thesis summarizes a series of studies of how image quality is affected by the choice of sampling pattern in 3D. Our comparison includes the Cartesian cubic (CC) lattice, the body- centered cubic (BCC) lattice, and the face-centered cubic (FCC) lattice. Our studies of the lattice Brillouin zones of lattices of equal density show that, while the CC lattice is suitable for functions with elongated spectra, the FCC lattice offers the least variation in resolution with respect to direction. The BCC lattice, however, offers the highest global cutoff frequency. The difference in behavior between the BCC and FCC lattices is negligible for a natural spectrum. We also present a study of pre-aliasing errors on anisotropic versions of the CC, BCC, and FCC sampling lattices, revealing that the optimal choice of sampling lattice is highly dependent on lattice orientation and anisotropy. We suggest a new reference function for studies of aliasing errors on alternative sampling lattices. This function has a spherical spectrum, and a frequency content proportional to the distance from the origin, facilitating studies of pre-aliasing in spatial domain. The accuracy of anti-aliased Euclidean distance transform is improved by application of more sofisticated methods for computing the sub-spel precision term. We find that both accuracy and precision are higher on the BCC and FCC lattices than on the CC lattice. We compare the performance of several intensity-weighted distance transforms on MRI data, and find that the derived segmentation result, with respect to relative error in segmented volume, depends neither on the sampling lattice, nor on the sampling density. Lastly, we present LatticeLibrary, a open source C++ library for processing of sampled data, supporting a number of common image processing methods for CC, BCC, and FCC lattices. We also introduce BccFccRaycaster, a tool for visualizing data sampled on CC, BCC, and FCC lattices. We believe that the work summarized in this thesis provide both the motivation and the tools for continuing research on application of the BCC and FCC lattices in image processing and analysis.

Keywords: BCC, FCC, aliasing, distance transform, segmentation

Elisabeth Schold Linnér, Department of Information Technology, Division of Visual Information and Interaction, Box 337, Uppsala University, SE-751 05 Uppsala, Sweden.

© Elisabeth Schold Linnér 2015

ISSN 1651-6214 ISBN 978-91-554-9406-3 urn:nbn:se:uu:diva-265340 (http://urn.kb.se/resolve?urn=urn:nbn:se:uu:diva-265340) Till min stora förvåning.

List of papers

This thesis is based on the following papers, which are referred to in the text by their Roman numerals.

I E. Linnér and R. Strand. Aliasing Properties of Voxels in Three-Dimensional Sampling Lattices. In Large Scale Scientific Computing, Sozopol, Bulgaria, I. Lirkov, S. Margenov, and J. Wasinewski´ (Eds.), Lecture Notes in Computer Science, 7116: pp 507–514, Jun. 2011. c 2012, Springer-Verlag Berlin Heidelberg

II E. Linnér and R. Strand. A Graph-Based Implementation of the Anti-Aliased Euclidean Distance Transform. In 22nd International Conference on Pattern Recognition (ICPR), Stockholm, Sweden: pp 1025-1030, Aug. 2014. c 2014 IEEE

III E. Linnér and R. Strand. Anti-Aliased Euclidean Distance Transform on 3D Sampling Lattices. In Discrete Geometry for Computer Imagery, E. Barcucci, A. Frosini, and S. Rinaldi (Eds.), Siena, Italy, Lecture Notes in Computer Science, 8668: pp 88-98, Sep. 2014. c 2014, Springer International Publishing Switzerland

IV E. Schold Linnér and R. Strand. Pre-aliasing and anisotropy on the CC, BCC, and FCC sampling lattices. Submitted for journal publication.

V E. Schold Linnér, J. Kullberg, and R. Strand. Fuzzy Segmentation of Synthetic and MRI Volume Data sampled on Optimal Lattices. Submitted journal for publication.

VI E. Schold Linnér, M. Morén, K.-O. Smed, J. Nysjö, and R. Strand. LatticeLibrary and BccFccRaycaster: Software for processing and viewing 3D data on optimal sampling lattices. Submitted for journal publication.

Reprints were made with permission from the publishers. All papers were researched and written under the supervision of R. Strand. The frequency domain study in Paper I was performed by R. Strand. In Paper V, planning and implementation were the work of E. Linnér, and data acquisi- tion was the joint work of E. Linnér and J. Kullberg. LatticeLibrary, published in Paper VI is the work of E. Linnér, while BccFccRaycaster is implemented by M. Morén and K.-O. Smed, under the supervision of E. Linnér and J. Nysjö. Related work

In addition to the papers included in this thesis, the author has also written or contributed to the following publications: • E. Linnér and R. Strand. Comparison of normalized convolution on square and Hexagonal grids. In Proceedings SSBA’11 Symposium on Image Analysis, Stockholm, Sweden, 2011. • E. Linnér and R. Strand. Comparison of restoration quality on square and hexagonal grids using normalized convolution. In 21st International Conference on Pattern Recognition (ICPR), Tsukuba, Japan: pp 3046- 3049, Nov. 2012. • R. Strand, F. Malmberg, P. K. Saha, and E. Linnér. The Minimum Barrier Distance - Stability to Seed Point Position. In Discrete Geometry for Computer Imagery, E. Barcucci, A. Frosini, and S. Rinaldi (Eds.), Siena, Italy, Lecture Notes in Computer Science, 8668: pp 111-121, Sep. 2014.

Contents

1 Initial remarks ...... 17

2 Introduction to computerized image processing and analysis ...... 19 2.1 Image pre-processing ...... 21 2.1.1 Convolutional filtering ...... 21 2.1.2 Filtering in frequency domain ...... 21 2.2 Image processing ...... 23 2.2.1 Image segmentation ...... 23 2.2.2 Distance transformation ...... 25 2.2.3 Registration ...... 28 2.3 Image analysis ...... 28

3 Sampling theory ...... 30 3.1 One-dimensional point-sampling ...... 30 3.2 Interpolation and super-sampling ...... 33 3.3 Sampling lattices ...... 35 3.4 Non-band-limited functions ...... 39 3.4.1 Studies in the frequency domain ...... 40 3.4.2 Studies in the spatial domain ...... 45 3.5 Anisotropic sampling ...... 48

4 Image acquisition on optimal sampling lattices ...... 52 4.1 Acquisition of 2D images ...... 52 4.1.1 Photography ...... 52 4.1.2 Sonography ...... 53 4.2 Acquisition of volume images ...... 54 4.2.1 Computed ...... 54 4.2.2 Emission Tomography ...... 57 4.2.3 Magnetic Resonance ...... 58 4.2.4 3D sonography ...... 60

5 Image processing and analysis on optimal sampling lattices ...... 61 5.1 Raster scanning ...... 62 5.2 Surface area of fuzzy binary objects ...... 63 5.3 Distance transforms and segmentation ...... 64 5.3.1 Wave-front propagation ...... 65 5.3.2 Improving the anti-aliased Euclidean distance transform ...... 66 5.3.3 Seeded segmentation on optimal lattices ...... 69 5.4 Fourier transform ...... 70 5.5 ...... 72 5.5.1 Interpolation ...... 72

6 Software ...... 74 6.1 LatticeLibrary ...... 74 6.2 BccFccRaycaster ...... 75

7 Future work ...... 77 7.1 Image processing and analysis ...... 77 7.1.1 Volume and area estimation ...... 77 7.1.2 Image registration ...... 77 7.1.3 Convolutional filtering ...... 78 7.2 Software ...... 78 7.2.1 LatticeLibrary ...... 78 7.2.2 BccFccRaycaster ...... 78 7.3 Image acquisition ...... 78

8 Concluding remarks ...... 79

9 Summary ...... 80 9.1 Computerized image processing and analysis ...... 80 9.2 The sampling process ...... 81

10 Sammanfattning ...... 85 10.1 Datoriserad bildbehandling och bildanalys ...... 86 10.2 Så fungerar sampling ...... 86

References ...... 93 List of Abbreviations

1D one dimension, one-dimensional 2D two dimensions, two-dimensional 3D three dimensions, three-dimensional AAE anti-aliased Euclidean AAEDT anti-aliased Euclidean distance transformation AvMBD approximated vectorial minimum barrier distance BCC body-centered cubic CC Cartesian cubic CT computed tomography DFT discrete Fourier transformation EDT Euclidean distance transformation FC fuzzy connectedness FCC face-centered cubic FD fuzzy distance FEM finite element methods FFT fast Fourier transformation GD geodesic distance MBD minimum barrier distance ML Marschner-Lobb MRI magnetic resonance imaging MSE mean square error

List of Symbols

A An adjacency relation, or the set of neighbors of a lattice point, not including the point itself.

ANneighbors An adjecency relation defining a neighborhood of size Nneighbors, or the set of neighbors of a lattice point, not including the point itself. Ndim cndim The ndim:th coefficient in a linear combination in R .

cnsuper A weight for a sub-spel sample point in supersampling. d(p1,p2) The distance between the points p1 and p2. dAAE(p1,p2) The anti-aliased Euclidean distance between the points p1 and p2. dE(p1,p2) The Euclidean distance between the points p1 and p2. ds The sub-spel precision term in AAEDT. D f The domain of the function f . N N D ˙ = x x R dim ,x = Vc , c Z dim , the domain of the fV { | 2 } 2 function f , discretized on L(V). ei, j An edge in a graph, connecting the points pi and p j. E The set of edges in a graph. N N ff: D f R dim R f R bands , a function in the spatial ✓ ! ✓ domain. f l A periodic 1D function, obtained by repeating part of f (x), so that f (x + l)= f (x). W f = f XW T , a periodic function obtained by replicating ⇤ T N N f , so that f (x W c)= f (x), x R dim , c Z dim . 2 2 f˙h A discretization by point-sampling of the 1D function f with a distance of h between any two consecutive sample points. f˙V A discretization by point-sampling of the function f on the lattice L(V). ˙ ˙ fh,Nsuper , fV,Nsuper Discretization by supersampling of the function f with step length h in 1D, or on L(V) i Ndim dimensions, using Nsuper sample points per Voronoi region. f¯ Nearest neighbor-interpolation of f˙. fˆ Linear interpolation of f˙. f˜ Higher order interpolation of f˙. 1 fh = f˙h fh = F h 1 . The reconstruction of f from f˙h. ⇤ u h F = F ( f ), the Fourier transform of f . 1 F h = F f˙h = F X 1 , the periodic spectrum of the discrete func- ⇤ h ˙ tion fh. V T F = F f˙V = F X T , the periodic spectrum of the discrete ⇤ V function f˙h. 1 0Fh, 0FW The main spectra of F h and FW , respectively. l F˙ 1 The discretized spectrum of the periodic function f . l W F˙W The discretized spectrum of the periodic function f . F Fourier transformation. h Step length in 1D. i Index in the spatial domain. j Secondary index in the spatial domain. k Index in the frequency domain. l Secondary index in the frequency domain. Nbands Number of color bands in an image. Ndim Number of dimensions. ndim Dimension index. Nelements The number of elements in a digital image. NFFT A factor of Nelements. An integer value leads to a fast FFT. NS Number of classes, or sets of seed points, in seeded segmentation. nS Index of a set of seed points. S Ns Number of seed points in the set S. S ns Index of a seed point in the set S. Nsuper Number of samples in each Voronoi region during supersampling. nsuper Index of sub-spel sample in supersampling. o Vector representing an orientation. p =(xp, f (xp)); a spatial element, with a set of coordinates Ndim xp D ˙ R ; and a (vector of) intensity value(s) f (xp) 2 fV ✓ 2 RNbands . P A set of spatial elements. r Radius. S A class, or set of seed points, in seeded segmentation. S The set of all classes, or sets of seed points, in seeded segmentation. s A seed point. u A point coordinate in the frequency domain. u =(u1,...,uNdim ); point coordinates in the frequency domain. U The Brillouin zone of the point u in the frequency domain. U0 The Brillouin zone centered at the origin of the frequency domain. V A generator matrix in the spatial domain. T V A periodization matrix in the frequency domain. v A primitive vector of a sampling lattice. W A generator matrix in the frequency domain. T W A periodization matrix in the spatial domain. x A point coordinate in the spatial domain. x =(x1,...,xNdim ); point coordinates in the spatial domain. X The Voronoi region of the point x in the spatial domain. y y : RNdim RNdim ; a transformation in the spatial domain. ! a The angle to the horizontal axis. G(P,E) The graph defined by the set of vertices P and the set of edges E. G(L(V),A) The lattice graph, with nodes corresponding to the lattice points of L(V), and edges corresponding to the adjacency relation A. d The Dirac delta function. e The relative error. hV The packing density of L(V); the portion of space that is cov- ered by the largest possible non-overlapping spheres centered at the points of L(V). l The width of a period in the 1D spatial domain. L(V) The lattice defined by the generator matrix V. µ Membership to a (class of ) object(s). x An arbitrary interpolant. P , =(p ,...,p ), p = p , p = p , p + A(p ); a path pstart pstop 1 NP 1 start NP stop i 1 2 i between the points pstart and pstop in a digital space.

Ppstart,pstop The set of all paths between the points pstart and pstop in a digital space. y A regularization function; defines the requirements on a transformation in the spatial domain. Y The image registration functional. rV The sampling density of L(V); the number of sample points per unit volume. fh The ideal low pass function, corresponding to a sampling rate of h, in the spatial domain. fV The ideal low pass function, corresponding to the sampling lattice L(V), in the spatial domain. F The volume of the spectrum of a function in 3D. w Sampling frequency. wh = 1/h; the sampling frequency of the 1D sampling function Xh. wcut-off The cut-off frequency of a 1D sampling lattice. global wcut-off The global cut-off frequency of an Ndim-dimensional sampling lattice. actual wcut-off The actual cut-off frequency of an Ndim-dimensional sampling lat- tice of inadequate density. N global Wcut-off = u R dim : u 2 < w , where 2 is the L2-norm; the { 2 | | cut-off} |·| hyperball of radius wcut-off, centered at the origin in the frequency domain.

Xh = Âi Z d(x ih), x,h R; the 1D Dirac comb with step length h. 2 2N N XV = Âd(x Vc), x R dim , c Z dim ; the Dirac comb with peaks 2 2 arranged in the pattern defined by L(V). Xh = 1 if x = ih, otherwise 0, x,h R, i Z; the 1D Kronecker 2 2 comb with step length h. N N XV = 1 if x = Vc, otherwise 0, x R dim , c Z dim ; the Kronecker 2 2 comb with peaks arranged in the pattern defined by L(V).

1 The ideal low pass function, corresponding to a sampling rate of u h h, in the frequency domain.

T The ideal low pass function, corresponding to the sampling lattice uV L(V), in the frequency domain. r = 1 h ; the redundancy of L(V). V V supp The support of a function. 1. Initial remarks

There are neither beginnings nor endings to the turning of the Wheel of Time. But it was a beginning. The Eye of the World by Robert Jordan

This thesis is part of a larger project, with the purpose of exploring image processing and analysis on optimal sampling lattices, where the term ’optimal’ refers to the minimization of redundancy, and is explained in detail in Chapter 3. It is preceded by the work presented in [82], which, in turn, was inspired by [76], and aims to show that image acquisition, processing, and analysis are indeed possible, and worthwhile, on the suggested sampling lattices. For the casual reader, the thesis is summarized in English in Chapter 9, and in Swedish in Chapter 10. For three-dimensional (3D) discrete data, there are, in practice, three pos- sible choices of sampling lattice: The Cartesian cubic (CC) lattice, the body- centered cubic (BCC) lattice, and the face-centered cubic (FCC) lattice. It has previously been shown, and is confirmed by the experiments described in this work, that the CC lattice is suboptimal with respect to spectrum preser- vation. Paper I presents a study of the abilities of the CC, BCC, and FCC lattices to capture the energy of a Gaussian spectrum, and suggests a synthetic function, with an infinite spherical spectrum and frequency contents propor- tional to the distance from the origin in the spatial domain, for studies of pre- aliasing errors in the spatial domain. Paper IV contains a thorough study of the Brillouin zones of the suggested sampling lattices, and explore the behav- ior of pre-aliasing errors on anisotropic lattices, that are common in computed tomography (CT) and magnetic resonance imaging (MRI). The results point toward the supremacy of the BCC and FCC lattices in terms of sampling effi- ciency, and are put into context in Chapter 3. While the CC lattice has lower sampling efficiency, its dimensional separa- bility makes it very attractive for algorithm development. In fact, many widely used processing methods, such as the fast Fourier transformation (FFT), rely on this property, that is not shared with the BCC and FCC lattices. Modern graph-based image processing methods, however, are lattice independent, and thus ideal for exploring image processing on alternative sampling lattices. The concept of treating digital images as graphs is described in Chapter 5, along

17 with a number of studies based on this approach. Paper III shows how the anti- aliased Euclidean distance transformation (AAEDT), adapted to a graph-based framework in Paper II, can be applied on BCC and FCC sampling lattices with better accuracy than on a CC lattice. In Paper V, we study the performance of seeded fuzzy segmentation methods on MRI data, resampled to CC, BCC, and FCC lattices of different resolution. We find that the accuracy of the seg- mentation result, in terms of segmented object volume, is equal for all lattices. However, as the accuracy does not seem to depend on the image resolution, this behavior is to be expected. While we have not yet attempted to acquire images directly on BCC or FCC lattices, Chapter 4 offers ideas on how a selection of common 3D image acquisition methods can be adapted for this purpose, as well as references to relevant studies. To lower the threshold for other researchers to continue our work, Paper VI presents open source software for image processing, analysis, and volume rendering on CC, BCC, and FCC sampling lattices. We hope that the work summarized in this thesis provide both the motivation and the tools for continuing research on application of the BCC and FCC lattices in image processing and analysis.

18 2. Introduction to computerized image processing and analysis

A picture is worth a thousand words. proverb of disputed origin

Recognizing objects in an image is easy for a human, but it is difficult to explain exactly how we do it. For example, it is simple for us to count the peppers in Figure 2.1. Using our knowledge of the general shape of a pepper, combined with our understanding of shadows and occlusion, we are able to compensate for the poor image contrast and quality, and determine where the border is between one pepper and the next. A computer, however, does not understand the concept of a pepper, or the physical environment that the pep- pers are in; it can only use image intensity to tell them apart. As we can see from the lower part of Figure 2.1, what is a clear border to us, is completely indistinguishable when removed from its physical context. Information on real world objects is made accessible to computers by sam- pling and discretizing the objects in question. Today, there is a multitude of digital image acquisition techniques, such as light detectors with different sen- sitivity ranges for 2D and 3D imaging, sonography, and MRI, all of which are described in Chapter 4, used to obtain information about various objects around and within us. In image processing and analysis, the goal is to enhance and extract information contained in image data. An image may be regarded as a function, Ndim Nbands f : D f ⊆ R → R f ⊆ R , for which f (x) is the image intensity at a point x ∈ D f , D f is the Ndim- dimensional domain of the function, and R f is its range in Nbands-dimensional color space, for example {0,1} for a single band binary image, as the one in Figure 2.2. A digitial image is made up of spatial elements (spels), commonly referred to as pixels in 2D, and voxels in 3D. A spel p consists of a location and an intensity value, p = xp, f (xp) , (2.1) and its shape is determined by the locations of the surrounding spels. The na- ture of spels is explained in detail in Chapter 3. Common tasks in image pro- cessing analysis involve, among others, recognizing, classifying, and counting

19 Figure 2.1. The edge between the two peppers is not easily detected by a computer.

objects and events. Such tasks are complicated for a computer, as it lacks cog- nitive skills. However, if properly programmed, it can perform repetitive tasks on large amounts of data much more efficiently and consistently than a human, freeing human workers for more cognition demanding work. In medicine, for example, automation of monotonous and uncomplicated tasks allows for hu- mans to focus on compiling facts into a medical diagnosis. Optimizing pro- cesses in this way makes them faster and more cost efficient, allowing more people to enjoy their benefits, such as health care.

111111

1 0 110 1

111111

1 0 110 1

110011

111111

Figure 2.2. An image can be seen as a function, f , where f (x) is the intensity at a point x. In this example, black and white correspond to the intensity values 0 and 1, respectively.

20 The following sections describe a selection of methods for image process- ing and analysis. The field is very broad, and still growing, but we will focus on the methods that form the basis of the studies included in this thesis.

2.1 Image pre-processing No image acquisition method is perfect. The imaging device may be poorly calibrated, or have a suboptimal sensitivity range, and the process undoubt- edly adds some measure of noise, or other disturbances, to the image data. The physical surroundings of the device and the imaged object, such as poor lighting conditions, may also influence the result. Imperfections like these are remedied by pre-processing of the image data. Pre-processing can also be used to highlight features of an image to facilitate further processing or analysis.

2.1.1 Convolutional filtering As the name suggests, this class of methods is based on the mathematical concept of convolution, defined as

( f1 ∗ f2)(x)= f1(x) f2(x − x)dx.

RNdim The input image is convolved with a template, defining some operation that is to be performed on each spel and its neighborhood. For example, the tem- plate may define a weighted average operation, as in Gaussian filtering, or a sequence operation, as in median filtering. Each spel of the output image is assigned the result obtained by application of this operation to the correspond- ing spel and its neighborhood in the input image. Convolutional filtering can be used for, among other things, noise reduction, first suggested for images in [68] and [39], blurring, the physical properties of which is derived in [51], and edge detection, as described in [69] and [26].

2.1.2 Filtering in frequency domain As explained earlier, it is difficult to interpret image data without cognitive skills. Analogously, there are other ways of organizing data that, although difficult for humans to interpret, make sense to a computer. For example, it is very common to perform image processing and analysis in frequency domain. Any signal, such as a sound, or an image, may be regarded as a sum of sine waves, as illustrated in Figure 2.3. The Fourier transformation F , defined as − π · F ( f )= f (x)e 2 ix udx,

RNdim

21 rearranges f , so that the magnitude of F = F ( f ) is the amplitude of the sine wave of a given frequency, called a frequency component, and the complex argument of F is the phase offset of that component. Figures 2.3a and 2.3b show the influence of phase offset on the compound function. Low frequency components correspond to large scale features of the image, such as illumi- nation of smooth areas, while the high frequency components correspond to small details and sharp edges. By suppressing the high frequencies (low-pass filtering), we blur the image, and by removing the low frequencies (high-pass filtering), we are left with the edges and details. Frequency-domain processing can also be used to easily remove noise of a specific frequency range, which is very difficult in spatial domain.

2 2 f ,f ,f f1,1 ,f 1,2 ,f 1,3 2,1 2,2 2,3 1 1

0 0 5 10 x 5 10 x -1 -1

-2 -2

(a) A set of sine functions. (b) A set of sine functions with the same frequencies as in Figure 2.3a, but differ- ent phase.

f2 2 f1 2

1 1

0 0 5 10 x 5 10 x -1 -1

-2 -2

(c) The sum of the sine functions in Fig- (d) The sum of the sine functions in Fig- ure 2.3a. ure 2.3b. Figure 2.3. Any function can be partitioned into a number of sine waves. The fre- quency, amplitude, and phase of each sine function are obtained through Fourier trans- formation.

22 2.2 Image processing After pre-processing, we often apply methods to facilitate analysis of the im- age data. We can, for example, find and isolate interesting parts of the image, identify corresponding parts of two or more different images, or manipulate characteristics of imaged objects.

2.2.1 Image segmentation Segmentation is the process of classifying spels into groups, so that the spels in each group share some property that the other ones lack. This can be used to, for example, separate different kinds of body tissue in medical images, or foreground objects from the image background in computer vision. Each spel is assigned a vector of membership values, μ = μ ,...,μ , μ ∈{ , }, |μ| = , 1 Nclasses 0 1 1 1 (2.2)

1 where |·|1 is the L -norm, and Nclasses is the number of classes of spels that we want to separate. The membership values can be determined in many different ways, using various features of spels and their neighborhoods. The following methods are suitable when objects and background can be assumed to differ in intensity.

Thresholding The most basic form of image segmentation is thresholding, in which all spels with intensity values below (or above) a certain threshold are set to some cho- sen value, while those with intensity values above (or below) the threshold are set to another value, or, in semi-thresholding, kept unchanged. The threshold can be chosen manually or automatically, often based on the image intensity histogram. Thresholding builds on the assumption that all objects are of ho- mogeneous intensity, that they differ in intensity from one another, and, if we want to be able to count the segmented objects, that objects of similar intensity do not overlap. If the first two conditions are met, each object class causes a mode in the intensity histogram. By fitting a (Gaussian) distribution to each mode, we can identify optimal thresholds for separating the distributions. As real objects are seldom homogeneous, automatic computation of local thresh- old values is common. This approach does not, however, solve the problem of separating overlapping or touching objects of similar intensity. Various thresholding methods are implemented and compared in [78].

Edge-based segmentation In cases where the imaged objects are not homogeneous in intensity, it may still be possible to identify intensity changes associated to edges, for example by convolution with an edge detection filter such as the ones referenced in

23 Section 2.1.1, and separate them from changes caused by object structure and illumination. The identified edge spels are connected, forming the contour of each object. Spels inside of a closed contour are classified as part of the same object, while those outside of the contour are classified as background, or belonging to another object. However, as shown earlier in Figure 2.1, it can be difficult to find the exact location of an edge. Common problems with edge-based segmentation methods include piece- wise disconnected object contours, detection of false edges, sometimes result- ing in spurs protruding from the contours, and detected contours being offset from the true object edges. If the approximate shape of an object is known, we can use an active contour model to avoid some of these problems. Active contour models, often called ’snakes’, were first introduced in [49]. The con- tour is initialized to some starting guess, and iteratively adjusted to fit around an object, using different image characteristics to guide the gradual adapta- tion. The result is a fully connected object contour, without spurs. It has high accuracy where the edge is clearly visible, and is approximated, based on pa- rameters for allowed curvature and tolerance, where no clear edge is detected. The quality of the result is highly dependent on the tuning of the parameters, and the complexity of the object shape and intensity texture.

Region-based segmentation The difficulties of edge detection can be avoided by using a region-based seg- mentation method. Starting from an initial guess, for example, all (or no) spels being part of the same object, image regions are merged or split until all re- gions meet some criterion of homogeneity. The method was first applied to images in [9]. Unfortunately, this approach often results in the wrong number of regions being detected, referred to as over- or undersegmentation. Another popular region-based segmentation method is the watershed meth- od, first described in [3]. Treating the intensity function as a height , it associates every spel to a valley, or catchment basin, where a stream of water would end up if flowing from that spel. The spels located on ridges of (2.1) make up the edges between the detected objects. Watershed segmentation is useful when there is a correlation between image edges and intensity. Such a correlation can be artificially produced by application of, for example, a convolutional edge detection filter.

Seeded segmentation In some applications, it is possible to choose a set of seed points, S = { ,..., } s1 sNS , for each class that we want to be able to recognize. This task can be performed by a user, or by a pre-processing algorithm. For every spel p in the image, we calculate a value denoted

( , ), ∈ , = ,..., , d snS p snS Snclasses nclasses 1 Nclasses

24 based on some measure of distance or connectivity, where Nclasses is the num- ber of classes to be separated. The spel is assigned a membership value for each class, 1if∃s ∈S so that d(smin,p) < d(s,p)∀ ∈ \ μ = min nclasses s S Snclasses nclasses 0 otherwise, where S is the set of all sets of seed points. An overview of seeded seg- mentation methods can be found in [17]. In this thesis, we focus on meth- ods based on distance transformations, the concept of which is explained in Section 2.2.2. Seeded segmentation is useful for complex objects and uneven lighting conditions. It can also be applied interactively, as in the tool described in [56].

Fuzzy segmentation The definition in (2.2) is valid for crisp segmentation, where each spel is as- sumed to be a member of only one class. Fuzzy segmentation methods, how- ever, allow μ to take on a value anywhere in the range [0,1], for example if a border between two or more objects is located somewhere inside of the region represented by the spel. Fuzzy segmentation can be based on the same mea- sures of connectivity that are used for seeded crisp segmentation, as shown in, for example, [55]. When μ is proportional to the portion of the spel that belongs to a certain class, it is sometimes referred to as a coverage value. It is shown in, for example, [80], that coverage-based representations of binary objects preserve information about the shape of the object on a sub-spel level. As an example, the two shapes in Figure 2.4a and 2.4b have identical crisp representations, while the fuzzy representations are clearly distinguishable.

The connectivity paradox Even given a perfect criterion for separating two classes of objects from each other, a segmented image may be difficult to interpret. The four spels in the center of the image in Figure 2.5 present a problem, as it is physically impos- sible for both the black spels and the white spels to be connected, or discon- nected, simultaneously. As a result, connectivity must be defined differently for the image foreground and background. This is known as the connectivity paradox, and we will return to it in Chapter 5.

2.2.2 Distance transformation A distance transformation computes the distance from every spel p to a seed point s, or set of seed points S, in the image. The result is a distance map f˙d, for which f˙d(xp) is proportional to the shortest distance from p to s,or S. Distance transformations are based on distance measures, similar to the connectivity measures for seeded segmentations in Section 2.2.1. Distance

25 (a) A crisp circle. (b) A crisp square.

(c) A fuzzy circle. (d) A fuzzy square. Figure 2.4. Fuzzy representations of binary objects preserve information on a sub-spel level. measures can be defined using the location of p, as well as other properties, and serve as a basis for a large variety of applications. For example, pure spa- tial distance transformations are used for, among other things, skeletonization and reconstruction, as suggested in [4], path finding, as in [47], and image registration, for instance in [6]. As we just mentioned, distance in digital images may be defined in several ways. The Euclidean distance, Ndim ( , )= ( − )2, dE p1 p2 ∑ xp1,i xp2,i i=1

RNdim is the length of the straight line connecting the points xp1 and xp2 in . Distance transformations were first applied to binary digital images in [72], in the form of operators inspired by the Minkowski distance and Chebyshev dis- tance, commonly known as the city block and chessboard distances, demon- strated in Figure 2.6. The rotational dependencies of these distance measures can be remedied, to some extent, by adding weight coefficients for different directions to the operators. The optimal weights for 2D images are derived in [5], and for 3D images in [7].

26 (a) One object, using 4-connectivity for (b) Two different objects, using 8- the foreground. connectivity for the foreground. Figure 2.5. Image foreground and background need to be defined using different con- nectivity. This is referred to as the connectivity paradox.

(a) The city block distance. (b) The chessboard distance. Figure 2.6. The distance from the image center, computed using the operators sug- gested in [72]. A high intensity value, equivalent to a bright shade in the image, corresponds to a large distance.

By computing the vector pointing from each spel to the nearest seed point, instead of the scalar distance, even higher accuracy is obtained. This approach is explored in, for example, [66], and [70].

The anti-aliased Euclidean distance transformation Euclidean distance transformation using vector propagation has the potential to yield the exact value of dE(xp,xs). However, the digital image is merely an approximation of a continuous object, the edge of which is unlikely to intersect any spel s exactly at xs. Thus, the result is not the shortest distance from a spel p to the imaged object, but to the nearest object spel. As mentioned in Section 2.2.1, fuzzy segmentation of binary objects allows us to preserve some information of sub-spel resolution. The anti-aliased Euclidean distance transformation, introduced in [42], and further developed in Paper II, utilizes this information to produce results of even higher accuracy, assuming that the

27 object border is sufficiently smooth. It is defined as

dAAE(p,s)=dE(xp,xs)+ds( f (xs)), where ds( f (xs)) is a sub-spel precision term, based on the coverage value of s, as shown in Figure 2.7.

d (x ,x ) p E p s

s ds (f(x s))

Figure 2.7. The anti-aliased Euclidean distance transformation is the sum of the dis- tance between p and s, and a sub-spel precision term, computed from f (xs).

2.2.3 Registration

Image registration is the process of transforming a template image fT so that some of its features are aligned with features of a reference image fR. That is, we want to find a transform y : RNdim → RNdim that minimizes the functional Ψ(y)=d fT (y), fR + ψ(y), (2.3) where d ( fT (y), fR) is some measure of distance or dissimilarity, and ψ (y) is a regularization term, limiting the possible choices of transformations to what is considered reasonable for the particular application. It is used, for example, to combine medical scans of different modalities to obtain more information of the condition of a patient, or to compare images of different patients. The variational approach to image registration is described in detail in [63]. In practice, (2.3) is often solved iteratively. We begin by choosing a suitable measure of dissimilarity, either for the entire image, or for a set of landmarks. We use ψ to establish restrictions for y, for example, only allowing affine transformations. After initializing y to some starting guess, we also need to decide how it should be adjusted between iterations. In each iteration, the tem- plate image is transformed, interpolated and resampled, and then compared to the reference image. Involving all of the mentioned steps, image registration is a very good example of the complexity of many image processing methods.

2.3 Image analysis Image analysis refers to the act of extracting meaningful information from an image. As mentioned in the introduction of this chapter, the lack of cogni-

28 tive skills in computers turns computerized image analysis into a challenge, but much is to be gained from automation in terms of speed and consistency. Computerized image analysis is used in a growing range of applications, such as reading the license plate of cars at a road toll. In this example, the first step is to decide whether there is a car in the image. As the camera is most probably stationary, it has a constant view of the road and other surroundings. By comparing these constant features to the captured images, the computer can decide whether a moving object has entered the field of view. Image seg- mentation can be applied to tell the moving objects apart, in case there is more than one. Objects of a certain size, located in the part of the image that repre- sents the road, are likely to be cars. The region of interest, which is the license plate, is usually a bright rectangle of known proportions, located somewhere at the front of the car. Objects of known shape can be found through, for ex- ample, the Hough transformation, introduced in [44]. Once the license plate is isolated, the letters and digits, generally in the form of dark objects on a bright background, are segmented. Each segmented object is either a letter or a digit, resulting in a finite, and relatively small, number of alternatives, and the characters can be identified through, for instance, template matching. Image analysis is also employed in medicine, for example in assessment of cancer tumors. As explained in [14], tumor volume and surface area are important elements in cancer diagnostics. The first challenge in computing these characteristics is, naturally, to segment the tumor from the surrounding tissue. Seeded segmentation and active contour models are common in ap- plications for classifying different tissue types, such as [56]. The volume of the segmented object can be estimated by counting the object spels, using μ as weights in the case of fuzzy segmentation. Surface area is often computed from local estimations of the edge orientation, as in, for example, [15], [95], and [100]. A semi-local method is suggested in [81], while a global approach is used in [54]. Surface area estimation of fuzzy binary objects is approached in [79], and further explored in [80] and [53], offering a prospect of even higher accuracy. License plate recognition is an example of a repetitive task that can be per- formed more efficiently by a computer than by a human, while tumor volume and surface area estimation belong to the group of tasks where consistency is of utmost importance. Other application areas are, for example, to enable automatic operations in environments that are hostile to humans, and, not to be underestimated, entertainment.

29 3. Sampling theory

Never trust an atom, they make up everything! unknown wisecracker

We should always remember that it is generally not knowledge of the prop- erties of the image data that is desired, but of the imaged object. Image pro- cessing and analysis are applied under the assumption that the data are an ap- propriate representation of this object. Whether they actually are, is a question of how the object is sampled during the image acquisition process.

3.1 One-dimensional point-sampling In its most basic form, sometimes referred to as ideal sampling, the sampling procedure consists of the multiplication of a continuous input function f and a Dirac comb, Xh(x)=∑ δ (x − ih),h ∈ R, i∈Z referred to as a sampling function, with the sampling frequency

ω = 1. h h The result of the multiplication is the function

f˙h = f Xh (3.1) shown in Figure 3.1. The impulse center points, where x = ih, are denoted {xi}. Depending on the relationship between ωh and the frequency content of f , corresponding to the level of detail, f˙ may be used as a representation of the original function. If ωh is high enough, f is completely recoverable from f˙h. To study the frequency content of f , we need to transform (3.1) to the frequency domain. The Fourier transform of the sampling function Xh is another Dirac comb, 1 k F (Xh)= X 1 (u)= ∑ δ u − ,h ∈ R, (3.2) h h k∈Z h

30 h

f fh

x h x h x

(a) An input function f . (b) A sampling function (c) The sampled function Xh. f˙h.

Figure 3.1. The input function f is multiplied with a sampling function Xh, resulting in a sampled function f˙h.

and the Fourier transform of f˙h is thus

1 F ( f˙h)=F ( f Xh)=F ∗ X 1 = F h , h where ∗ denotes convolution, and F is the Fourier transform of the original 1 function f . The result, F h , is continuous and periodic with the same frequency as X 1 . The period centered at the origin, which is highlighted in Figure 3.2b, h 0 1 is referred to as F h . We use {uk} to denote the points u = k/h,k ∈ Z,h ∈ R, and define the Brillouin zones Uk = u ∈ R : |u − uk| < |u − ul|,k = l,∀l =k, k,l ∈ Z . We also define the ideal low pass function 1ifu ∈ U0  1 (u)= h 0 otherwise, with the Fourier transform −1 x φh(x)=F ( 1 )=sinc . h h Provided that the original function f is sufficiently band-limited, that is,

0 1 0 1 0 1 F h  1 ≡ F h ⇐⇒ supp( F h ) ⊆ U0, (3.3) h it can be restored as f = f˙h ∗ φh. This is illustrated in Figure 3.2. However, if (3.3) is not fulfilled, f cannot be restored, but is subject to pre-aliasing, as can be seen in Figure 3.3. As mentioned in Section 2.1.2, image data can also be acquired and pro- cessed in the frequency domain, calling for a discretizable impulse represen- 1 tation of F h as well. As we have seen, the sample pattern in one domain is

31 1 1 0 h 1 Fh F h

1 u 1 u h h

U-2 U-1 U0 U1 U2

X 1 (a) The Fourier transform of h, with (b) The periodic function F h , which is ω the frequency h and the Brillouin the result of (3.1) in the frequency do- zones Uk. main.

F 1 1 1 h hx olh

u x f supp(F) 1 h h h

(c) The Fourier transform (d) The ideal low-pass (e) The function is re- φ 1 F of f , and the ideal low- function h in the spatial stored by F h = f˙h ∗ φh.  pass function 1 . domain. Here, ωh is high enough h 1 to yield F h = f .

0 1 Figure 3.2. When ωh is high enough, F h can be isolated, and the input function f can be restored from f˙h. connected to the periodicity in the other. Thus, we need a periodic function in the spatial domain to obtain a discrete function in the frequency domain. Assuming that f has finite support,

supp( f ) ⊆ [xmin,xmax], we can produce the periodic function λ f (x) if x ∈ [xmin,xmax) f (x)= f (x + iλ), x + iλ ∈ [xmin,xmax), i ∈ Z, λ = xmax − xmin otherwise, which can be Fourier transformed to λ F f = FX 1 = F˙ 1 . λ λ Hence, we have 1 ˙ h = F ˙λ . F1 fh (3.4) λ A function that is periodic in both the spatial and the frequency domain is also naturally made up of a set of impulses in both domains, and may easily be represented as a digital image.

32 1 F h 1 fh f =f 1 h1

x u x h1 1 h1

( ) ⊆ (a) The sampled function (b) As supp F U0, (c) The result, fh1 , con- 1 f˙ . 0 tains the exact same fre- h1 F h1 can be isolated, and the frequency content of f quency components as f , is preserved. which is thus perfectly re- stored.

1 F h2

f x h2 h2 x

x u f h2 aliasing 1 h2 h2

(d) The sampled function (e) The frequency spec- (f) The result, fh2 , is sub- ˙ fh2 . trum of the input func- ject to pre-aliasing, and tion does not fit into U0, is not equal to the input 1 and 0F h2 cannot be iso- function f . lated. The overlap be- tween subsequent periods 1 of F h2 distorts the fre- quency components. Figure 3.3. When the sampling frequency is too low, the input function f cannot be ˙ recovered from fh2 .

3.2 Interpolation and super-sampling In a digital framework, the Dirac comb collapses to the piece-wise non-zero Kronecker comb, 1ifx = ih, i ∈ Z X (x)= h 0 otherwise, and f˙h becomes f (x) if x = ih, i ∈ Z f˙ (x)= f (x)X (x)= h h 0 otherwise. This discrete function is non-zero only precisely at the sample points, which do not have any extension in space. This is inconvenient for processing, anal-

33 ysis and purposes. To mimic the continuous properties of the original function f , we usually approximate the intermediate values in some way. Defining the Voronoi regions, Xi = x ∈ R : |x − xi| < |x − x j|, ∀ j =i,i, j ∈ Z , which are what we usually perceive as the image spels, and assuming that ∀ , ( ) ≈ ˙ ( ), x∈Xi f x fh xi (3.5) we define the piece-wise constant function ∀ , ¯( )= ˙ ( ), x∈Xi f x fh xi (3.6) commonly referred to as the nearest neighbor interpolation of f˙h. This kind of interpolation is often used for displaying purposes, as well as for crisp im- age processing methods. In an attempt to reach sub-spel precision, it is also possible to use linear interpolation,

f˙h(xi+1) − f˙h(xi) ∀ ∈[ , ), fˆ(x)= f˙ (x )+ d(x ,x), (3.7) x xi xi+1 h i h i where d(xi,x)=x − xi, or some other kind of interpolation, defined by ∀ , ˜( )= ˙ ( )+ξ , , ( ), ˙ , x∈[xi,xi+1) f x fh xi x xi A xi fh (3.8) where ξ x,xi,A(xi), f˙h is the interpolant, and A(xi) is some neighborhood of the point xi. Examples of interpolated data are shown in Figure 3.4.

hf hf

hf hx h x hx

(a) Nearest neighbor in- (b) Linear interpolation. (c) Higher order interpo- terpolation. lation. Figure 3.4. Examples of interpolated data.

If pre-aliasing is present in the sampled data, approximations such as (3.6), (3.7) and (3.8) result in small details being either smudged or enhanced, po- tentially causing large deviations from f . One way to prevent this is super- sampling. After defining the Voronoi regions Xi, Nsuper samples are taken from each region, and the intensity at xi is computed as the, sometimes weighted,

34 average intensity of all the taken samples, expressed as ⎧ ⎪ Nsuper ⎨ ( ), ∈ = , ∑cnsuper f xnsuper xnsuper Xi if x xi f˙ , (x )= = h Nsuper i ⎪ nsuper 1 ⎩⎪ 0 otherwise. ˙ The original function f cannot be restored from fh,Nsuper , but (3.6), (3.7) and ˙ (3.8) may result in more useful approximations of f if fh,Nsuper is used as input rather than f˙h, as seen in Figure 3.5. This is also a suitable method for obtain- ing coverage values for fuzzy representations of binary objects, as mentioned in Sections 2.2.1 and 2.2.2.

fh f f

x x fh

(a) Point-sampled function f˙h. (b) Interpolated function f¯h, and the original function.

f f h,Nsuper f

f x x h,Nsuper

˙ ¯ (c) super-sampled function fh,Nsuper . (d) Interpolated function fh,Nsuper , and the original function. Figure 3.5. When pre-aliasing is present, super-sampling may lead to more useful ¯ approximations of f than point-sampling. Here, fh,Nsuper differ less from the original f than f¯h.

3.3 Sampling lattices The pattern in which the sample points are distributed in RNdim , is called a sampling lattice, and can be defined by an Ndim ×Ndim generator matrix, V.In 1D, the 1 × 1 generator matrix,   Vh = h ,

35 contains the distance between the sample points. In Ndim dimensions, the gen- erator matrix consists of Ndim vectors, ⎡ ⎤ || = ⎣ ... ⎦ , V v1 vNdim || Ndim×Ndim called primitive vectors, that form a basis in RNdim . The sampling lattice de- fined by V is referred to as Λ(V). All sample points in Λ(V) are located at { } integer-coefficient linear combinations of the vectors vndim , in the pattern of the Ndim-dimensional Kronecker comb, ⎧ ⎪ Ndim ⎨ ∃ = 1ifc∈ZNdim so that x ∑cndim vndim X (x)= = V ⎩⎪ ndim 1 0 otherwise, with the Voronoi regions Ndim Xk = x ∈ R : |x − xi|2 < |x − x j|2,∀ j =i, i, j ∈ Z , 2 where |·|2 is the L norm. The multidimensional equivalent of the sampling frequency of Λ(V) is the sampling density ρV , the number of sample points per unit volume, which is computed as

ρV = |V|, where |·|denotes the matrix determinant. The frequency spectrum of a function that is sampled on Λ(V) is replicated on the dual lattice, defined by V −T , with the Brillouin zones Ndim Uk = u ∈ R : |u − uk|2 < |u − ul|2,∀l =k, k,l ∈ Z . The multidimensional equivalent of (3.4) is − − ˙V T = F ˙W T , FW fV where V and W are the generator matrices of the sampling lattices in the spatial and the frequency domain, respectively. As in Section 3.1, pre-aliasing is avoided as long as

supp(F) ⊆ U0. Here, we have to bear in mind that the concepts of function bandwith and pre- aliasing are more complex than in the 1D case. As an example, we use the square sampling lattice, which is the de facto standard sampling lattice in 2D. The generator matrix of this lattice,   10 V = h , square 01

36 results in square, h × h, Voronoi regions, as shown in Figure 3.6a. If f is dis- Λ( ) Λ( −T ) −T = 1 crete on Vsquare , F is periodic on Vsquare , where Vsquare h2 Vsquare, and 1 × 1 U0 is a h h square, centered at the origin in the frequency domain, as in Fig- ure 3.6b. The cut-off frequency along a direction in the image is determined by the extent of U in that direction. If α is the angle to the horizontal axis, the 0 π n cut-off frequency along α = nπ/2, where n ∈ Z,isω 2 = 1(2h). However, π cut-off√ α = π/ ω 4 = /( ) the cut-off frequency along 4is cut-off 1 2h . This means that pre-aliasing occurs for different frequency components of f , or that the reso- lution of the lattice varies, along different directions within the image. Image analysis can be performed on f˙h only up to the resolution corresponding to ωglobal = ωα . cut-off min cut-off α∈[0,2π)

Higher frequency components represent object details that may or may not be captured by f˙h, depending on their orientation relative to Λ(V), and f˙h is thus not an accurate representation of the imaged object at the corresponding resolution. Fine object details that are present in f˙h, despite corresponding to ωglobal frequencies higher than cut-off, are therefore considered to be redundant in- formation. The percentage of useful information captured by Λ(V) is referred to as the packing density, and computed as du Ω cut-off ηV = , du U0 Ω ωglobal where cut-off is a hyper-ball, in this case a disk, of radius cut-off, centered at the origin in the frequency domain. The associated redundancy is r = − η . V 1 V (3.9) This is illustrated in Figure 3.6c. The term packing density refers to the fact −T that the maximum ηV is obtained by designing V corresponding to the so- lution of the Ndim-dimensional sphere packing problem, generally considered to be proven in [43]. Maximizing ηV means that the number of sample points needed to accurately represent f is minimized, reducing both memory usage η ≈ . and processing time. For the square sampling lattice, Vsquare 0 79. The 2D sphere-packing problem is solved by the hexagonal sampling lattice, with the generator matrix   h 21 V = √ , hexagon 2 0 3 η ≈ . and the packing density Vhexagon 0 83. The hexagonal lattice is shown in the lower half of Figure 3.6. Provided that the input function f is isotropically

37 band-limited, meaning that

∃ ( ) ⊆ Ω , ωcut-off so that supp F cut-off it can be fully represented on a hexagonal sampling lattice using ∼ 14% less sample points than required by the sparsest possible square lattice, as stated in [31].

h2 u2 u2

1 1 -1 h v1 h global cut-off x v2 v-1 v1 2

x h1 1 u1 1 u1 h h

(a) Square lattice in the (b) Square lattice in the (c) Global cut-off fre- spatial domain. frequency domain quency for a square sam- pling lattice.

h2 u2 u2

1 -1 1 h v1 h -1 global v2 cut-off x v2 v1

x h1 1 u1 1 u1 h h

(d) Hexagonal lattice in (e) Hexagonal lattice in (f) Global cut-off fre- the spatial domain. the frequency domain quency for a hexagonal sampling lattice. Figure 3.6. Voronoi regions in the spatial and the frequency domain for square and hexagonal sampling lattices.

In 3D imaging, the most common sampling lattice is the CC lattice, with η ≈ . VCC 0 52. Among the solutions to the 3D sphere-packing problem is the FCC sampling lattice, whose dual, the BCC lattice, with ηV BCC ≈ 0.74, can represent a band-limited function using ∼ 30% less sample points than the CC lattice, as shown in [31]. The FCC sampling lattice has a packing density η ≈ . η of VFCC 0 68, which is also considerably higher than VCC . The generator

38 matrices of the CC, FCC, and BCC lattices are ⎡ ⎤ 100 ⎣ ⎦ VCC = hCC 010, 001 ⎡ ⎤ 011 ⎣ ⎦ VFCC = hFCC 101, 110 ⎡ ⎤ 1 −1 −1 ⎣ ⎦ VBCC = hBCC −11−1 , −1 −11 respectively, their Voronoi regions are shown in Figure 3.7, and their Brillouin zones in Figure 3.8.

(a) A cube (CC). (b) A truncated octahe- (c) A rhombic dodecahe- dron (BCC). dron (FCC). Figure 3.7. The Voronoi regions for the CC, FCC and BCC lattices, respectively.

(a) A cube (CC). (b) A rhombic dodecahe- (c) A truncated octahe- dron (BCC). dron (FCC). Figure 3.8. The Brillouin zones for the CC, FCC and BCC lattices, respectively.

3.4 Non-band-limited functions The reasoning in Section 3.3 is valid for all band-limited functions, but im- ages of natural objects are rarely band-limited. Sharp edges and fine details are abundant, and the spectra of functions describing them are unbounded. As there is, in general, no reason to expect that details and edges occur more fre- quently in any particular orientation, we can assume that these components ex-

39 ist in all directions, making the frequency spectrum spherical in nature. There- fore, studies of pre-aliasing errors, which may be carried out in the spatial do- main as well as in the frequency domain, often use functions with spherical frequency spectra. Examples of such studies are presented in Papers IV and IV, the results of which are put into context in this section.

3.4.1 Studies in the frequency domain The magnitude of the frequency components of a natural frequency spectrum is often larger close to the origin, similarly to a Gaussian distribution. For this reason, a Gaussian function may serve as a synthetic frequency spectrum. However, to avoid making assumptions about the importance of different fre- quency components, a hyper-ball is also a reasonable choice. Identical hyper- balls with center-points located on the lattice points of Λ(V −T ) can be used to represent the replicated spectrum of the sampled function f˙V . By increas- ing the hyper-ball radius, we can study the behavior of the pre-aliasing errors for functions of increasing band-width. As the spectra outgrow the Brillouin zones, they begin to overlap. The frequency components in the overlapping parts are then corrupted by pre-aliasing errors, in the same way as illustrated for 1D functions in Figure 3.3. As the pre-aliasing effect spreads to lower frequencies, the corresponding level of resolution loses its value for image analysis purposes. The highest frequency that is still reliably captured in all ωactual directions, denoted cut-off, is given by the shortest distance from the origin to the surface of the nearest pre-aliasing spectrum. All frequency components Ωactual ωactual outside of cut-off‚ the hyper-ball of radius cut-off, may be considered redun- dant, and the actual packing density of the lattice is given by du Ωactual ηactual =cut-off . V du

U0

ηactual The variation in V , with respect to the spectrum radius, is shown for CC, BCC, and FCC sampling lattices of equal sampling density in Figure 3.9, fea- tured in Paper IV. For functions of small bandwidths, all lattices capture the full frequency spectrum. For larger band-widths, the CC lattice is the most prone to pre-aliasing, while the BCC lattice reaches the highest packing den- sity. Referring to the volume of F as Φ, we investigate the behavior of the pre- − Φ \ Ωactual ΦV T aliasing errors in cut-off. We use overlap to denote the combined volume −T of the overlap of 0FV and the aliasing spectra, which indicates the total amount of pre-aliasing that is present in the sampled function. The volume of

40 actual V

0.8

FCC 0.6 BCC

0.4 CC

0.2

0 0 0.5 1 spectrum radius Figure 3.9. The actual packing densities for CC, BCC and FCC lattices, normalized so that ρCC = ρBCC = ρFCC = 1, for an isotropic band-limited function of increasing band-width. For reference, the radius of a sphere of unit volume, equal to the volume of the Brillouin zones, is approximately 0.62.

−T the part of 0FV that does not overlap with any aliasing spectrum is denoted − ΦV T unaffected, and represents the part of the frequency content of f that is faith- − ˙ ΦV T fully captured by fV . As pointed out in the study presented in [92], overlap for a given spectrum radius r is easily obtained analytically as − π 3 ( , )2 ΦV T ( )= 4 r − π ( , ) 2 − dE u 0 , overlap F ∑ dE u 0 r (3.10) u∈A(0) 3 12 where dE(u,0) is the distance between the origin and the aliasing spectrum − ΦV T centered at u. There is no equally simple expression for unaffected, and so we use Monte Carlo simulation to reproduce the results from [92]. From Fig- ure 3.10a, we see that the CC sampling lattice results in the most spectrum overlap up to a certain point, where both the BCC and FCC lattices temporar- ily overtake it. However, this is after the point where the combined spectrum overlap is larger than Φ itself, indicating that most of F is already corrupted by pre-aliasing regardless of the choice of sampling lattice. The BCC and FCC lattices are very close in terms of spectrum overlap for realistic values of r, with the BCC lattice being somewhat preferable for smaller spectrum radii. − ΦV T With respect to unaffected, the CC sampling lattice is clearly the worst choice regardless of the spectrum radius. Again, the performances of the BCC and FCC lattices are very similar, with the BCC lattice being a somewhat better choice for most spectrum radii. The results visualized in Figure 3.10 should always be considered in com- bination with those shown in Figure 3.9. It is important to keep in mind that

41 V-T V-T unaffected unaffected

0.8 FCC 5

4 0.6 BCC 3 0.4 FCC CC 2 0.2 1 BCC CC 0 0 0.5 0.6 0.7 0.8 0.9 11.1 0.5 0.6 0.7 0.8 0.9 11.1 spectrum radius spectrum radius − − ΦV T ΦV T (a) Spectrum overlap, overlap, versus (b) Spectrum preservation, unaffected, spectrum radius. The results are ob- versus spectrum radius. The results tained by analytical solution of (3.10). are obtained by Monte Carlo simulation with a tolerance of 10−3. Figure 3.10. Spectrum overlap and preservation on the CC, BCC, and FCC sampling lattices. if F is indeed spherical, details corresponding to frequency components in − ΦV T \ Ωactual unaffected cut-off are only uncorrupted in some directions, and unreliable from an image analysis . If, however, F is not spherical, the re- sults in Figure 3.10 may provide an indication as to the chances of aligning the function spectrum with the Brillouin zone of a lattice. Paper IV presents a thorough study of the directional dependence of the res- olution of CC, BCC, and FCC sampling lattices, based on the shape of their Brillouin zones. Figure 3.11 shows the extensions of the Brillouin zones in different directions, proportional to the resolution at the corresponding angles. A summary is shown in Figure 3.12. Just like Figure 3.10, these plots pro- vide useful information in case we are interested in aligning a non-spherical spectrum with the Brillouin zone of a sampling lattice. We see that for elon- gated spectra, the CC lattice is the best choice, as it extends the farthest from the origin. It does, however, provide the least even resolution, as the distance between the main spectrum and the closest aliasing spectra is relatively short. ωglobal Although the BCC lattice has the highest cut-off, the Brillouin zone of the FCC lattice seems to be more spherical, as its extension in different directions is distributed within a shorter interval. However, the compactness of the first three quartiles in the BCC spectrum extension distribution seem to compen- sate for the elongated fourth quartile, resulting in the low redundancy given earlier by (3.9). The Fourier slice theorem, presented in [8], states that the Fourier trans- form of a cross-section of the frequency spectrum of a function corresponds

42        z z z

xyxyxy

(a) CC spectrum (b) BCC spectrum (c) FCC spectrum Figure 3.11. Brillouin zone extension in different directions. The CC, BCC and FCC Brillouin zones are normalized to unit volume.

CC BCC FCC

length 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7

Figure 3.12. Distribution of Brillouin zone extension, measured in different directions. The whiskers mark the minimum and maximum for each Brillouin zone, and the box marks the first, second and third quartiles. to a projection along its normal in the spatial domain. The shape and area of such a cross section are thus indicators of the resolution in different direc- tions of this projection; a large area means that many frequency components are present, and the shape tells us the distribution of their orientations. Fig- ure 3.13 shows the cross-section area with respect to normal orientation, and Figure 3.14 provides a summary of the same values. We observe that the cross- section area of the CC lattice Brillouin zone varies in a wider range than that of the BCC and FCC lattices, indicating that the frequency spectrum must be carefully aligned with the Brillouin zone for a good result. The BCC and FCC lattices are clearly more symmetric in this sense, with the BCC lattice yielding smaller minimum and maximum areas, but a larger median area, than the FCC lattice. As mentioned in the beginning of this section, natural spectra can be ap- proximated by Gaussian distributions. In Paper I, and in [83], similar mea- surements as the ones presented in Figures 3.11, 3.12, 3.13, and 3.14 are per- formed on −( , ) f (x)=e x x , (3.11) where (·,·) is the standard scalar product. The amount of pre-aliasing present in a sampled function, denoted εpre-aliasing, is approximated by the difference in energy between the original function f and the reconstructed function fV ,

43   z z z

xyxyxy

(a) CC spectrum (b) BCC spectrum (c) FCC spectrum Figure 3.13. Area of Brillouin zone cross section to normal direction. The CC, BCC and FCC Brillouin zones are normalized to unit volume.

CC BCC FCC

area 1.0 1.1 1.2 1.3 1.4

Figure 3.14. Distribution of Brillouin zone cross section area, measured in different directions. The whiskers mark the minimum and maximum for each Brillouin zone, and the box marks the first, second and third quartiles. and computed as    2  fV (x) dx 2 RN ε = 1 − dim   , pre-aliasing  2  f (x) dx 2 RNdim 2 where |·|2 denotes the L -norm. The Plancherel theorem, derived in, for ex- ample, [33], states that the L2-norm of a function is preserved by the Fourier transform, so that     2  − 2   V T ( ) F fV (x)  dx F x  du 2 2 RN supp( ) ε = 1 − dim   = 1 − V   . (3.12) pre-aliasing  2  2 F f (x)  dx F(x) du 2 2 RNdim RNdim The resulting amount of pre-aliasing is plotted in Figure 3.15. Solving (3.12) for 1D and 2D subsets, as in [83] and Paper I, yields the results shown in Fig- ures 3.16 and 3.17, to be compared to Figures 3.11 and 3.13, respectively. We clearly see how minima with respect to pre-aliasing occur along the coordinate axes for the BCC and FCC sampling lattices, while the opposite is true for the

44 CC sampling lattice, as predicted. The BCC and FCC lattice behave almost identically for (3.11). For example, the edges of the spherical polyhedra cor- responding to the Brillouin zones are clearly visible in Figure 3.11, whereas they are completely indistinguishable in Figure 3.16. This is probably because of the low magnitude of the high frequency components.

pre-aliasing

e0

e-2 CC

e-4

e-6 BCC

e-8 FCC

e-10 0.0 0.5 1.0 1.5 2.0 sampling density

Figure 3.15. The amount of pre-aliasing, computed using (3.12), for (3.11), sampled on CC, BCC, and FCC lattices, with ρCC = ρBCC = ρFCC ∈ [0,2] samples per unit volume.

0.17 0.18 0.19 0.20 z z z

y y y

(a) CC: (b) BCC: (c) FCC: εpre-aliasing ∈ [0.186,0.211] εpre-aliasing ∈ [0.162,0.170] εpre-aliasing ∈ [0.162,0.170]

Figure 3.16. Pre-aliasing, denoted εpre-aliasing, in a 1D subset of (3.11), for ρCC = ρBCC = ρFCC = 1.55 samples per unit volume, plotted with respect to the subset ori- entation. The plots are viewed from the y-direction, with the x-axis pointing upward.

3.4.2 Studies in the spatial domain Studies of sampled functions in the spatial domain often include visual in- spection of the studied images. This poses several problems, the first of which

45 0.08 0.09 0.10 0.11 z z z

y y y

(a) CC: (b) BCC: (c) FCC: εpre-aliasing ∈ [0.096,0.12] εpre-aliasing ∈ [0.077,0.090] εpre-aliasing ∈ [0.077,0.090]

Figure 3.17. Pre-aliasing, denoted εpre-aliasing, in a 2D subset of (3.11), for ρCC = ρBCC = ρFCC = 1.55 samples per unit volume, plotted with respect to the normal direction. The plots are viewed from the y-direction, with the x-axis pointing upward.

is to establish some measure of accuracy. In [52], the average mean square error (MSE) of the interpolated function f˜ relative to f is used to establish the optimal choice of sampling lattice for the cases of ρV approaching zero and infinity, respectively. For ρV ≈ 0, the FCC lattice is found to be the op- timal choice, while the BCC lattice yields the best results for high values of ρV . The authors mention that the average MSE may be smaller than the worst case MSE, but prove that the difference is bounded. In [59], the L2-error in comparison to a high-resolution reference image is used to find at what sam- pling rates BCC and FCC lattices are comparable to a CC lattice. Using the synthetic Marschner-Lobb (ML) data set, first introduced in [58], and four medical data sets, it is found that the CC sampling lattice is equivalent to BCC and FCC sampling lattices of 19% to 33%, and 18% to 33% lower density, respectively. Pure mathematical approaches for evaluating image quality have the advan- tage of operating directly on the image data, isolating pre-aliasing errors from any errors introduced by, for example, volume rendering, the application of which is discussed in Section 5.5. They do not, however, consider the holis- tic qualities of an image, for example how well it can be interpreted visually. These qualities are more easily explored in user studies. Such a study is pre- sented in [59], along with the mathematical results already mentioned. The subjects of the study are presented with sets comprizing one high-resolution image and two images sampled on different lattices and densities, and asked to choose which one of the latter looks the most like the high-resolution im- age. To avoid introduction of additional errors and disturbances, the images are rendered by a raycaster using C2- and C3-differentiable interpolants. The result is roughly in accordance with that of the mathematical study, with the

46 CC sampling lattice being judged as equivalent with BCC and FCC lattices of 16% to 45%, and 28% to 42% lower density, respectively. The ML data set is widely used to study image quality. However, as pointed out in [91] and [92], the spectrum of the ML function is disc-shaped rather than spherical, and the image quality is highly dependent on its orientation relative to the sampling lattice. Although the orientation is not specified in [59], it is possible that the setup of the presented studies is biased to the advantage of, in particular, the FCC sampling lattice. Moreover, although it is pointed out in [59] that the choice of data set is important, the frequency spectra of the data sets used in the study are never mentioned. Paper I suggests the function given by 2 3 fLS(x)=cos c (x,x) + 1, c ∈ R, x ∈ R , (3.13) and visualized in Figure 3.18, as a suitable function for studies of pre-aliasing and image quality. The spectrum of the function is unbounded and spherical in nature, and the frequency content depends on the distance to the origin in the spatial domain, with low frequencies at the center. The amount of pre-aliasing can be estimated by counting the number of unaffected rings in the pattern. Figures 3.19 and 3.20 show fLS sampled on CC, BCC, and FCC lattices of equal density. In the images, fLS is point-wise multiplied with a plane through the origin, convolved with a Gaussian function to imitate the behaviour of a point-spread function, for increased visibility. The plane orientations, normal to (1,0,0) and (1,1,1), respectively, are chosen based on the best and worst case scenarios of the results visualized in Figure 3.17. As expected, the num- ber of undisturbed rings, counted from the center, is higher for the BCC and FCC lattices than for the CC lattice.

Figure 3.18. Cross-section through the origin of the function specified in (3.13), for x ∈ [−1,1]3 and with c = 15.

47 (a) CC (b) BCC (c) FCC

Figure 3.19. A cross section, with normal direction (1,0,0), through the origin of the defined by (3.13) with c = 15, and convolved with a Gaussian distribution with standard deviation of σ = 0.005.

(a) CC (b) BCC (c) FCC

Figure 3.20. A cross section, with normal direction (1,1,1), through the origin of the defined by (3.13) with c = 15, and convolved with a Gaussian distribution with standard deviation of σ = 0.005.

3.5 Anisotropic sampling As we shall see in Chapter 4, some image acquisition devices produce data sampled on lattices with primitive vectors of different lengths. Paper IV pre- sents a study of pre-aliasing on such sampling lattices, based on the examina- − − ΦV T ΦV T tion of overlap and unaffected. The study includes three different orientations of the BCC and FCC lattices, corresponding to the extremes of their symmetry regions, visualized in Figure 3.21. The lattices are rotated prior to elongation or compression along the x- and z-axes. Only the standard rotation of the CC lattice is included in the study, as rotation would distort the orthogonality of the primitive vectors, which is the most obvious advantage of this lattice. The frequency spectrum of f is again assumed to be spherical. The lattices are of unit density in their isotropic form. The results are summarized in Fig- ure 3.22, and shown in detail in Figures 3.23 and 3.24. Scenarios exist for all three lattices when they are the optimal choice, but the FCC lattice seems to be recommendable in more cases than the others. It should, however, be kept in mind that for spherical frequency spectra, ηV depends only on the dis-

48 o 1 o1

o2 o2 o3

o3

(a) Truncated octahedron. (b) Rhombic dodecahedron. Figure 3.21. The symmetry regions of the truncated octahedron and the rhom- bic dodecahedron. Both of these regions are spanned by the vectors o1 =[0,0,1], o2 =[1,0,1] and o3 =[1,1,1]. tance between the origin and the closest aliasing spectrum, which, in turn, is determined by the shortest primitive vector. optimal choice optimal choice

1.0 1.0

FCC 0.8 0.8

0.6 0.6 FCC 0.4 0.4 BCC 0.2 BCC 0.2 CC CC 0 0 0.5 1 1.5 2 2.5 3 0.5 1 1.5 2 2.5 3 spectrum radius spectrum radius (a) Portion of cases in which each lat- (b) Portion of cases in which each lat- tice is the optimal choice, with respect to tice is the optimal choice, with respect − − ΦV T ΦV T unaffected, versus spectrum radius. Re- to overlap, versus spectrum radius. Re- sults obtained by Monte Carlo simulation sults obtained by analytical evaluation of with a tolerance of 10−3. (3.10). Figure 3.22. Optimal choice of sampling lattice for different levels of anisotropy, in − − ΦV T ΦV T terms of unaffected and overlap versus spectrum radius.

49 z scale factor CC BCC FCC

4.0

2.0

0.0 1.0 3.0 spectrum radius x scale factor 1.8 1.6 1.4 1.2 1.0 0.8 0.6 0.4 0.2 0.0 − ΦV T (a) The intensity of each color band represents the magnitude of unaffected for the CC (red), FCC (green), and BCC (blue) sampling lattices. In the black region, εunaffected = 0 on all lattices. z scale factor CC BCC FCC

4.0

2.0

0.0 1.0 3.0 spectrum radius x scale factor 1.8 1.6 1.4 1.2 1.0 0.8 0.6 0.4 0.2 0.0 − ΦV T (b) Optimal lattice choice with respect to unaffected for different scaling in the z- and x-directions, obtained by a maximum operation on the images above. In the white region, εunaffected = 0 on all lattices.

− ΦV T Figure 3.23. Magnitude of unaffected on the CC, FCC, and BCC sampling lattices, subjected to different scaling in the z- and x-directions. Results obtained by Monte Carlo simulation with a tolerance of 10−3.

50 z scale factor CC BCC FCC

4.0

2.0

0.0 1.0 3.0 spectrum radius x scale factor 1.8 1.6 1.4 1.2 1.0 0.8 0.6 0.4 0.2 0.0 − ΦV T (a) The intensity of each color band represents the magnitude of overlap for the CC (red), FCC (green), and BCC (blue) sampling lattices, subjected to different scaling in the z- and x-directions. In the black region, εaliasing = 0 on all lattices. z scale factor CC BCC FCC

4.0

2.0

0.0 1.0 3.0 spectrum radius x scale factor 1.8 1.6 1.4 1.2 1.0 0.8 0.6 0.4 0.2 0.0 − ΦV T (b) Optimal lattice choice with respect to overlap for different scaling in the z- and x-directions, obtained by a maximum operation on the images above. In the white region, the εaliasing = 0 on all lattices.

− ΦV T Figure 3.24. Inverse magnitude of overlap on the CC, FCC, and BCC sampling lat- tices, subjected to different scaling in the z- and x-directions. Results obtained by analytical evaluation of (3.10).

51 4. Image acquisition on optimal sampling lattices

I have seen my death! Anna Bertha Ludwig, wife of Wilhelm Röntgen

Digital imaging is used in a variety of fields, for example, quality control, automation, surveillance, and healthcare. Imaging devices exist for most of the electromagnetic spectrum, from radio waves, with frequencies as low as 10 Hz, used in astronomy, to gamma rays of frequencies higher than 1020 Hz, used for . We can also use other mechanisms for imaging purposes, such as sound waves. This chapter describes a few common image acquisition methods, and how they can be adapted to the sampling lattices suggested in the previous chapter.

4.1 Acquisition of 2D images 4.1.1 Photography The human sense of vision is based on detection of light, or electromagnetic radiation, and this is also the most widespread way of acquiring images. As il- lustrated in Figure 4.1, electromagnetic radiation reflected by an object enters the camera through a focusing lens, and is detected by some kind of photosen- sitive material. The radiation may come from sources within or surrounding the imaged scene, for example sun light or lamps, or from a radiation source connected to the imaging device, such as a camera flash, or an x-ray source.

object lens detector Figure 4.1. The workings of a camera.

52 The photoelectric effect Each electron in an atom occupies a different energy state. When an electron absorbs an amount of energy corresponding to the difference between its own energy state and a higher state, not occupied by any other electron, it moves into the higher state. This behavior is called excitation. If enough energy is absorbed, the bond between the electron and the atom may be broken, result- ing in a free electron and a positive ion. This is known as the photoelectric effect. It was first described in [29], and is part of what led to the discov- ery of the wave-particle duality. The free electrons may move around in the material, or be emitted as radiation. As electrons are also the carriers of elec- tric current, the photoelectric effect can be used to convert electromagnetic radiation to an electric signal in digital image acquisition. A device designed for this purpose is called a photodetector. A digital camera may use a single photodetector combined with a mechanism for isolating the light for one pixel at a time, or a digital image sensor, consisting of an array of photodetectors, that capture the entire image all at once. Photodetectors can be constructed in several ways. In a photomultiplier, a material with photoelectric properties is attached to the inside of an evacuated glass housing. When a photon hits the material, an electron is released and caught by a cathode, which in turn releases an electron directed at a series of dinodes that multiply and guide it towards an anode, resulting in an electric current. As the detected signal is amplified before reaching the anode, photomultipliers have a high signal to noise ratio. Semiconductor sensors, on the other hand, use the change in re- sistance caused by the free electrons created by the photoelectric effect. A semiconductive material is placed between two electrodes, and when incident photons are absorbed by the electrons in the material, an electron-hole pair is created. The electrons move toward the cathode, and the holes toward the anode, creating an electric current, or accumulating as an electric charge. The magnitude of the current, or charge, is proportional to the number of excited electrons, which, in turn, is proportional to the number of absorbed photons. The intensity of a pixel is computed from all of the photons hitting the photodetector during the time of exposure, resulting in an average computed over the area of the photosensitive material, similar to the coverage values described in Sections 2.2.1, 2.2.2, and 3.2.

4.1.2 Sonography Boundaries between two substances with different physical properties reflect sound. In sonography, a transducer, containing a sound generator and a mi- crophone, is placed adjacent to the object of interest. The sound generator produces a sound wave that is transmitted into the object, and the microphone registers any echos caused by such reflections. By measuring the time between the sound wave entering the object, and the time when echos are perceived, we

53 can establish the locations of any internal borders of the object, as illustrated in Figure 4.2.

t t t -t emit detect d=v detect emit 2

(a) A sound wave (b) The sound (c) The echo is (d) The time dif- is emitted from the wave is reflected registered at time ference gives the transducer at time at a border inside tdetect. distance to the in- temit. of the object. ternal border. Figure 4.2. The workings of a sonograph.

4.2 Acquisition of volume images As this thesis focuses on 3D sampling lattices, 3D image acquisition methods are of particular interest. There are many such methods, several of which are based on acquisition of a series of 2D images. This section briefly describes CT, emission tomography, MRI, and ultrasonography, all of which are com- mon in health care. Several of these methods often produce images with anisotropic resolution, generally with a lower resolution along the z-axis of the volume, making the results presented in Paper IV, and summarized in Section 3.5, highly relevant.

4.2.1 Computed tomography CT utilizes the X-ray frequencies of the electromagnetic spectrum. Data are obtained by capturing 1D or 2D images of an object from different directions. There are numerous ways of reconstructing volume data from these images, of which the following methods are the principal ones.

Filtered Backprojection This technique is based on backprojecting the captured images into the volume to form an estimation of the imaged object. To avoid amplification of the low- frequency components, the projections are transformed to the frequency do- main, where they are multiplied with a ramp filter, and then transformed back to the spatial domain before the actual backprojection process, as illustrated in Figure 4.4. The methods described in [45] reconstruct one slice of the vol- ume at a time, producing 2D data from collections of one-dimensional data. These methods are used for parallel- or fan-beam CT, and assume a dimen- sially separable sampling lattice in the spatial domain. However, chapter 5.1

54 radiation source

detector

Figure 4.3. For CT data acquisition, a X-ray source and a detector are positioned on opposite sides of the object, mounted on a rotatable frame. 1D or 2D images are acquired for different rotations of the frame, covering at least half a revolution around the object.

of [98] describes how the process can be extended and applied to 2D parallel- beam CT, producing 3D data from collections of 2D images, and eliminating the requirement of a dimensionally separable sampling lattice. Reconstruction of cone-beam CT data on a BCC lattice is described in [96], along with the observation that small lesions and tumors seem to be more easily detectable in volumes sampled on BCC lattices.

u3 x1

u2 x2

u1 x3

(a) The Fourier transform (b) Transform the filtered (c) Backproject the data to of each X-ray projection projection to the spatial compute the volume data. is multiplied with a ramp domain. filter. Figure 4.4. The process of filtered backprojection of CT data.

55 Direct Fourier reconstruction According to the Fourier slice theorem, derived in [27], the Fourier transform of a projection of an Ndim-dimensional dataset is an (Ndim − 1)-dimensional hyperplane, perpendicular to the direction of projection, intersecting the Fou- rier transform of the dataset through the origin in the frequency domain. Ac- cordingly, the Fourier transforms of X-ray projections of an object are planes intersecting the Fourier transform of that object. Figure 4.5 shows how these planes can be combined and interpolated to obtain a sampled volume image in the frequency domain, that can be transformed to an image of the object in the spatial domain, as described in, for example, [41]. As the frequency domain is interpolated and sampled in all dimensions simultaneously, any sampling lattice, including the BCC and FCC lattices, can be used for this purpose.

u2 u3 x1

u1 u2 x2

u3 u1 x3

(a) Merge all the X- (b) Interpolate in the fre- (c) Transform the interpo- ray projections in the fre- quency domain. lated data to the spatial quency domain. domain. Figure 4.5. The process of direct Fourier rendering of CT data.

Iterative Reconstruction The methods described earlier in this section are both based on analytical solu- tion of the mathematical problem of volume reconstruction. Another approach is to iteratively solve a system of equations on the form ⎡ ⎤ f (y , ) ⎢ 0 0 0 ⎥ ⎢ . ⎥ ⎡ ⎤ ⎢ . ⎥ ( ) ⎢ ( ) ⎥ f x0 ⎢ f0 y0,Nel. in proj. ⎥ ⎢ . ⎥ ⎢ . ⎥ A × ⎣ . ⎦ = ⎢ . ⎥, (Nproj.Nel. in proj.) Nel. in vol. . ⎢ . ⎥ ( ) ⎢ ( , ) ⎥ f xNel. in vol. ⎢ fNproj. yNpro j 0 ⎥ ⎢ . ⎥ ⎣ . ⎦ ( ) fNproj. yNpro j,Nel. in proj.

3 where f (xi) is the intensity in the point xi ∈ R in the volume, f j(y j,i) is the ∈ R2 intensity in the point yi j in the j:th projection, the matrix A defines the

56 { ∈ R3| = , ∈ Z3} { ∈ R2| = relationship between the points x x Vvolumec c and y j y 2 Vprojection jc,c ∈ Z }, Nproj. is the number of X-ray projections, Nel. in proj. is the number of sample points in each projection, and Nel. in vol. is the number of sample points in the volume, hopefully somewhat clarified in Figure 4.6. The procedure is explained in [45] and [98], using 2D and 3D data, and is very similar to finite difference methods and finite element methods (FEM), frequently used in the field of scientific computing. In FEM, the sample points may be distributed randomly, indicating that any sampling lattice can be used for this reconstruction method.

Nproj. =6 f (y11 ) Nel. in proj. =25

f (y22 )

f (y66 )

f(x)

f (y33 ) Nel. in vol. =125

f (y55 )

f (y44 )

Figure 4.6. Data needed to set up a system of equations for iterative reconstruction of CT data.

4.2.2 Emission Tomography The basic principles of emission tomography are explained in [94]. Unlike CT, where radiation from outside of the object is used to produce an image, emission tomography is based on detecting radiation from inside of the object. The radiation can be produced by injecting a radioactive substance that is at- tracted to tissues of interest. As a radioactive particle decays, it emits bursts of radiation. This radiation is detected by an array of sensors surrounding the object, and used to estimate the location of the decaying particle. The setup is visualized in Figure 4.7. The volume data is usually reconstructed using iterative methods to solve a system of equations on a form similar to (4.2.1). The iterative maximum likelihood expectation maximization algorithm is de- scribed in [98] as a popular reconstruction method for emission tomography. As explained in Section 4.2.1, this kind of methods can be applied to any vol- ume sampling lattice.

57 detectors

(a) A radioactive (b) The substance (c) The substance (d) The volume is substande is in- is attracted to, for decays, and the re- reconstructed iter- jected into the ob- example, tissues sulting radiation is atively. ject. of interest. detected. Figure 4.7. The process of emission tomography.

4.2.3 Magnetic Resonance Imaging MRI is based on the interaction between proton spin and electromagnetic fields. As a result of their spin, protons are surrounded by magnetic fields aligned with their spin axis. This axis, in turn, precesses around another axis, as illustrated in Figure 4.8, which forms the mean axis of the magnetic field over time. Unless subjected to manipulation, particle spin orientation is ran- dom, and the bulk magnetization of an object is zero. However, when ex- posed to an external magnetic field, the spin precession axes of the particles align with the field lines. As a precession axis parallel to the field, rather than anti-parallel, corresponds to a lower energy state, most particles end up with parallel orientation, giving the object a net magnitization along this direction. If energy is added by, for example, application of another magnetic field, the precession axes can be made to break the alignment. If the second magnetic field is removed, the precession axis will, sooner or later, realign with the orig- inal field to conserve energy. The excess energy from the corresponding state transision is emitted as radiation. The time it takes for the precession axis to readjust upon the removal of the second magnetic field depends on the chem- ical environment of the particle. As a result, measuring the radiation emitted over time gives us information on the chemical compound of the object. As an example, the protons of lipids readjusts much quicker than those of smaller molecules, such as water, causing different radiation signatures for different kinds of body tissue. To be able to use this mechanism for imaging purposes, we need to be able to determine the location of the protons emitting radiation. Luckily, the phase and frequency of this radiation can be controlled through the applied mag- netic fields. A net magnetization is obtained by applying a static magnetic field, while the energy state transisions are caused by addition of temporary magnetic fields. By carefully tailoring the directions, magnitudes and duration

58 precession axis proton

spin axis Figure 4.8. A proton is surrounded by a magnetic field caused by its spin. The spin axis precesses around another axis. times of these fields, each point in the object is made to correspond to a spe- cific set of frequency and phase components. The radiation detected during the acquisition process form an image in the frequency domain, also known as k-space in this context, where each combination of frequency and phase cor- responds to a point in the spatial domain. A 2D or 3D image of the object is obtained by Fourier transformation of the k-space data. The process is shown in Figure 4.9, and described in detail in [11].

detectors

x x,B0 x,B0 detectors (a) Proton spin (b) An electro- (c) A temporary (d) When the orientation is magnetic field electromagnetic temporary field normally random. forces the spin field, tuned to is removed, the orientations to interact with a spin orientations align. The field specific range of re-aligns with strength B0 varies B0, changes the the remaining along the imaged spin orientations field, resulting object. of some protons. in emission of radiation. Figure 4.9. The process of MRI.

MRI images are usually acquired one slice at a time, every slice being sam- pled on a square or rectangular lattice. In [28], it is shown that scan time can be significantly reduced if the slices are instead sampled on a hexagonal lat- tice, and the benefits in terms of image quality are further explored in [74]. If we allow a spatial shift in the sampling pattern between slices, images can

59 be sampled directly on the BCC or FCC lattices. True volumetric MRI data acquisition is brought up in [67], along with references to studies implicating its benefits. Volumetric acquisition may be achieved in several ways. For ex- ample, the idea of pseudo-random data acquisition trajectories, explored in [2] and [21], which allows an arbitrary volume sampling lattice in k-space.

4.2.4 3D sonography Sonography is mostly used for 2D imaging, but can also be used to produce volume data. 3D sonography images are usually constructed from a set of 2D images obtained by translation and rotation of the transducer, as explained in [34]. The 2D images are mapped to their corresponding locations in space, whereupon the volume data is reconstructed by interpolation, and sampled on a 3D lattice, as shown in Figure 4.10. Because of the final interpolation step, any 3D sampling lattice can be used for this image aqcuisition method.

x3

x1

x2

(a) A set of 2D images are merged. (b) A 3D image is obtained by interpola- tion. Figure 4.10. Two-dimensional ultrasonography images can be mapped to 3D space, and interpolated, to form volume data.

60 5. Image processing and analysis on optimal sampling lattices

The secret is to keep banging the rocks together, guys! A newsreader, The Hitchhiker’s Guide to the Galaxy by Douglas Adams

Image processing on Cartesian sampling lattices is often based on dimen- sional separability, namely that a method can be applied to the image along one dimension at a time. This approach does not work for the BCC and FCC sampling lattices, as their Voronoi regions cannot be separated into isolated layers. Instead, we choose to base our algorithms on viewing digital images as graphs, as first suggested in [65]. A graph, denoted Γ(P,E), is a collection of vertices p ∈ P, representing points in space, and edges e ∈ E, connecting pairs of vertices. In an undirected graph, any edge ei, j, connecting the vertices pi and p j, is identical to the reversed edge e j,i. An example of a graph is shown in Figure 5.1. Let us recall that an image can be regarded as a function f˙V , and

(a) A set of vertices, de- (b) A set of edges, de- (c) The graph Γ(P,E). noted P. noted E.

Figure 5.1. The set of vertices P, and the set of edges E, making up the graph Γ(P,E). that the domain of a function sampled on the lattice Λ(V) can be expressed as D = {x|x ∈ D ∧ x = Vc}, c ∈ Z3. f˙V f ∈ Using PD ˙ to denote all spels for which xp D ˙ , we define the undirected fV fV lattice graph Γ Λ( ), = Γ , ( ) , V A PD ˙ E A fV

61 where PD ˙ make up the vertices, and E is a set of edges defined by some fV adjacency relation A, that determines the set of spels to which a spel p is considered to be adjacent. Two vertices pi and p j are connected by an edge if p j ∈ A(pi) ⇔ pi ∈ A(p j), and are then referred to as neighbors. Adjacency can often be defined in several ways on a lattice, as shown for the 2D Cartesian lat- tice in Figure 5.2. As we can see from Figures 5.3, 5.4, and 5.5, there are three ways of defining adjacency on a CC lattice, and two each on BCC and FCC lattices. Here, we should recall the connectivity paradox mentioned in Section 2.2.1. In a binary segmentation on a CC sampling lattice, the foreground or background must use A26-connectivity, and the other A6-connectivity. On a BCC lattice, two adjacent spels are bound to share a face, and the connectivity paradox does not appear, although it is possible to use A14-connectivity for the foreground or background, and A8-connectivity for the other. On the FCC lat- tice, the foreground, background, or both, may use A12-connectivity without ambiguity, but at most one of them can use A18-connectivity.

(a) A4 (b) A8 Figure 5.2. Two ways of specifying adjacency, and thereby a lattice graph, based on a 2D Cartesian lattice.

(a) A6 (b) A18 (c) A26 Figure 5.3. Common adjacency relations for the CC lattice.

5.1 Raster scanning Methods based on raster scanning, such as convolutional filtering and template matching, are straight forward to implement in a graph-based framework. A spatial template is defined in the same way as an adjacency relation, with the addition of a set of coefficients to which the neighbors of the origin spel are to

62 (a) A8 (b) A14 Figure 5.4. Common adjacency relations for the BCC lattice.

(a) A12 (b) A18 Figure 5.5. Common adjacency relations for the FCC lattice. be paired. Convolution with the spatial template is achieved by applying the template to each spel, and its neighborhood, in turn.

5.2 Surface area of fuzzy binary objects As mentioned in Section 2.3, object volume and surface area estimation from digital images is an important field of research, in which fuzzy segmentation of binary objects is a promising approach. In Paper V, we explore how the lower direction dependence of the shapes of the Voronoi regions of the BCC and FCC sampling lattices, in comparison to the CC lattice, may be exploited in this area. It is indicated by the results presented in [61] that the BCC and FCC sampling lattices may provide a better foundation for surface area estimations than the CC lattice. In contrast to the more sophisticated methods referred to in Section 2.3, we wish to establish a baseline for very simple area estima- tion methods, such as a 1:1 mapping between spel coverage and the area of the surface intersecting the spel. While natural surfaces are of a fractal nature and infinite area, as explained in [57], the concept of surface area is meaning- ful only if object surfaces can be assumed to be locally flat. Therefore, we assume a relationship between object scale and ρV such that the surface inter- secting a single spel can be approximated by a plane, as visualized in Figure 5.6. Intersecting surface areas for varying coverage values and plane orienta- tions are obtained through Monte-Carlo simulation, and the result is shown in

63 Figure 5.7. We use the mean value of the observed local surface areas for a given coverage value as a lookup to compute the surface areas of fuzzy binary spheres. The results, featured in Figure 5.8, are very precise, with a constant bias that is smaller for the BCC and FCC lattices than for the CC lattice, for large radii of curvature. For very small radii of curvature, near the value of the spel radii, the assumption of a planar surface does not hold, and, as expected, we obtain a very imprecise estimation of the surface area.

d s d s ds

(a) CC (b) BCC (c) FCC Figure 5.6. Examples of intersection areas of planar surfaces intersecting the Voronoi regions of the CC, BCC, and FCC sampling lattices.

5.3 Distance transforms and segmentation Distance in a digital image can be defined as the shortest path between two vertices in a weighted graph, denoted Γ(P,E,d). The weight, or cost, associ- ated with an edge ei, j, is written as ( )= ( , )= , ˙ ( ), , , ˙ ( ) , d ei, j d pi p j d xpi fV xpi x p j fV xp j and corresponds to a distance or connectivity measure, like the ones used for Π seeded segmentation transform in Section 2.2.1. A path pstart,pstop between , ∈ two spels pstart pstop PD ˙ is defined as fV Π =( ,..., ), = , = , ∈ ( ), pstart,pstop p1 pNΠ p1 pstart pNΠ pstop xpi+1 A xpi Π and the distance traversed by moving along pstart,pstop is computed as

NΠ−1 (Π )= ( , ). d pstart,pstop ∑ d pi pi+1 i=1

The shortest distance between pstart and pstop is d p ,p = min d Π , , start stop Π pstart pstop pstart,pstop ∈Π pstart,pstop

64 surface surface surface area area area

1.4 1.4 1.4

1.2 1.2 1.2

1 1 1

0.8 0.8 0.8

0.6 0.6 0.6

0.4 0.4 0.4

0.2 0.2 0.2

0 0 0 0.5 1 0.5 1 0.5 1 coverage coverage coverage (a) CC (b) BCC (c) FCC Figure 5.7. Intersecting area versus spel coverage for the CC, BCC, and FCC sampling lattices. The results are obtained through Monte-Carlo simulation.

Π where pstart,pstop is the set of all possible paths between pstart and pstop.We recall from Section 2.2.2 that a distance map f˙d,V is an image in which the intensity values correspond to the shortest distance from each spel to a seed point s, or set of seed points S. For distances computed along paths, the dis- tance map is thus defined as

f˙d,V (xp)=min d(p,s). s∈S

5.3.1 Wave-front propagation Distance transforms on digital images are often computed through wave-front propagation, using, for example, Dijkstra’s algorithm, introduced in [23], or Fast Marching, first described in [77]. These methods are, in fact, designed for graphs, and are independent of the image sampling lattice. The methods start by initializing the distance map to d0(s) if ∃s so that xp = xs f˙ , (x )= (5.1) d V p ∞ otherwise,

65 relative error relative error

0.6 0.15 CC 0.4 0.1

0.2 0.05 CC radius of curvature 0 0 0.6 0.8 1 1.2 1.4 10 20 30 40 50 60 FCC -0.05 -0.2 radius of BCC BCC curvature -0.1 -0.4 FCC -0.15 -0.6 (a) Small radius of curvature. (b) Large radius of curvature.

Figure 5.8. Relative error in surface area estimation, versus radius of surface cur- vature, for the CC, BCC, and FCC sampling lattices. For every radius, we use ten different centerpoints, slightly offset in relation to the origin. The curves represent the median error for each lattice, the dark shade covers the second and third percentiles, and the light shade includes all measurements.

where d0 is often, but not necessarily, zero. The spels for which f˙d,V is set to infinity are labelled as active. All active spels propagate their distance value to their neighbors, using ∀ , ˙ ( )= ˙ ( )+ ( , ), ˙ ( ) , pn∈A(p) fd,V xpn min fd,V xp d p pn fd,V xpn and return to a passive state. A spel pn that adopts its distance value from p is said to be in the influence zone of p. All neighbors for which f˙d,V is changed are labelled as active, and propagate their distance values in the same way. The process continues until all spels are again in a passive state, or until some other stopping criterion, for example a certain number of iterations, is met. In this way, we may compute the distance between any two spels, or sets of spels, in a digital image. The propagation of distance values is similar to that of a wave-front originating from the seed points, giving the method its name. Wave front propagation can be used as a base for binary distance transforms, as in [93], intensity-weighted distance transforms, for example in [73], and geodesic distance transforms, as shown in [46].

5.3.2 Improving the anti-aliased Euclidean distance transform The original AAEDT algorithm is based on raster scanning, similar to the first distance transforms suggested in [71]. Paper II contains an adaptation of the method to wave front propagation. Whereas raster scanning requires a differ- ent set of templates for every sampling lattice and dimensionality, wave front

66 propagation is, as mentioned in Section 5.3.1, independent of these factors. Moreover, it makes AAEDT more easily incorporated into software for gen- eral distance transforms, since wave-front propagation is a better framework for intensity-weighted distance transforms, as shown in [46]. The work on adapting AAEDT for wave-front propagation also led to discoveries that con- tributed to increasing its accuracy, some of which are applicable to wave-front propagation in general.

Covered edge spels AAEDT is one of the rare cases where d0 in (5.1) is non-zero. Instead, the edge spels are initialized with the sub-spel precision term ds, corresponding to the distance between the spel center and the object border. For correct initial- ization of this type of distance transforms, it is important that all edge spels are identified, or the wrong distance is propagated from start. However, all edge spels are not guaranteed to have a membership value in the range (0,1); if the object edge passes exactly between two spels, the edge spel is appointed full membership in the object, as shown in Figure 5.9. The probability of such an event tends towards zero, but as image intensity is often a discrete value in practice, for example in the range [0,255], it is sufficient for the edge to pass within a certain distance of the centerpoint between two spels for an edge spel with μ = 1 to appear. The dataset used in Paper II displayed this behavior for ∼ 1% of the edge spels, with individual images having a rate as high as 4%. However, although uncommon, covered edge spels may have a notable effect on the accuracy of the distance transform. In Paper II, we suggest that all object spels that are neighbors to edge- or background spels are used as seed points. If they are truly interior object spels, they are unable to propagate their distance values to any of their neighbors, and do not affect the final result. The computational cost is proportional to the number of edge spels, which is small in relation to the total number of spels for a somewhat convex object of at least moderate size. We find that adding this step reduces the relative error in some spels near the edge by as much as three orders of magnitude on a 2D Cartesian lattice. This behaviour should always be considered for distance transforms based on wave-front propagation with d0 = 0. It should be noted, though, that the problem of covered edge spels does not arise in algorithms based on raster-scanning.

The influence zones of seed points Some spel constellations, for example, the one in Figure 5.10, result in what we may call a broken influence zone, with the effect that some seed points are unable to propagate their distance value. As a result, all spels belonging to the broken influence zone receive incorrect distance values, propagated from the neigbors of the true nearest seed point. For convex objects, the risk of an influence zone being broken decreases with the distance from the edge, as the zone grows wider. Simulation results, presented in Paper II, show that, while

67 √ = . (a) dAAEDT 0 5 for the (b) dAAEDT = 1/ 2 for bottom pixels. the bottom right pixel. Figure 5.9. Examples of covered edge pixels, that risk being assigned the wrong distance value. The dotted line marks the object edge. the risk of a break is ∼ 8% at a distance of one to two spels from a locally flat edge on a 2D Cartesian lattice, it is only ∼ 5% at a distance of two to three spels, and ∼ 4% at a distance of three to four spels. In the same paper, we suggest using a more liberal definition of A(s), including more neighbors, in the first movement of the wave front. By using A24(s), corresponding to a 5×5 neighborhood, for the seed points propagating their distance value, and A8(p) for all other spels, we observe a decrease in relative error by as much as one order of magnitude, in comparison to using A8 for all spels. The results, shown in Figure 5.11, should be taken into consideration in all implementations of vector propagation.

p

s

Figure 5.10. The influence zone of each edge spel is delineated in black. For p, the nearest point on the edge is in s. However, the influence zone of s is broken, and p receives a distance value from another edge spel instead.

Improving the sub-spel precision In [42] and Paper II, ds is computed as

ds(p)=0.5 − f˙V (xp). (5.2)

The actual distribution of ds for different coverage values, in a CC lattice, is shown in Figure 5.12a. in Paper III, we evaluate alternative ways of approx- imating ds, and compare the performance of AAEDT on CC, BCC, and FCC lattices. We present a study including the linear approximation in (5.2), the average value of ds for a given coverage value, based on the results shown in Figure 5.12, and ds for a ball of the same volume as the lattice Voronoi regions,

68 probability per spel

0.1% A8

A24

0.01%

A342 0.001%

0.0001% -4 -3 -2 10 10 10

deviation from A 8

Figure 5.11. Distribution of relative error in dAAE (p), compared to using A∞(p) for all spels propagating their distance value, for different initial influence zones applied to images sampled on a 2D Cartesian lattice. derived from π 2 f˙ , = (r − d ) (d + 2r), (5.3) V coverage 3 s s where r is the ball radius and f˙V,coverage is the coverage value. The approxima- tion methods are evaluated for a set of concave and convex surfaces of vary- ing radii of curvature. Somewhat surprisingly, we find that although AAEDT tends towards overestimation for convex surfaces, there is very little bias, in comparison to precision, for concave surfaces. Both precision and accuracy improves dramatically on the CC sampling lattice with the usage of more so- phisticated approximations of ds. Still, the worst case performance on the BCC and FCC sampling lattices is better, in all respects, than the best case performance on the CC lattice. The best result is obtained by using the BCC sampling lattice and approximating ds from the simulation output. As we find that the relative error is smaller farther away from the object surface, we draw the conclusion that the approximation of ds is the largest error source for AAEDT, indicating the importance of the results in Paper III.

5.3.3 Seeded segmentation on optimal lattices In Paper V, we apply a selection of intensity-weighted distance transforms to MRI data, resampled to CC, BCC, and FCC lattices, and compare the seg- mentation results for different sampling densities. The study includes the fuzzy distance (FD), introduced in [73] and further developed in [85], fuzzy connectedness (FC), defined in [90] and [89], the minimum barrier distance (MBD), presented in [13], the approximated vectorial minimum barrier dis- tance (AvMBD), derived from MBD in [48], and geodesic distance (GD), de-

69 ds ds ds 0.8 0.8 0.8

0.6 0.6 0.6

0.4 0.4 0.4

0.2 0.2 0.2

0 0 0 0.5 1.0 0.5 1.0 0.5 1.0 -0.2 coverage -0.2 coverage -0.2 coverage

-0.4 -0.4 -0.4

-0.6 -0.6 -0.6

-0.8 -0.8 -0.8

(a) CC (b) BCC (c) FCC Figure 5.12. Sub spel distance versus coverage for the CC, BCC, and FCC sampling lattices. The results obtained by Monte-Carlo simulation. scribed in [88], [46] and [18], combined with the method for fuzzy segmenta- tion proposed in [55] to obtain fuzzy binary objects. FC, FD, GD and MBD are applied to T1-weighted data, while AvMBD is applied to a combination of T1- and PDT2-weighted data. The volume of a segmented object, labelled nS, is computed as μ,ρ = 1 μ ( ), volnS V ∑ nS xp ρV ∈ p PD ˙ fV where X0 is the Voronoi region of the sampling lattice in question, and the μ fuzzy membership value nS plays the part of a coverage value. We observe that the quality of the segmentation result, in terms of the volume of the seg- mented objects, does not improve with increased sampling density beyond a certain point for the studied datasets. As the primary advantage of the BCC and FCC sampling lattices, in relation to the CC lattice, is that their high val- ues of ηV may compensate for a low value of ρV , it is not surprising that performance does not differ between the lattices in cases when ρV is not a rel- evant factor. However, confirming that the superiority of the BCC and FCC sampling lattices is limited to the methods for which performance depends on ρV is an important step, as this knowledge is useful in the planning of further studies.

5.4 Fourier transform Section 2.1.2 mentions some of the advantages of image processing in fre- quency domain, and Sections 4.2.1 and 4.2.3, describe the use of Fourier trans- form in 3D image acquisition. This section is meant to provide an overview

70 of the existing methods for computing Fourier transforms with input or output organized on BCC and FCC sampling lattices. The Ndim-dimensional discrete Fourier transform (DFT) for general sam- pling lattices is given in [60] as

− − ˙V 1 ( )= ˙W 1 ( ) −iuT (2πW)x, FW u ∑ fV x e (5.4) x∈D ˙ ∩X − fV 0,W 1

Λ( −1) where X0,W −1 is the Voronoi region of the origin of W . On Cartesian sampling lattices, fast Fourier transform (FFT), derived in, for example, [16], is often used instead, as it reduces the original computational complexity of O( 2 ) O( ( )) Nelements to Nelementslog Nelements . Unfortunately, the FFT relies on V and W being diagonal, and cannot be directly applied on a general sampling lattice. However, by assuming periodicity in spatial domain on a CC lattice, the method presented in [20], and further developed in [1], enables use of ex- isting FFT implementations for computing DFTs on BCC and FCC sampling lattices with output on a CC lattice. Another method, allowing any choice of CC, BCC, or FCC sampling lattices in both domains, is introduced in [99]. This method is shown to be more computationally efficient than the previous one under ideal conditions, but as can be seen from Figure 5.13, the execution time depends heavily on the possibility of factorizating Nelements on the form

3NFFT Nelements = 4 × 2 , NFFT ∈ Z.

execution time

40

30

20

10

0 6 6 6 0 4x10 32x10 108x10

Nelements Figure 5.13. Execution time for the method introduced in [99], combined with the FFT implementation described in [40], on an IntelCoreTMi7-2600K CPU @ 3.4 GHz.

71 5.5 Volume rendering As mentioned in the beginning of Section 3.4.2, volume data needs to go through a rendering process, producing a 2D projection of the data, if it is to be viewed on, for example, a computer display. During this process, the data is combined with a transfer function that f˙V to RGBA-space if neces- sary, and possibly a shading method, that simulates illumination of the object to enhance spatial relationships in the image. If the observer is to be able to interact with the data, for example by rotating or scaling the viewed objects, the rendering process needs to exploit hardware acceleration. There are several ways of producing a 2D view of a volumetric dataset, such as splatting, shear warping and frequency domain rendering, all of which are described in [50]. Adaptations of these algorithms to BCC and FCC data are made in [22], [87], [86], and [25], respectively. The most common volume rendering method, however, is so-called raycasting, as it is known to produce the most natural looking images. Raycasting imitates the workings of a cam- era in reverse, as illustrated in Figure 5.14. An image plane is placed between the object of interest and a virtual camera. From the focus point of the cam- era, a ray is cast through each pixel of the image plane and into the volume containing the object. The volume data is sampled along the ray, and the color of the pixel, through which it is cast, is computed using some discretized ap- proximation of the volume rendering integral, the definition of which can be found in [30].

virtual camera samples along a ray image plane Figure 5.14. A ray is cast through every pixel of the image plane and into the volume containing the object. The ray is sampled between the points where it enters and exits the volume, and the RGBA values of the sample points are used to compute a value for the intersected pixel.

5.5.1 Interpolation At this point we need to recall that in a digital framework, the Dirac comb collapses to a Kronecker comb. Thus, f˙V is non-zero exclusively at the sam- ple points, which are zero-dimensional. To be able to sample f˙V along the ray in Figure 5.14, we need to obtain continuous data through interpolation,

72 similarly to the procedure described in Section 3.2. A large number of inter- polation methods exist for CC sampling lattices, but adaptation to BCC and FCC lattices is rarely straight-forward. Moreover, GPUs feature hardware ac- celerated methods for interpolation on CC sampling lattices, but not for BCC and FCC lattices, increasing the demands on computational efficiency. For tri- linear interpolation on BCC sampling lattices, DC-splines, introduced in[24], linear box-splines, described in [35, 36], and cosine-weighted B-splines, de- rived in[19], have so far reached interactive frame rates, while only DC-splines achieve this for FCC sampling lattices. For higher order interpolation, meth- ods such as Voronoi splines, described in [62], and multivariate sinc splines, introduced in [97], exist, but do not reach interactive frame rates.

73 6. Software

That’s not magic, that’s just engineering! The Dean in Interesting Times by Terry Pratchett

Despite the advantages of the BCC and FCC sampling lattices in image pro- cessing, there is very little active research in this area. A possible explanation is the lack of off-the-shelf software for handling these types of data. Image processing is applied in a wide range of fields, from biology to physics, in many of which other skills are of higher value than programming, and the prospect of starting implementation from absolute scratch is discouraging. In an attempt to lower the threshold for exploring alternative sampling lat- tices, Paper VI presents LatticeLibrary, a graph-based and lattice-independent framework for processing sampled data, and BccFccRaycaster, a plugin for an existing volume raycaster, that allows interactive rendering of data sampled on BCC and FCC lattices.

6.1 LatticeLibrary LatticeLibrary, available for download from [75], is an open source C++ li- brary published under the GNU LGPL license, version 2.1, the details of which can be found at [37]. It is intended for processing of sampled data, with a graph-based design aimed at facilitating addition of new processing methods and sampling lattices. The basis of the design is the Lattice abstract base class, defining the dimensionality and properties of a dataset. Classes for spe- cific sampling lattices, such as the CC, BCC, and FCC lattices, are derived from this base class, and implement methods for conversion between data indices and spel coordinates, definition of adjacency relations, and approxi- mations of physical measurements, based on the properties of the associated Voronoi region. All other classes in the framework are required to access the data through the interface defined in Lattice, making all implemented functionality independent of the sampling lattice of the data. At the time of publication of this thesis, LatticeLibrary supports basic image arithmetic, re- sampling from high to low resolution for any combination of lattices, convo- lutional filtering, AAEDT, seeded crisp and fuzzy segmentation using FC, FD,

74 GD, MBD and AvMBD, and the basic methods for surface area and volume estimation of fuzzy binary objects described in Paper V. LatticeLibrary has already proven to be a useful resource by producing the results for Papers II, III, and V. We hope that it will continue to contribute to the exploration of BCC and FCC sampling lattices in image processing, as well as of other sampling lattices and application areas.

6.2 BccFccRaycaster BccFccRaycaster is available for download from [64], and is intended for us- age in combination with 3.0.1, originally released at [32] under GNU GPL, as formulated at [38]. It features nearest neighbor, DC-spline, linear box-spline, and cosine-weighted B-spline interpolation for data sampled on BCC lattices, and nearest neighbor and DC-spline interpolation for data sam- pled on FCC lattices. Examples are shown in Figure 6.1. To our knowledge, this is the only publicly available raycaster to support rendering of data on CC, BCC, and FCC sampling lattices in a single application and at interac- tive frame rates. BccFccRaycaster can be accessed through the graphical user interface of Voreen 3.0.1, making it easy to use for inexperienced and occa- sional users examining small numbers of volume images. Voreen 3.0.1 also features a Python interpreter, and a command-line interface, in the sense that it can be used as a library in combination with, for example, GLUT, allowing for specialized use and automation.

75 (a) CC lattice, 80×80×80 spels, nearest (b) CC lattice, 80 × 80 × 80 spels, trilin- neighbor interpolation. ear interpolation.

(c) BCC lattice, 2 × 63 × 63 × 63 spels, (d) BCC lattice, 2 × 63 × 63 × 63 spels, nearest neighbor interpolation. cosine-weighted B-splines with λ = 0.1.

(e) FCC lattice, 4 × 50 × 50 × 50 spels, (f) FCC lattice, 4 × 50 × 50 × 50 spels, nearest neighbor interpolation. DC-spline interpolation. Figure 6.1. Rendering examples, produced by BccFccRaycaster.

76 7. Future work

. . . of course you can’t have a final frontier, because there’d be nothing for it to be a frontier to. Moving Pictures by Terry Pratchett

7.1 Image processing and analysis 7.1.1 Volume and area estimation The fuzzy surface area estimation method that is used in Paper V is, although precise for flat surfaces, a very crude one. A method similar to [80] should be possible to derive by combining the output of the simulations in Papers III and V with the marching polyhedra algorithms presented in [12] and [84]. Another approach is to combine the same simulation results with the normal estimation techniques developed for volume rendering, to produce a fuzzy verson of the method presented in [15] for BCC and FCC sampling lattices. As both precision and accuracy of surface area estimation depend on ρV , it would be very interesting to observe the performance of a sophisticated surface area estimation method on these lattices, and to see if the prediction suggested in Section 5.3.3, that the value of ηV only makes a difference in cases where the result depends on ρV , holds true.

7.1.2 Image registration As explained in Section 2.2.3, image registration is a complex process, com- bining several other image processing techniques. If entire objects, rather than sets of reference points, are to be aligned, the objects may first have to be seg- mented. The transformation of the template image requires interpolation and resampling of fT , and the method for guiding the iterative registration process often involves other processing steps, for example EDTs. Papers III and V show that segmentation and computation of EDTs on BCC and FCC sampling lattices are possible. In combination with the interpolation methods available for volume rendering, we have everything we need for implementing, for ex- ample, Chamfer matching, originally introduced in [6], for BCC and FCC

77 sampling lattices. Again, as the precision of edge localization depends on ρV , it would be interesting to compare registration results on CC, BCC, and FCC sampling lattices.

7.1.3 Convolutional filtering Although LatticeLibrary supports convolutional filtering, this area has not yet been researched for BCC and FCC sampling lattices. Section 2.1.1 mentions some of the many application areas of convolutional filters, and it would nat- urally be very interesting to study their behavior on BCC and FCC sampling lattices.

7.2 Software 7.2.1 LatticeLibrary LatticeLibrary is still in an early phase of development, and computational ef- ficiency has not yet been considered. The next obvious step is, consequently, profiling for optimization purposes. The implementations of resampling and convolutional filtering are perfectly parallelizable, and would benefit signif- icantly from simple thread parallelization. Moreover, LatticeLibrary should include functionality for reading and writing files of the format used by Bcc- FccRaycaster. LatticeLibrary is publicly available and open source, and it would be very interesting to see it being used for other alternative sampling lattices, and for applications other than image processing and analysis.

7.2.2 BccFccRaycaster The discrepancy between Voreen 3.0.1 and Voreen 4.0, the latter of which is available from [10], was unknown to us until the late stages of development of BccFccRaycaster. As all work on Voreen 3.0.1 seem to have ceased, BccFcc- Raycaster should be ported to Voreen 4.0. Needless to say, new interpolation methods should be included, as they become available.

7.3 Image acquisition In the end, it is the practical application of the benefits of BCC and FCC sampling lattices that matters. Section 4.2 explains how the most common image acquisition techniques can be adapted to alternative sampling lattices, without any changes to the hardware. We hope to see studies where image processing and analysis is applied to data acquired directly on BCC and FCC sampling lattices in a near, rather than a distant, future.

78 8. Concluding remarks

Every new beginning comes from some other beginning’s end. Closing Time by Semisonic

The research presented in Papers I, III, and IV, combined with the back- ground given in Chapter 3, some of the references in Chapter 5, and [82], the predecessor of this work, point toward the superiority of the BCC and FCC sampling lattices in comparison to the CC lattice. Chapter 4 explains that it is possible to acquire images directly on the proposed lattices, and Chapter 5 shows how a number of common image processing and analysis methods can be adapted to these types of data. Last, but not least, we suggest a path for future research in the field, and provide software to facilitate the continuation of this work. We live in a time of realization that all resources must be uti- lized efficiently and with care. In the spirit of the age, we hope that improving and optimizing existing data processing methods may save time, financial and natural resources, and, ultimately, even lives.

79 9. Summary

If you can’t explain it simply, you don’t know it well enough. Albert Einstein This thesis includes a series of studies of how the resolution of an image is affected by the shape of its spatial elements (spels). Spels are often referred to as pixels in two-dimensional (2D) images, and sometimes as voxels in three- dimensional (3D) images. By using spels of favorable shapes, we can improve image resolution without having to increase the number of spels. This can be exploited in two ways: • We can achieve higher image quality using a given number of spels, and thus be able to distinguish more details in images. • By reducing the number of spels, while retaining the same image quality, we can save resources in terms of storage space and processing time. In some cases, for example in computed tomography, it may be possible to reduce the amount of harmful radiation that a patient is exposed to during the imaging process. In magnetic resonance imaging, we may be able to reduce the time of exposure, which is often perceived by patients as being uncomfortably long. The thesis is produced as a part of a larger research project, aimed at finding ways of using the extra information made available by giving the spels of 3D images of the best possible shape. In this project, we have studied how spel shape affects the difficulty of determining the location of the border between two objects, the surface area of an object, and how far away from an object a certain point in space is. These measures are important in, for example, cancer diagnostics, which is often based on 3D images. We also studied the quality of images consisting of elongated spels, which is common in computed tomography and magnetic resonance imaging. Another important outcome of our work is the open source software for processing and rendering 3D images based on spels of alternative shapes. The following sections contain a short introduction to image processing and analysis, and a more theoretical review of the nature of digital images.

9.1 Computerized image processing and analysis Image processing means to change an image in some way, for example, remov- ing noise, enhancing details, or identifying and counting the imaged objects.

80 Image analysis is to extract information from an image. The purpose of image processing is often to facilitate image analysis. Thanks to our cognitive skills, humans are good at interpreting image in- formation. By using our memories, as well as our imagination and sense of logic, we can identify and classify image objects, even when they are partly obscured, or somewhat different from similar objects that we have seen be- fore; We can, for example, work out where the edge of an object is, even if it is not clearly visible in the image. However, there is always a small measure of chance affecting our judgement. Opinions often differ between different people, and sometimes even for a single person at different occasions. More- over, we tend to cut corners when we are stressed, tired, or bored, resulting in unnecessary errors. Computers, on the other hand, are consistent and efficient, but lack cognitive skills. The purpose of computerized image processing and analysis is to overcome this lack, enabling us to utilize the advantages that computers offer. One way of achieving this is to identify the factors that help us in recognizing and assessing a situation, for example, our knowledge that objects of a certain kind usually have a distinct shape, or that a change in in- tensity between two adjacent spels is likely to indicate an edge between two objects. If we are aware of which characteristics are relevant in a particular situation, computers can be programmed to make assessments based on them. Another approach is to re-organize the image information in a way That is easier for computers to understand.

9.2 The sampling process Image information is made available to computers through a process called sampling, that turns continuous information into discrete information. Sam- pling is best explained by using a one-dimensional (1D) example. In Figure 9.1a, we see a continuous function, denoted f , that may correspond to a phys- ical 1D phenomenon, for example, a sound wave. Figure 9.1b shows the sam- pling function Xh, also known as an impulse train, constructed from a series of Dirac impulses. A Dirac impulse is a function that is non-zero in an in- finitely small region, but for which the area between its curve and the x-axis is always exactly one area unit. By multiplying f and Xh, we get the sampled function f˙h, in which h is the distance between the Dirac impulses. If h is small enough in relation to the level of detail in f , we can re-create an exact copy of f from f˙h. To understand how this works, we have to transfer to frequency domain, using the Fourier transform, denoted F . A continuous function can always be written as the sum of a set of sine waves of different frequencies. In frequency domain, we replace the x-axis in our coordinate system by a frequency axis, where every point corresponds to a frequency. The Fourier transform of f , which is written F = F ( f ),

81 h

f fh

x h x h x

(a) The continuous func- (b) The impulse train, or (c) The sampled function tion f . sampling function, Xh. f˙h.

Figure 9.1. The continuous function f is multiplied by the sampling function Xh, resulting in the sampled function f˙h. and referred to as the spectrum of the function, gives us the amplitude of each sine wave in the particular set that make up f . The functions f and F may look like, for example, those in Figure 9.2. Multiplying f and Xh corresponds to convolving F and F (Xh) in frequency domain. As F (Xh) is a periodic function, with a period of length 1/h, the result of the convolution, F ( f Xh), is also periodic. Here, h must be small enough that the non-zero part of F fits into a region of width 1/h, as in Figures 9.3a-9.3c. Then, we are able to identify all the sine waves needed to restore f .Ifh is too big, 1/h is too small, as in Figures 9.3d-9.3f, and we cannot restore f . This is phenomenon is called aliasing.

F f

x 1 u h

(a) The continuous function f . (b) The Fourier transform F = F ( f ). Figure 9.2. The continuous function f , and its Fourier transform F.

In 1D, the only parameter defining the sampling function is h, but in 2D, as in the case when f represents an image, the sampling function is a forest of impulses, providing more alternatives. The Dirac impulses can be placed in different patterns, or lattices, that, when viewed from above, may look like in Figures 9.4a and 9.4b. It is this pattern that defines the shape of the spels. In the illustrated examples, the copies of F in frequency domain are arranged as in Figures 9.4c and 9.4d. The spectrum of a 2D function is usually circular. Therefore, we want to arrange the Dirac impulses in a pattern so that we maxi- mize the area of the largest circle that fits into the available region in frequency domain. The part of the available area that is not covered by the circle is called

82 1 F h 1 fh f =f 1 h1

x u x h1 1 h1

(a) The sampled function (b) The spectrum, F, fits (c) The restored function, ˙ fh1 . in the available region, fh1 , is exactly the same as and we can identify all the f . sine waves needed to re- store f .

1 F h2

f x h2 h2 x

x u f h2 aliasing 1 h2 h2

(d) The sampled function (e) The available region is (f) Since we cannot iden- ˙ fh2 . too small, and the spec- tify all of the required sine trum copies overlap. The waves, the restored func-

values in the seam are tion, fh2 , is different from added up. f . Figure 9.3. When h is too small, we cannot identify all the sine waves needed to restore the original function.

the redundancy of the sampling lattice. The amount of resources used to ac- quire, store, and process an image is proportional to the area of the polygons of the pattern in frequency domain, but the level of detail in the image is pro- portional to the area of the circle. Thus, we want to minimize the redundancy, so that we are able to capture as many details as possible for a given amount of resources. In 2D, the square lattice has a redundancy of 21%, while the hexagonal lattice has a redundancy of 9%. In 3D, the sampling pattern is a cloud of points, and we usually imagine the value of f at a certain point as the transparency of the region near that point. The result is similar to a set of densely packed building blocks of different transparencies. We want the blocks to be shaped in the way that maximizes the volume of the largest ball to fit inside of a block, and minimizes the volume not occupied by the ball. In practice, we can choose from the shapes in Figure 9.5, representing the Cartesian cubic (CC), body-centered cubic (BCC), and face-centered cubic (FCC) lattices, respectively. The CC pattern is the most

83 h2 h2

x x

x h1 x h1

(a) A square pattern, seen from above, in (b) A hexagonal pattern, seen from spatial domain. above, in spatial domain.

u2 u2

1 1 h h

1 u1 1 u1 h h

(c) The corresponding pattern in fre- (d) The corresponding pattern in fre- quency domain. There is a big difference quency domain. There is only a small in area between the circle and the central difference in area between the circle and square. the central hexagon. Figure 9.4. The difference in area between the circle and the square and hexagon, respectively, shows the redundancy of the two sampling lattices. common, and results in a redundancy of 48%, while the redundancy is 26% for the BCC lattice, and 32% for the FCC lattice. Consequently, we are able to save a lot of resources, or produce images of higher quality, by sampling on BCC or FCC lattices. The aim of the research described in this thesis is to explore how these advantages can be used.

(a) Spels in CC lattices. (b) Spels in BCC lattices. (c) Spels in FCC lattices. Figure 9.5. The shapes of the spels of CC, BCC, and FCC sampling lattices.

84 10. Sammanfattning

Farbror Melker, vet du vad? Om du inte kan skriva så att jag förstår det, då kan du lika gärna sluta upp. Tjorven, Vi på Saltkråkan av Astrid Lindgren

Den här avhandlingen sammanfattar en serie studier av hur detaljrikedo- men i en bild påverkas av bildelementens form. Ett bildelement är det som ofta kallas för en pixel i tvådimensionella bilder, och ibland för en voxel i tre- dimensionella bilder. Genom att ge bildelementen en så fördelaktig form som möjligt, kan man öka bildens detaljrikedom utan att öka antalet bildelement. Det kan utnyttjas på två sätt: • Man kan uppnå högre bildkvalitet med ett givet antal bildelement, och alltså uppfatta fler detaljer i bilden. • Genom att minska antalet bildelement, men ändå behålla samma bild- kvalitet, kan man spara resurser i form av lagringsutrymme och exekve- ringstid för olika operationer man utför på bilden. Man kan ibland, som i fallet med datortomografi, minska mängden av farlig röntenstrålning som en patient utsätts för vid medicinsk bildtagning, och i andra fall, som vid bildtagning med en magnetkamera, förkorta exponeringstiden, som patienter ofta uppfattar som besvärande lång. Avhandlingen har kommit till inom ramarna för ett forskningsprojekt, vars syf- te är att utforska på vilket sätt man kan utnyttja den extra informationen som blir tillgänglig när bildelementen i en tredimensionell bild har den bästa möj- liga formen. Vi har, bland annat, undersökt hur bildelementens form påverkar möjligheten att avgöra var ett avbildat objekt börjar och slutar, vad det har för ytarea, och vad avståndet till objektet är från olika punkter i bilden. Dessa mått är viktiga inom bland annat cancerdiagnostik, som ofta baseras på just tredi- mensionella bilder. Vi har även studerat hur hög detaljrikedom man kan uppnå i en bild med avlånga bildelement av olika former, eftersom datortomografer och magnetkameror ofta producerar sådana bilder. En viktig del av projektet är den mjukvara som vi producerat och gjort tillgänglig, som möjliggör vida- re studier av den här typen av bildelement. I de härpå följande styckena ges en kort introduktion till bildbehandling och bildanalys, samt en mer teoretisk genomgång av hur bilder är uppbyggda.

85 10.1 Datoriserad bildbehandling och bildanalys Bildbehandling innebär att förändra en bild på något sätt. Det kan, till exempel, handla om att ta bort brus och förstärka detaljer i en bild, eller om att identifiera eller räkna objekt i bilden. Bildanalys handlar om att utvinna information ur bilden, ofta efter att man tillämpat någon form av bildbehandling. Tack vare vår kognitiva förmåga, är människor väldigt bra på att tolka bildinformation. Vi kan använda såväl minnen som vår fantasi och slutled- ningsförmåga för att identifiera och klassificera objekt, även om de är delvis dolda, eller om de skiljer sig något från liknande objekt som vi stött på tidiga- re. Vi kan på så sätt förstå till exempel var kanten på ett objekt är, även om den inte syns tydligt i bilden. Det finns dock alltid ett visst mått av godtycklighet i våra bedömningar; de skiljer sig ofta mellan olika personer, och ibland även för samma person vid olika tillfällen. Vi tenderar dessutom att göra fel när vi är stressade, trötta eller uttråkade. En dator, å andra sidan, är alltid konsekvent i sina bedömningar, och dessutom mycket mer tidseffektiv än en människa, men saknar kognitiv förmåga. Datoriserad bildbehandling och bildanalys går ut på att hitta sätt att kompensera för den avsaknaden. Det kan göras genom att identifiera de faktorer som hjälper oss att göra bedömningar, som till exempel att en särskild typ av objekt ofta har en viss form, eller att en snabb förändring i färg innebär en kant i bilden, och sedan programmera datorn till att leta efter de egenskaperna. Det kan också göras genom att organisera om informationen i bilden på olika sätt, som gör den lättare för datorn att tolka.

10.2 Så fungerar sampling Bildinformation blir tillgänglig för datorer genom sampling, en process som omvandlar kontinuerlig information till diskret information. Sampling förkla- ras lättast med ett endimensionellt exempel. I Figur 10.1a ser vi en kontinu- erlig funktion, kallad f , som kan tänkas motsvara ett verkligt endimensionellt fenomen, som till exempel en ljudvåg. Figur 10.1b visar samplingsfunktionen Xh, även kallad ett impulståg, som utgörs av en serie Diracimpulser. En Dira- cimpuls är en funktion som är nollskild endast i ett oändligt litet område, men som alltid har en area motsvarande exakt ett mellan sin kurva och x-axeln. Genom att multiplicera f och Xh får vi den samplade funktionen f˙h, där h markerar avståndet mellan Diracimpulserna. Om h är tillräckligt litet i för- hållande till detaljnivån i f , går det att återskapa en exakt kopia av f utifrån f˙h. För att förstå hur det går till måste vi ta steget över till frekvensdomänen med Fouriertransformation, som betecknas F . En kontinuerlig funktion kan alltid skrivas som summan av en uppsättning sinusvågor med olika frekvens. I frekvensdomänen ersätter man x-axeln med en frekvensaxel, där varje värde motsvarar en viss frekvens. Fouriertransformen av f , som skrivs

F = F ( f ),

86 h

f fh

x h x h x

(a) Den kontinuerliga (b) Impulståget, eller samp- (c) Den samplade funktio- funktionen f . lingsfunktionen, Xh. nen f˙h. Figur 10.1. Den kontinuerliga funktionen f multipliceras med samplingsfunktionen Xh, vilket resulterar i den samplade funktionen f˙h. och kallas för funktionens spektrum, ger oss amplituden för alla sinusvågor i den uppsättning som tillsammans blir f . Det kan se ut ungefär som i Figur 10.2. När vi multiplicerar f med Xh, motsvarar det en faltning av F och F (Xh) i frekvensdomänen. Då F (Xh) är periodisk, med en period av längd 1/h, blir F ( f Xh) också blir periodisk. Det gäller att h är så pass litet att den nollskilda delen av F får plats inom ett område med bredden 1/h, som i Figurerna 10.3a-10.3c. I så fall kan vi identifiera alla sinusvågor som behövs för att återskapa f .Omh är för stort så blir 1/h för litet, som i Figurerna 10.3d-10.3f, och vi kan inte längre återskapa f . Det kallas för aliasing, och gör att små detaljer i signalen blir förvanskade.

F f

x 1 u h

(a) Den kontinuerliga funktionen f . (b) Fouriertransformen F = F ( f ). Figur 10.2. Den kontinuerliga funktionen f och dess Fouriertransform, F.

I en dimension kan vi bara variera samplingsfunktionen genom att ändra på h, men i två dimensioner, som när funktionen f representerar en bild, blir samplingsfunktionen en skog av impulser istället för en rad, och då finns det flera alternativ. Diracimpulserna kan placeras ut i olika mönster, som uppifrån kan se ut som, till exempel, i Figurerna 10.4a och 10.4b. Det är det här mönst- ret som gör att vi upplever att bildelementen har en form. Kopiorna av F i frekvensdomänen placeras då som i Figurerna 10.4c och 10.4d. Spektrumet för en tvådimensionell funktion är oftast cirkulärt, och därför vill vi placera Diracimpulserna i ett mönster så att vi kan passa in en så stor cirkel som möj- ligt i det tillgängliga utrymmet i frekvensdomänen. Utrymmet som blir över

87 1 F h 1 fh f =f 1 h1

x u x h1 1 h1

(a) Den samplade funktio- (b) Spektrumet F får plats (c) Den återskapade funk- ˙ nen fh1 . i det tillgängliga utrym- tionen fh1 är exakt likadan met, och vi kan se vilka som f . frekvenser som behövs för att återskapa f .

1 F h2

f x h2 h2 x

x u f h2 aliasing 1 h2 h2

(d) Den samplade funktio- (e) Det tillgängliga utrym- (f) Eftersom vi inte kan se ˙ nen fh2 . met är för smalt, och kopi- vilka frekvenser som be- orna av spektrumet över- hövs, blir den återskapa-

lappar varandra. I skarvar- de funktionen fh2 inte li- na summeras de överlap- kadan som f . pande värdena. Figur 10.3. När h är för litet, ser vi inte vilka frekvenser som behövs för att återskapa den ursprungliga funktionen f .

utanför cirkeln kallar vi för överskott. Mängden resurser som går åt för att ta, lagra och använda en bild är proportionell mot arean på den mittersta poly- gonen i frekvensdomänen, men detaljrikedomen i bilden är proportionell mot cirkelns area. Därför vill vi minimera överskottet, så att vi får så hög detaljri- kedom som möjligt i förhållande till de resurser vi använder. I två dimensio- ner ger det kvadratiska mönstret ett överskott på 21%, medan det hexagonala mönstret ger ett överskott på 9%. I tre dimensioner blir samplingsmönstret en svärm av punkter, och vanligt- vis tänker man sig att den samplade funktionens värde i en viss punkt repre- senteras av hur genomskinlig rymden är i närheten av den punkten. Resultatet blir som en samling tätt staplade klossar av olika genomskinlighet. Vi vill att klossarna ska vara formade på så sätt att en så stor boll som möjligt får plats i klossen, och minimera utrymmet som blir över. I princip kan vi välja på de tre formerna i Figur 10.5, och som representerar samplingsmönster som kallas

88 h2 h2

x x

x h1 x h1

(a) Ett kvadratiskt mönster, sett uppifrån, (b) Ett hexagonalt mönster, sett uppifrån, i spatialdomänen. i spatialdomänen.

u2 u2

1 1 h h

1 u1 1 u1 h h

(c) Motsvarande mönster i frekvensdo- (d) Motsvarande mönster i frekvensdo- mänen. Skillnaden i area mellan mitt- mänen. Skillnaden i area mellan mitthex- kvadraten och cirkeln, som visar hur stort agonen och cirkeln, som visar hur stort spektrum som får plats, är stor. spektrum som får plats, är liten. Figur 10.4. Skillnaden i area mellan cirkeln och kvadraten, respektive hexagonen, visar hur stort överskott de olika mönstren ger. för CC, BCC och FCC. CC-mönstret, som är det vanligaste, ger ett överskott på 48%, medan överskottet för BCC-mönstret är 26%, och för FCC-mönstret 32%. Genom att sampla i ett BCC- eller FCC-mönster i tre dimensioner, kan vi alltså spara mycket resurser, eller producera mycket mer detaljrika bilder. Forskningen som beskrivs i den här avhandlingen har alltså som syfte att un- dersöka hur dessa extra detaljer kan vara till nytta.

(a) CC-mönstret bildar (b) BCC-mönstret bildar (c) FCC-mönstret bildar kuber. trunkerade oktaedrar. rombiska dodekaedrar. Figur 10.5. Bildelementens former för sampling i CC-, BCC- och FCC-mönster.

89 Acknowledgements

How lucky I am to have something that makes saying goodbye so hard. actually not Winnie the Pooh

Although there is only one name on the front page, this thesis is definitely not the work of a single person. It is now 2.10 AM, November 3, 2015, slightly less than eight hours before the deadline, and it is finally time for the last, but not least, chapter. I want to start by thanking my main supervisor, Robin Strand, for pushing, pulling, and putting up with me during these years. You always made sure I had space to grow, and support to stand. I feel proud and privileged to have been your student. I am also very grateful for the support of my secondary supervisor, Ewert Bengtsson, for always making me feel safe and capable by being so reassuringly fatherly and professional. You make the office feel like a home. This is also true for Lena Nordström. Without you, Lena, there would not even be an office. It would literally, physically, collapse. Thank you for guiding me, and all other scatterbrains, through our everyday lives. Among my co-workers, I also want to thank Gunilla Borgefors, my scientific grand-mother, to whom I feel I can al- • ways come running when things just aren’t the way I want them to be, when I’m curious about a new subject, or to show off something i knitted in class. Ingrid Carlbom and Carolina Wählby, for being the female role models I • always wanted, and Ida-Maria Sintorn, for being the role model I always needed. Maya Neytcheva, for believing in me, and for being such a nice person. • Cris Luengo, for being straightforward, outspoken, and friendly. • Christer Kiselman, for your wisdom. • Filip Malm, Joakim Lindblad, and Anders Hast, for being soinspiring • and cheerful. Anders Brun, for your enthusiasm and persistence. • Nataša Sladoje, for your warmth. • Bettina Selig, Vladimir Curi´c´ , Andreas Kårsnäs, Patrik Malm and Gustaf • Kylberg, for being such friendly, inspiring, and supportive older scien- tific siblings, half-siblings, and cousins.

90 Martin Simonsson for your good mood, and for the ice cream and Daim. • Mikael Laaksoharju, for your easygoingness and honesty. • Thomas Lind, for your laid-back uprightness. • Astrid Raidl and Henrik Hedlund, for smooth support and nice conver- • sations. Takako Kawamura, for your ability to brighten a day. • Ingela Nyström, for having confidence in me. • Kristoffer Öfjäll, Frida Nellros, Anders Landström, Erik Ringaby, Mag- • nus Burenius, and everyone else who made all the SSBA gatherings extra fun. My master students, Max Morén, Leo Svenningsson, and Karl-Oskar • Smed, for your hard work and valuable contributions to the work pre- sented in this thesis. My students in Scientific Computing III, for the pleasure and privilege • of letting me walk with you on your path to knowledge. Some days this was the only thing to keep me going. Although you are not quite co-workers, I would also like to thank my program- ming swat team, consisting of Christian Axelsson, Max Morén, Gabriel Jä- genstedt, and Adam Skoglund. Maybe I should also apologize to your actualy co-workers for taking up so much of your time. Moreover, thank you Svante Ekholm Lindahl, for [citation needed], and to the staff at UU Avhandlingsproduk- tion, for your support and patience. Just as friends sometimes turn into involuntary co-workers, there are col- legues that turn into friends. First of all, I want to thank Pontus Olsson, for pushing me off the podium and in the right direction, and for being a truly won- derful person. I hadn’t made it through these years without you. I wouldn’t have wanted to. I also had the privilege of having the best office mates in the world. Thank you Hamid Sarve, for all the fun, and for the weird stuff that always spilled over on my desk. Thank you Alexandra Pacureanu, my little chocolate girl, for the nice talks and the support during bad times. More- over, a big thank you to Damian Matuszewski, Christophe Avenel, Azadeh Fakhrzadeh, Kristína Lidayová, and Amit Suveer, for turning office hours into playtime, and to my bonus collegues Nadia Assraoui Avenel and Carlos Pérez Penichet for spending so much time with us. A big thank you to the not-so-secret society PK. The sum is greater than its parts. This brings us to the fact that there are many aspects of a person’s life, and they are all connected. I am lucky to to have so many great people around me, and although most of them are not actively involved with my work, they have been essential in the production of this thesis. Mamma, thank you for your perseverance, and for always trying to understand. Pappa, thank you for still growing and learning. Thank you Fredrik, for inspiring me to stay focused and do my best, and for being the voice of reason in our family. It’s not my

91 place to be proud of you, because I didn’t make you who you are, but I feel privileged to be your sister. Thank you, Eva, for being there until the very end, and Annika, Ninni and Tero, for still being there afterwards. Thank you Melissa, Janne, Adde, Hanna, Majt and Gudrun, for welcoming me into your family. When I graduated from high school, one of my relatives gave me the biggest address book I had ever seen, and told me that it was for all the friends I would make in my new life, that was just about to begin. As I had always been a bit of a loner, I was quite puzzled by the gift. I didn’t understand then how right she was. I got my first computer at the same time, so I never used the book she gave me. However, as your names truly deserve to be in a real, physical book, I will use this chance to make it right. So, thank you, Erik, for giving me the idea of moving to Uppsala. It was probably the • best decision I ever made in my life. I’m so happy you are still around so that I can give you credit for it. Siri, for blowing me off my feet in a whirlwind of pink marshmallow • mini skirts once I got here. Good times! Wolters, for having such a big heart, and for trusting me with so much • of what’s in it. EB, for being so insightful and down to earth, for having the courage to • speak up, and for making me stop and think. I’m so glad you’re coming back. Kristin, for countless and endless evenings. You’re such a true and lov- • ing friend. Peter, for your patience, and for having such a gentle soul. You’re a • great person. Linnea, for being so sweet, caring, and trusting. Good luck on your own • journey along the academic path! Petia, for being so generous and kind. It’s impossible not to like you! • Conny, for giving me the first inkling of the idea of getting a PhD. • Max, for all the things mentioned above, as well as for your trust and • patience. You are my soul mate, and the love of my life. I would also like to thank Kapten Röd, for the music that keeps me going when everything else fails, and Skalbabe, for keeping me company these last few nights. Finally, thank you Ewa Kaminsky, for seeing me on my way. Every achieve- ment that I make in this field is ultimately yours. Dad and Tero, enjoy the party!

92 References

[1] U. R. Alim and T. Möller. A fast fourier transform with rectangular output on the BCC and FCC lattices. In Proceedings of the 8th International Conference on Sampling Theory and Applications, May 2009. [2] C. K. Anand, A. T. Curtis, and R. Kumar. Durga: A heuristically-optimized data collection strategy for volumetric magnetic resonance imaging. Engineering Optimization, 40(2):117–136, February 2008. [3] S. Beucher and C. Lantuejoul. Use of watersheds in contour detection. In International Workshop on image processing: Real-time Edge and Motion detection/estimation, September 1979. [4] H. Blum. Biological shape and visual science (part I). Journal of Theoretical Biology, 38(2):205–287, February 1973. [5] G. Borgefors. Distance transformations in digital images. Computer Vision, Graphics, and Image Processing, 34(3):344–371, June 1986. [6] G. Borgefors. Hierarchical chamfer matching: a parametric edge matching algorithm. IEEE Transactions on Pattern Analysis and Machine Intelligence, 10(6):849–865, November 1988. [7] G. Borgefors. On digital distance transforms in three dimensions. Computer Vision and Image Understanding, 64(3):368–376, November 1996. [8] R. N. Bracewell. Strip integration in radio astronomy. Australian Journal of Physics, 9(2):198–217, 1956. [9] C. R. Brice and C. L. Fennema. Scene analysis using regions. Artificial Intelligence, 1(3-4):205–226, 1970. [10] T. Brix, A. Scherzinger, A. Völker, and D. Drees. voreen 4.0. http://www.uni-muenster.de/Voreen/index.html. [11] R. W. Brown, Y.-C N. Cheng, E. M. Haacke, M. R. Thompson, and R. Venkatesan. Magnetic Resonance Imaging: Physical Principles and Sequence Design. John Wiley & Sons, Inc., 2 edition, 2014. [12] H. Carr, T. Theußl, and T. Möller. Isosurfaces on optimal regular samples. In G.-P. Bonneau, S. Hahmann, and C. D. Hansen, editors, Proceedings of the symposium on , pages 39–48, 2003. [13] K. C. Ciesielski, R. Strand, F. Malmberg, and P. Saha. Efficient algorithm for finding the exact minimum barrier distance. Computer Vision and Image Understanding, 123:53–64, June 2014. [14] K. S. Clifford Chao, G. Ozyigit, A. I. Blanco, W. L. Thorstad, J. O Deasy, B. H. Haughey, G. J. Spector, and D. G. Sessions. Intensity-modulated radiation therapy for oropharyngeal carcinoma: impact of tumor volume. International Journal of Radiation Oncology*Biology*Physics, 59(1):43–50, May 2004. [15] D. Coeurjolly, F. Flin, O. Teytaud, and L. Tougne. Multigrid convergence and surface area estimation. In T. Asano, R. Klette, and C. Ronse, editors,

93 Geometry, Morphology, and Computational Imaging, pages 101–119. Springer Berlin Heidelberg, 2003. [16] J. W. Cooley and J. W. Tukey. An algorithm for the machine calculation of complex Fourier series. Mathematics of Computation, 19(90):297–301, April 1965. [17] C. Couprie, L. Grady, L. Najman, and H. Talbot. Power watershed: A unifying graph-based optimization framework. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(7):138411399, 2011. [18] A. Criminisi, T. Sharp, and A. Blake. GeoS: Geodesic image segmentation. In Computer Vision - ECCV 2008, pages 99–112. Springer, 2008. [19] B. Csébfalvi. Cosine-weighted b-spline interpolation: A fast and high-quality reconstruction scheme for the body-centered cubic lattice. IEEE Transactions on Visualization and , 19(9):1455–1466, September 2013. [20] B. Csébfalvi and B. Domonkos. Pass-band optimal reconstruction on the body-centered cubic lattice. In O. Deussen, D. Keim, and D. Saupe, editors, Vision, Modeling, and Visualization, pages 71–80, October 2008. [21] A. T. Curtis and C. K. Anand. Random volumetric MRI trajectories via genetic algorithms. International Journal of Biomedical Imaging, 2008, 2008. [22] E. Dagenais, T. Möller, and S. Bergner. vuVolume. [23] E. W. Dijkstra. A note on two problems in connexion with graphs. Numerische Mathematik, 1(1):269–271, 1959. [24] B. Domonkos and B. Csébfalvi. DC-splines: Revisiting the trilinear interpolation on the body-centered cubic lattice. In Proceedings of the 15th Vision, Modeling, and Visualization Workshop (VMV), pages 275–282, November 2010. [25] A. Dornhofer. Arbitrary sampling geometries with applications to frequency domain volume rendering on the body-centered cubic lattice. Master’s thesis, Technischen Universität Wien, Schlachthausgasse 41/1/4/20, A-1030 Wien, Austria, March 2003. [26] R. Duda and P. Hart. Pattern Classification and Scene Analysis, pages 271–272. John Wiley & Sons, Inc., 1973. [27] S. Dunne, S. Napel, and B. Rutt. Fast reprojection of volume data. In Proc. of the Conference on Visualization in Biomedical Computing, pages 11–18. IEEE, May 1990. [28] J. C. Ehrhardt. MR data acquisition and reconstruction using efficient sampling schemes. IEEE Transactions on Medical Imaging, 9(3):305–309, September 1990. [29] A. Einstein. On a heuristic viewpoint concerning the production and transformation of light. Annalen der Physik, June 1905. [30] K. Engel, M. Hadwiger, J.M. Kniss, C. Rezk-Salama, and D. Weiskopf. Real-Time Volume Graphics. A K Peters, Ltd., 2006. [31] A. Entezari. Towards computing on non-Cartesian lattices. Technical report, Simon Fraser University, 2006. [32] T. Ropinski et al. voreen 3.0. www.voreen.org. [33] T. G. Feeman. The Mathematics of Medical Imaging: A Beginner’s Guide. Springer, 2010. [34] A. Fenster, D. B. Downey, and H. N. Cardinal. Three-dimensional ultrasound

94 imaging. Physics in Medicine and Biology, 46(5):67–99, 2001. [35] B. Finkbeiner, U. R. Alim, D. Van De Ville, and T. Möller. High-quality volumetric reconstruction on optimal lattices for computed tomography. Computer Graphics Forum, 28(3):1023–1030, June 2009. [36] B. Finkbeiner, A. Entezari, D. Van De Ville, and T. Möller. Efficient volume rendering on the body centered cubic lattice using box splines. Computers & Graphics, 34:409–423, 2010. [37] Free Software Foundation, Inc. GNU Lesser General Public License, version 2.1. http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html, February 1999. [38] Free Software Foundation, Inc. GNU General Public License. http://www.gnu.org/licenses/gpl-3.0.en.html, June 2007. [39] B. R. Frieden. A new restoring algorithm for the preferential enhancement of edge gradients. Journal of the Optical Society of America, 66:280–283, 1976. [40] M. Frigo and S. G. Johnson. The design and implementation of fftw3. Proceedings of the IEEE, 93(2):216–231, 2005. [41] D. Gottlieb, B. Gustafsson, and B. Forssén. On the direct fourier method for computer tomography. IEEE Transactions on Medical Imaging, 19(3):223–232, March 2000. [42] S. Gustavson and R. Strand. Anti-aliased Euclidean distance transform. Pattern Recognition Letters, 32(2):252–257, January 2011. [43] T. C. Hales. An overview of the Kepler conjecture. arXiv preprint math/9811071. [44] P. V. C. Hough. Method and means for recognizing complex patterns. US Patent 3,069,654, December 1962. [45] J. Hsieh. Computed Tomography - Principles, Design, Artifacts and Recent Advances. SPIE and Wiley Interscience, 2 edition, 2009. [46] L. Ikonen. Pixel queue algorithm for geodesic distance transforms. In Discrete Geometry for Computer Imagery, LNCS, pages 228–239. Springer Berlin Heidelberg, 2005. [47] L. Ikonen and P. Toivanen. Shortest routes on varying height surfaces using gray-level distance transforms. Image and Vision Computing, 23(2):133–141, February 2005. [48] A. Kårsnäs, R. Strand, and P. K. Saha. The vectorial minimum barrier distance. In 21st International Conference on Pattern Recognition, pages 792–795. IEEE, November 2012. [49] M. Kass, A. Witkin, and D. Terzopoulos. Snakes: Active contour models. International Journal of Computer Vision, 1(4):321–331, January 1988. [50] A. Kaufman and K. Mueller. The Visualization Handbook, chapter 7: Overview of Volume Rendering. Academic Press, 2005. [51] J. J. Koenderink. The structure of images. Biological Cybernetics, 50(5):363–370, August 1984. [52] R. Künsch, E. Agrell, and F. A. Hamprecht. Optimal lattices for sampling. IEEE Transactions on Information Theory, 51(2):634–647, February 2005. [53] J. Lindblad. Surface area estimation of digitized 3D objects using weighted local configurations. Image and Vision Computing, 23(2):111–122, February 2005.

95 [54] Y.-S. Liu, J. Yi, G.-Q. Zheng, and J.-C. Paul. Surface area estimation of digitized 3D objects using quasi-Monte Carlo methods. Pattern Recognition, 43(11):3900–3909, November 2010. [55] F. Malmberg, J. Lindblad, N. Sladoje, and I. Nyström. A graph-based framework for sub-pixel image segmentation. Theoretical Computer Science, 412(15):1338–1349, March 2011. [56] F. Malmberg, R. Nordenskjöld, R. Strand, and J. Kullberg. SmartPaint: a tool for interactive segmentation of medical volume images. Computer Methods in Biomechanics and Biomedical Engineering: Imaging & Visualization, 2014. [57] B. Mandelbrot. How long is the coast of Britain? statistical self-similarity and fractional dimension. Science, 156(3775):636–638, May 1967. [58] S. R. Marschner and R. J. Lobb. An evaluation of reconstruction filters for volume rendering. In Proceedings of the conference on Visualization, 1994. [59] T. Meng, A. Entezari, T. Möller, D. Weiskopf, and A. E. Kirkpatrick. Visual comparability of 3D regular sampling and reconstruction. IEEE Transactions on Visualization and Computer Graphics, 17(10):1429–1432, November 2010. [60] R. Mersereau and T. Speake. The processing of periodically sampled multidimensional signals. IEEE Tansactions on Acoustics, Speech, and Signal Processing, 31(1):188–194, February 1983. [61] E. G. Miller. Alternative tilings for improved surface area estimates by local counting algorithms. Computer Vision and Image Understanding, 74(3):193–211, June 199. [62] M. Mirzargar and A. Entezari. Voronoi splines. IEEE Tansactions on Signal Processing, 58(9):4572–4582, September 2010. [63] J. Modersitzki. FAIR: Flexible Algorithms for Image Registration (Fundamentals of Algorithms). SIAM, October 2009. [64] M. Morén, K.-O. Smed, J. Nysjö, and E. Schold Linnér. BccFccRaycaster, 2015. [65] O. J. Morris. Graph theory for image analysis: an approach based on the shortest spanning tree. Communications, Radar and Signal Processing, IEEE Procedings, 133(2):146–152, April 1986. [66] J. C. Mullikin. The vector distance transform in two and three dimensions. CVGIP: Graphical Models and Image Processing, 54(6):526–535, November 1992. [67] N. Papanikolaou and S. Karampekios. Image Processing in Radiology, chapter 3D MRI Acquisition: Technique, pages 15–26. Springer, 2008. [68] W. K. Pratt. Median filtering, 1975. [69] J. M. S. Prewitt. Picture Processing and Psychopictorics, chapter Object enhancement and extraction. Academic Press, 1970. [70] I. Ragnemalm. The Euclidean distance transform in arbitrary dimensions. In International Conference on Image Processing and its Applications, pages 290–293, April 1992. [71] A. Rosenfeld and J. L. Pfaltz. Sequential operations in digital picture processing. Journal of the ACM, 13(4):471–494, October 1966. [72] A. Rosenfeld and J. L. Pfaltz. Distance functions on digital pictures. Pattern Recognition, 1(1):33–61, 1968. [73] P. K. Saha, F. W. Wehrli, and B. R. Gomberg. Fuzzy distance transform:

96 Theory, algorithms, and applications. Computer Vision and Image Understanding, 86(3):171 – 190, 2002. [74] M. Saranathan, V. Ramanan, R. Gulati, and R. Venkatesan. ANTHEM: anatomically tailored hexagonal MRI. Magnetic Resonance Imaging, 25(7):1039–1047, September 2007. [75] E. Schold Linnér. LatticeLibrary. https://github.com/Elima85/LatticeLibrary, 2015. [76] J. Serra. Cube, cube-octahedron or rhombododecahedron as bases for 3-D shape descriptions. In C. Arcelli, L.P. Cordella, and G. Sanniti di Baja, editors, Advances in Visual Form Analysis, pages 502–517, 1997. [77] J. A. Sethian. A fast marching level set method for monotonically advancing fronts. In Proceedings of National Academy of Sciences, volume 93, pages 1591–1595, 1996. [78] M. Sezgin. Survey over image thresholding techniques and quantitative performance evaluation. Journal of Electrinic Imaging, 13(1):146–168, January 2004. [79] N. Sladoje, I. Nyström, and P. K. Saha. Perimeter and area estimations of digitized objects with fuzzy borders. In I. Nyström, G. Sanniti di Baja, and S. Svensson, editors, Discrete Geometry for Computer Imagery, volume 2886 of LNCS, pages 368–377. Springer Berlin Heidelberg, November 2003. [80] N. Sladoje, I. Nyström, and P. K. Saha. Measurements of digitized objects with fuzzy borders in 2D and 3D. Image and Vision Computing, 23(2):123–132, February 2005. [81] P. Stelldinger and L. J. Latecki. 3D object digitization: Volume and surface area estimation. In Proc. IEEE Int’l Conf. Image Analysis, 2006. [82] R. Strand. Distance Functions and Image Processing on Point-Lattices With Focus on the 3D Face- and Body-centered Cubic Grids. PhD thesis, Uppsala University, 2008. [83] R. Strand. Sampling and aliasing properties of three-dimensional point-lattices. Technical report, Center for Image Analysis, Uppsala University, 2010. [84] R. Strand and P. Stelldinger. Topology preserving marching cubes-like algorithms on the face-centered cubic grid. In 14th International Conference on Image Analysis and Processing, pages 781–788, September 2007. [85] S. Svensson. Aspects on the reverse fuzzy distance transform. Pattern Recognition Letters, 29(7):888–896, May 2008. [86] J. Sweeney and K. Mueller. Shear-warp deluxe: the shear-warp algorithm revisited. In VISSYM ’02 Proceedings of the symposium on Data Visualisation 2002, pages 95–ff, 2002. [87] T. Theußl, T. Möller, and M. E. Gröller. Optimal regular volume sampling. In Proceedings of the conference on Visualization, pages 91–546, 2001. [88] P. J. Toivanen. New geodosic distance transforms for gray-scale images. Pattern Recognition Letters, 17(5):437 – 450, 1996. [89] J. K. Udupa and P. Saha. Fuzzy connectedness and image segmentation. In Proceedings of the IEEE, volume 91, pages 1649–1669, October 2003. [90] J. K. Udupa and S. Samarasekera. Fuzzy connectedness and object definition: Theory, algorithms and applications in image segmentation. Graphical Models

97 and Image Processing, 58(3):246–261, May 1996. [91] V. Vad, B. Csébfalvi, and M. Gabbouj. Calibration of the Marschner-Lobb signal on CC, BCC, and FCC lattices. In M. Meyer and T. Weinkauf, editors, Proceedings of the Eurographics Conference on Visualization (EuroVis), 2012. [92] V. Vad, B. Csébfalvi, P. Rautec, and E. Gröller. Towards an unbiased comparison of CC, BCC, and FCC lattices in terms of prealiasing. In Computer Graphics Forum, volume 33, pages 81–90, June 2014. [93] B. J. H. Verwer, P. W. Verbeek, and S. T. Dekker. An efficient uniform cost algorithm applied to distance transforms. IEEE Transactions on Pattern Analysis and Machine Intelligence, 11(4):425–429, April 1989. [94] M. N. Wernick and J. N. Aarsvold, editors. Emission Tomography: The Fundamentals of PET and SPECT. Elsevier, 2004. [95] G. Windreich, N. Kiryati, and G. Lohmann. Voxel-based surface area estimation: from theory to practice. Pattern Recognition, 36(11):2531–2541, November 2003. [96] F. Xu and K. Mueller. Applications of optimal sampling lattices for volume acquisition via 3D computed tomography. In Volume Graphics Symposium, pages 57–64, 2007. [97] W. Ye and A. Entezari. A geometric construction of multivariate sinc functions. IEEE Tansactions on Image Processing, 21(6):2969–2979, June 2012. [98] G. L. Zeng. Medical Image Reconstruction - A Conceptual Tutorial. Springer Berlin Heidelberg, 2010. [99] X. Zheng and F. Gu. Fast fourier transform on fcc and bcc lattices with outputs on fcc and bcc lattices respectively. Journal of Mathematical Imaging and Vision, 49(3):530–550, July 2014. [100] J. Ziegel and M. Kiderlen. Estimation of surface area and surface area measure of three-dimensional sets from digitizations. Image and Vision Computing, 28(1):64–77, January 2010.

98

Acta Universitatis Upsaliensis Digital Comprehensive Summaries of Uppsala Dissertations from the Faculty of Science and Technology 1314 Editor: The Dean of the Faculty of Science and Technology

A doctoral dissertation from the Faculty of Science and Technology, Uppsala University, is usually a summary of a number of papers. A few copies of the complete dissertation are kept at major Swedish research libraries, while the summary alone is distributed internationally through the series Digital Comprehensive Summaries of Uppsala Dissertations from the Faculty of Science and Technology. (Prior to January, 2005, the series was published under the title “Comprehensive Summaries of Uppsala Dissertations from the Faculty of Science and Technology”.)

ACTA UNIVERSITATIS UPSALIENSIS Distribution: publications.uu.se UPPSALA urn:nbn:se:uu:diva-265340 2015