Statistical Inference on Grayscale Images via the Euler-Radon Transform
Abstract
Tools from topological data analysis have been widely used to represent binary images in many scientific applications. Methods that aim to represent grayscale images (i.e., where pixel intensities instead take on continuous values) have been relatively underdeveloped. In this paper, we introduce the Euler-Radon transform, which generalizes the Euler characteristic transform to grayscale images by using o-minimal structures and Euler integration over definable functions. Coupling the Karhunen–Loève expansion with our proposed topological representation, we offer hypothesis-testing algorithms based on the distribution for detecting significant differences between two groups of grayscale images. We illustrate our framework via extensive numerical experiments and simulations. 111 • Keywords: Euler calculus; Karhunen–Loève expansion; o-minimal structures; smooth Euler-Radon transform. • Abbreviations: BIS, binary image segmentation; CT, computed tomography; CDT, cell decomposition theorem; DERT, dual Euler-Radon transform; ECT, Euler characteristic transform; GBM, glioblastoma multiforme; iid, independently and identically distributed; LECT, lifted Euler characteristic transform; MEC, marginal Euler curve; MRI, magnetic resonance imaging; Micro-CT, micro-computed tomography; PHT, persistent homology transform; PET, positron emission tomography; RCLL, right continuous with left limit; SECT, smooth Euler characteristic transform; TDA, topological data analysis; WECT, weighted Euler curve transform.
1 Introduction
The analysis of grayscale images is important in many fields. In medical imaging, data can be derived from different modalities including magnetic resonance imaging (MRI), computed tomography (CT), positron emission tomography (PET), and micro-computed tomography (Micro-CT). Analyzing the variation among pixel intensities in these images can help diagnose diseases, detect abnormalities in human tissues, and monitor the effectiveness of different treatment strategies (e.g., see Figure 1). Beyond medicine, grayscale imaging is essential in astronomy for capturing details in celestial bodies and other phenomena (Howell, 2006), in geology for studying rock and mineral compositions using electron microscopy (Reed, 2005), and in meteorology for interpreting satellite imagery to predict weather patterns (Kidder and Haar, 1995).
There is an important distinction between binary and grayscale images. Unlike binary images, where pixels are exactly one of two colors (usually black and white), pixels in grayscale images take on continuous values. A binary image can be modeled as a binary-valued function which is often expressed in the following form
(1.1) |
where the subscript denotes the region of white points in the image (which we will refer to as a “shape” throughout this paper). In contrast, a grayscale image must be modeled as a real-valued function. Specifically, the grayscale intensity of each pixel is represented as the function value at that corresponding point.
Many methods in the field of topological data analysis (TDA) (Carlsson, 2009, Vishwanath et al., 2020) have been developed for analyzing binary images (equivalently, shapes). Some of these works include the persistent homology transform (PHT) (Turner et al., 2014), the Euler characteristic transform (ECT) (Turner et al., 2014, Ghrist et al., 2018), and the smooth Euler characteristic transform (SECT) (Crawford et al., 2020) — all of which are proposed statistics used to represent shapes while preserving the complete information they contain. Crawford et al. (2020) applied the SECT on MRI-derived binary images taken from tumors of glioblastoma multiforme (GBM) patients. Here, the authors used the resulting summary statistics from the SECT in a class of Gaussian process regression models to predict survival-based outcomes. Wang et al. (2021) utilized the ECT for sub-image analysis which aims to identify geometric features that are important for distinguishing various classes of shapes. Marsh et al. (2022) recently presented the DETECT: an extension of the ECT to analyze temporal changes in shapes. The authors demonstrated their approach by studying the growth of mouse small intestine organoid experiments from segmented videos. Lastly, Meng et al. (2022) recently used the SECT framework to introduce a distribution-based approach to test hypotheses on random shapes, with the corresponding mathematical foundation being established therein through algebraic topology, functional analysis with Sobolev embeddings (Brezis, 2011), and probability theory using the Karhunen–Loève expansion (Alexanderian, 2015).
Previous TDA methods that use Euler characteristic-based invariants are well suited for binary images and shapes with clearly defined boundaries (e.g., the region of white points defined via the binary-valued function in Eq. (1.1)). Grayscale images, on the other hand, are arrays of 2-dimensional pixel or 3-dimensional voxel intensities that represent varying levels of brightness in a continuous space (e.g., see Figures 1 and 2). These images lack the clear boundaries that can be used to define and compute the Euler characteristic. Consequently, due to the inherent continuous nature of grayscale images, both the Euler characteristic and the corresponding TDA methods that leverage it are not immediately applicable.
One natural way to apply the Euler characteristic to grayscale images is through binary image segmentation (BIS) — a process that divides points in a grayscale image into foreground (the shape of interest) and background. That is, BIS can serve as a preprocessing step to convert a grayscale image into a binary format, facilitating the application of the Euler characteristic. Numerous state-of-the-art applications of Euler characteristic-based TDA methods to grayscale images rely on BIS. For example, Crawford et al. (2020) used the computer-assisted program MITKats (Chen and Rabadán, 2017) to threshold MRI scans of GBM tumors and convert them to binary formats for their analyses with the SECT (refer to Figure 3 in Crawford et al. (2020)). Unfortunately, there are several challenges associated with BIS that can impede on the effectiveness and accuracy of downstream analyses with TDA methods. One of the primary challenges is selecting an appropriate threshold to distinguish between foreground and background points. Improper choice of a BIS threshold may result in the issue of over- or under-segmentation. Moreover, pinpointing a proper threshold is often not straightforward (especially when the images have low image contrast, large noise, or complex heterogeneity) and can be computationally demanding. This selection process can be especially challenging for medical images of soft tissues (including organs, tumors, and blood vessels). Most importantly, performing BIS inevitably causes a loss of information in images of interest. By generalizing Euler characteristic-based statistics and enabling them to be directly applicable to grayscale images without the need for BIS, we will increase their utility for better powered shape analyses.

Radiomics (Aerts et al., 2014) has been used to estimate features from grayscale images to predict outcomes of interest, such as patient survival time in cancer. Most commonly used radiomics approaches are based on estimating parameters that describe various image intensity features, which are then employed for prediction. For example, Just (2014) described the estimation of moments of intensity histograms, Brooks and Grigsby (2013) proposed a pixel-based distance-dependent approach using the deviation from a linear intensity gradation, and Eloyan et al. (2020) described an approach for estimation of intensity histogram and shape features taking into account the correlation structure of pixel intensities. Additionally, Aerts et al. (2014) showed the computation of shape and texture features from the image intensities. While radiomic features computed from grayscale images can be used to compare populations of images, they also inevitably lose information about the grayscale images of interest. This loss reduces the power of downstream statistical analyses.
The major contributions that we present in this paper all center around developing a generalization of the ECT for grayscale images. A summary of these include:
-
i)
Utilizing o-minimal structures (van den Dries, 1998) and the framework proposed in Baryshnikov and Ghrist (2010) for Euler integration over definable functions, we introduce the Euler-Radon transform (ERT). This ERT serves as a topological summary statistic that aims to unify the ECT (Turner et al., 2014, Ghrist et al., 2018), the weighted Euler curve transform (WECT) (Jiang et al., 2020), and the marginal Euler curve (MEC) (Kirveslahti and Mukherjee, 2023). Notably, when the ERT is employed on binary images, it coincides with the ECT. Moreover, akin to the framework presented in Kirveslahti and Mukherjee (2023), our ERT does not rely on the diffeomorphism assumption posited in many state-of-the-art methods (e.g., Ashburner, 2007). Lastly, unlike previous TDA-based methods that rely on BIS and standard radiomic approaches, the “Schapira inversion formula” (Schapira, 1995) guarantees that our proposed ERT summary preserves all information within the pixel intensity arrays of grayscale images.
-
ii)
Using the proposed ERT as a building block, we also introduce the smooth Euler-Radon transform (SERT). When applied to binary images, the SERT coincides with the SECT (Crawford et al., 2020, Meng et al., 2022). Importantly, the SERT represents the grayscale images as functional data. Numerous tools from functional data analysis (FDA) (Hsing and Eubank, 2015) and functional analysis (Brezis, 2011) are applicable with the SERT (e.g., the Karhunen–Loève expansion Alexanderian, 2015).
-
iii)
Using the ERT and SERT, we propose several statistical algorithms aimed at detecting significant differences between paired collections of grayscale images (e.g., analyzing CT scans of malignant and benign tumors from Figure 1). Particularly, our proposed algorithms combine the Karhunen–Loève expansion with a permutation-based approach. Using simulations, we show that our hypothesis test is uniformly powerful across various scenarios and does not suffer from type I error inflation. These algorithms are a generalization of results presented in Meng et al. (2022).
Beyond the contributions outlined above, due to the resemblance between the ECT and our proposed ERT, this paper paves the way for generalizing a series of ECT-based methods (Crawford et al., 2020, Wang et al., 2021, Marsh et al., 2022) from binary images to grayscale images.
The remainder of this paper is organized as follows. In Section 2, we review some existing representations of grayscale images. In Section 3, we first review the basics of Euler calculus that have been described in van den Dries (1998), Baryshnikov and Ghrist (2010), and Ghrist (2014). Then, using Euler calculus, we define the ERT and detail its properties. In Section 4, we comprehensively describe the relationship between our proposed ERT and existing topological representations of grayscale images (Jiang et al., 2020, Kirveslahti and Mukherjee, 2023). Section 5 offers a proof-of-concept example that illustrates the behavior of our proposed SERT. In Section 6, we propose an ERT-based alignment approach for preprocessing grayscale images prior to statistical inference without relying on correspondences between them. In Section 7, we propose several statistical algorithms designed to differentiate between two sets of grayscale images. The performance of the proposed algorithms is presented in Section 8 using simulations. Lastly, we conclude this paper in Section 9 and discuss several future research directions. The proofs of all theorems in this paper are provided in Appendix A unless otherwise stated.
2 Representations of Grayscale Images
The statistical inference on grayscale images necessitates an appropriate representation of grayscale images. For the application of statistical methods akin to the ECT-based methods in Crawford et al. (2020), Wang et al. (2021), Meng et al. (2022), and Marsh et al. (2022), it is imperative that our proposed representation of grayscale images aligns as closely as possible with the ECT. Prior to delving into our proposed approach, this section offers a review of some existing representations of grayscale images.
In an attempt to employ an ECT-like method to grayscale images of GBM tumors, Jiang et al. (2020) transformed each grayscale image into the discrete representation in their preprocessing step, where denotes a finite sum, each is a simplicial complex, and each weight belongs to . In other words, each grayscale image is transformed into a weighted sum of a finite set of simplexes (referred to as a “weighted complex” therein). Subsequently, Jiang et al. (2020) introduced the weighted Euler curve transform (WECT) tailored for weighted complexes. A limitation of the WECT method is the dependency of data analysis results on the discretization , unless the original image is discrete and can be exactly depicted as a weighted complex. When dealing with a high-resolution grayscale image, the deviation between the original image and its weighted complex discretization can be substantial. Importantly, the reliance of data analysis on the discretization complicates theoretical analysis, which necessitates discretization-free representations of grayscale images.
Many state-of-the-art methods for analyzing grayscale images rely on the diffeomorphism assumption that the grayscale images being analyzed are diffeomorphic (e.g., Ashburner, 2007). To obviate the diffeomorphism assumption, Kirveslahti and Mukherjee (2023) introduced two novel representations called the lifted Euler characteristic transform (LECT) and the super LECT (SELECT) utilizing a lifting technique. In contrast to the approach proposed by Jiang et al. (2020), neither the LECT nor SELECT depends on the discretization preprocessing for grayscale images. However, the lifting procedure used in both the LECT and SELECT introduces an additional dimension. For example, the LECT represents a -dimensional grayscale image as a function on a -dimensional manifold (see Eq. (4.1) for details). This increase in dimensionality distinguishes the LECT and SELECT distinctly from the ECT, precluding straightforward theoretical and methodological generalizations of ECT-based methods to grayscale images (Ghrist et al., 2018, Crawford et al., 2020, Wang et al., 2021, Meng et al., 2022, Marsh et al., 2022). Additionally, the augmented dimensionality elevates the computational expense associated with subsequent statistical inference.
A grayscale image can also be represented using function values where is used to denote the grayscale intensity at point (pixel) . One straightforward approach to quantify differences between two images can then be done using the Lebesgue integral for grayscale images represented by functions and . Representing grayscale images through topological invariants presents distinct advantages compared to using function values. These advantages have been documented by Kirveslahti and Mukherjee (2023). As a toy example, the Euler characteristic of a singular point is 1; whereas, its Lebesgue integral is 0.
3 Euler-Radon Transform of Grayscale Functions
In this section, we generalize the ECT from binary images to grayscale images via the Euler calculus (Baryshnikov and Ghrist, 2010, Ghrist, 2014). This generalization does not depend on the discretization of grayscale images nor does it introduce an additional dimension. More precisely, we introduce the Euler-Radon transform (ERT) as a means to perform statistical inference on grayscale images. This approach serves as a natural extension of both the ECT and WECT, and has a direct connection to the LECT and SELECT. Furthermore, to apply functional data analysis, we propose a smooth version of the ERT — the smooth Euler-Radon transform (SERT), which is a generalization of the SECT.
3.1 Outline
To elucidate the conceptual foundation of our ERT as an extension of the ECT, we revisit the ECT of shapes from the viewpoint of Euler calculus. The discussion in this subsection primarily serves a heuristic purpose; a thorough and precise exposition is given in Section 3.3.
Without loss of generality, we assume for a prespecified radius and is compact. The ECT of is a collection of Euler characteristics , where and (also Meng et al., 2022). The Euler characteristic can be represented as follows using the Euler functional (e.g., Ghrist et al., 2018)
(3.1) |
In essence, this formulation can be viewed as a generalized Radon transform of the function (Schapira, 1995, Baryshnikov et al., 2011, Ghrist et al., 2018). Here, the indicator function represents a binary image, as referenced in Eq. (1.1). In the development of the ERT, our primary objective is to substitute the indicator function in Eq. (3.1) with a real-valued function representing a grayscale image.


A conventional approach to modeling a grayscale image takes the form
(3.2) |
For reference, we encourage readers to compare Eq. (3.2) with Eq. (1.1). An example of a grayscale image is presented in Figure 2(a). In many applications, it becomes important to rescale a grayscale image where for . However, the configuration in Eq. (3.2) is not invariant under this rescaling transform. Therefore, we will no longer view a grayscale image as a function taking values between . Instead, throughout this paper, we will treat each grayscale image generally as a bounded function , which we subsequently term a grayscale function (see Section 3.3 for details). Obviously, a rescaled bounded function is still bounded, although it may take values outside . Furthermore, for negative , this rescaling inverts the grayscale spectrum, reminiscent of a “white-to-black” transition (an example of this is available in Figure 2(b)). By encompassing general bounded functions — beyond those merely within the range — our approach broadens its applicability, encapsulating scalar fields that are beyond the structure posited in Eq. (3.2) (e.g., the realizations of Gaussian random fields) (Adler et al., 2007, Bobrowski and Borman, 2012).
As previously mentioned, the key to generalizing the ECT to the ERT is replacing the indicator function in Eq. (3.1) with a real-valued function representing a grayscale image. That is, the ERT of a -dimensional grayscale image can be heuristically expressed as follows
(3.3) |
which is a function of on the -dimensional manifold . If the grayscale function in Eq. (3.3) takes only finitely many values in (e.g., is a discretized version of some underlying high-resolution grayscale image), the integration in Eq. (3.3) can be easily defined via the Euler integration over constructible functions (see Section 3.6 of Ghrist (2014)) and is equal to the WECT under some tameness conditions (Jiang et al., 2020). When the grayscale function has an “infinitely fine resolution” (i.e., is generally real-valued), the rigorous definition of the integration in Eq. (3.3) necessitates the techniques developed in Baryshnikov and Ghrist (2010). A more elaborate discussion on this, using o-minimal structures, will be discussed in Section 3.2.
3.2 Euler Calculus via O-minimal Structures
The primary objective of this subsection is to revisit Euler calculus — to prepare for a rigorous version of the heuristic integration presented in Eq. (3.3). This will result in the precise definition of the ERT which we detail in Section 3.3.
O-minimal Structures and Definable Functions.
Euler calculus has been extensively examined in the literature (Baryshnikov and Ghrist, 2010, Ghrist, 2014). Lebesgue integration is established for measurable functions. In a manner similar to Lebesgue integration, Euler integration begins by determining a set of functions that act as integrands for Euler integrals. These specific functions are termed “definable functions” and are specified through o-minimal structures. The definition of o-minimal structures is available in van den Dries (1998) and rephrased as follows:
Definition 3.1.
An o-minimal structure on is a sequence satisfying the following axioms:
(i) for each , the collection is a Boolean algebra of subsets of ;
(ii) implies and ;
(iii) for all ;
(iv) implies , where is the projection map on the first coordinates;
(v) for all , and ;
(vi) the only sets in are the finite unions of open intervals (with endpoints allowed) and points.
A set is said to be definable with respect to if (i.e., there exists an such that ).
A typical example of o-minimal structures is the collection of semialgebraic sets which is defined as: a set is said to be a semialgebraic subset of if it is a finite union of sets of the following form
where and are positive integers, and are real polynomial functions on (also see Chapter 2 of van den Dries (1998)). Specifically, if we let the collection of semialgebraic subsets of , then is an o-minimal structure. Since the unit sphere is defined using the polynomial , it is definable with respect to this o-minimal structure. It is also true for the open ball centered at the origin with radius . Throughout this paper, to include many common sets in our framework, we assume the o-minimal structures of interest to satisfy the following assumption:
Assumption 1.
The o-minimal structure of interest contains all semialgebraic sets.
Importantly, under Assumption 1, we are able to apply the “triangulation theorem” and the “trivialization theorem” as presented in van den Dries (1998). In particular, the “triangulation theorem” (see Chapter 8 of van den Dries (1998)) indicates that each definable set is homeomorphic to a polyhedron, which subsequently suggests that each definable set is Borel-measurable (see “Definition 1.21” of Klenke (2020)).
In addition to o-minimal structures, we need the concepts in the following definition, which are also available in Baryshnikov and Ghrist (2010).
Definition 3.2.
Suppose we have an o-minimal structure on . Let be definable and for some positive integer .
-
i)
A function is said to be definable if its graph is definable (i.e., ).
-
ii)
Let denote the collection of compactly supported definable functions . Denote .
-
iii)
Denote . Any function in is called a constructible function.
-
iv)
If a definable set is also compact, we call this set a constructible set; the collection of all constructible subsets of is denoted by . Obviously, for any constructible subset , is an injective map from to .
It is simple to verify that, under Assumption 1, the function defined in Eq. (3.1) is a constructible function where , and is a constructible set.
The term “tameness” is frequently used in the TDA literature. While “tame” is often used synonymously with “definable,” certain works (e.g., Bobrowski and Borman, 2012) attribute “tameness” to a notion that slightly diverges from the definability outlined in Definition 3.2. To ensure clarity, we will use “definable” in lieu of “tame.” An in-depth exploration of the interplay between definability and tameness can be found in Appendix B.
Euler Characteristic.
In Euler calculus, the Euler characteristic plays a role analogous to the Lebesgue measure in the Lebesgue integral theory. For any definable set , the cell decomposition theorem (CDT) indicates that there exists a partition of , where is a finite collection of cells (see Chapter 3 of van den Dries (1998) for the definition of cells and CDT). Then, the Euler characteristic of the definable set is defined as follows
(3.4) |
where denotes the dimension of the cell (see Chapter 4 of van den Dries (1998) for the definition of dimensions). One can also show that the value does not depend on the choice of partition (see Chapter 4 of van den Dries (1998), Section 2 therein). As discussed at the beginning of Baryshnikov and Ghrist (2010), the Euler characteristic in Eq. (3.4) is equivalently defined via the Borel-Moore homology, where with denoting the Borel-Moore homology (Bredon, 2012). Note that is a homotopy invariant if is compact but is only a homeomorphism invariant in general.
Euler Integration over Constructible Functions.
For any constructible function , its Euler integral is defined as follows (also see Section 3.6 of Ghrist (2014))
(3.5) |
Particularly, for all . Using the Euler integration defined in Eq. (3.5), we may represent the ECT by the following†222: We use to denote the function throughout this paper.
(3.6) |
where and is the indicator function defined in Eq. (3.1). Eq. (3.6) is a rigorous version of Eq. (3.1) in the sense that Eq. (3.6) specifies the collection of shapes for which the ECT is well-defined. Furthermore, varies “definably” with respect to , which is precisely presented by the following theorem.
Theorem 3.1.
Suppose . Then, we have the following:
-
i)
takes only finitely many values as runs through . In addition, for each integer , the set is definable; hence, the function is a definable function.
-
ii)
The function is Borel-measurable.
-
iii)
For each fixed direction , the function has at most finitely many discontinuities. More precisely, there are points in such that on each interval with , the function is constant.
The proof of Theorem 3.1 is given in Appendix A.2. The third result of Theorem 3.1 indicates that the “tameness assumption” in (an old version of) Meng et al. (2022) is redundant if the shapes of interest are definable. Recall that the SECT of is defined by the following (Crawford et al., 2020, Meng et al., 2022)
(3.7) |
Theorem 3.1 also guarantees that the Lebesgue integrals in Eq. (3.7) are well-defined and that the map is Borel-measurable.
Euler Integration over Definable Functions.
The Euler integration defined in Eq. (3.5) is exclusively tailored for integer-valued functions within (e.g., the indicator function that represents a binary image). Consequently, it cannot accommodate real-valued grayscale functions possessing infinitely fine resolutions (e.g., see Figures 1 and 2). Therefore, to provide a rigorous definition of the integrals in Eq. (3.3), we need a framework that extends beyond the scope of Eq. (3.5).
When the integrands are real-valued functions, one needs step-function approximations. We first review the definitions of floor and ceiling functions. For any real number , the greatest integer less than or equal to , and the least integer greater than or equal to . Based on the functional in Eq. (3.5), Baryshnikov and Ghrist (2010) proposed the Euler integration functionals , , and for real-valued definable function as follows
(3.8) |
Baryshnikov and Ghrist (2010) (“Lemma 3” therein) showed that the limits in Eq. (3.8) exist; hence, the functionals in Eq. (3.8) are well-defined. The following equation indicates that the functionals defined in Eq. (3.8) are generalizations of where
(3.9) |
for all . The proof of Eq. (3.9) is in Appendix A.1. However, for general integrands, and are not equal (see “Lemma 1” of Baryshnikov and Ghrist (2010)). Neither nor is linear. What is more, neither of them is homogeneous — they are only positively homogeneous (see Baryshnikov and Ghrist (2010) for details). Fortunately, the “averaged version” is homogeneous. This means that for all , which is implied by “Lemmas 4 and 6” of Baryshnikov and Ghrist (2010).
Within the trio of functionals outlined in Eq. (3.8), our study predominantly employs the averaged version, , to ensure the homogeneity of the proposed ERT. To elucidate, consider the ERT denoted as . Our objective is to maintain homogeneity such that holds universally for any . This homogeneity property is validated using the averaged version as detailed in Theorem 3.2 in Section 3.3. This choice not only streamlines the theoretical presentation but also yields computational efficiency in practical applications. For example, suppose we need to rescale (and maybe also white-to-black transition as presented in Figure 2) the grayscale function post computation. In that case, we may directly rescale the computed ERT — meaning that we can compute instead of computing the ERT of the rescaled image . Rescaling a computed ERT is much more efficient than computing the ERT of a rescaled image.
3.3 Euler-Randon Transform
In this subsection, we introduce the precise definition of the ERT for grayscale images. Without loss of generality, we postulate that all functions representing grayscale images of interest are defined on the open ball with a prespecified radius (after all, there is no infinitely large image in practice). We model grayscale images/functions by the following definition.
Definition 3.3.
Any element in the function class defined as follows is called a grayscale function or grayscale image
where denotes the distance between two sets.
The condition in Definition 3.3 means that the support of every grayscale function is strictly smaller than the domain . This condition simplifies the proofs of Theorem 3.4 and Eq. (3.16) and can be easily satisfied (e.g., we can always enlarge the radius and extend by zero to satisfy the condition).
Definition of the ERT.
Using the Euler integration defined in Eq. (3.6), we define the ERT of grayscale functions as follows
(3.10) |
and . We may also replace the averaged version in Eq. (3.10) with the floor version or ceiling version ; the transforms corresponding to and are denoted as and , respectively. Eq. (3.9) indicates that the ERT, as well as and , is a generalization of the ECT in the following sense
(3.11) |
Properties of the ERT.
Here, we present several properties of the ERT that will be utilized in later sections. First, the homogeneity of and “Lemma 6” of Baryshnikov and Ghrist (2010) directly imply the following theorem (its proof is omitted)
Theorem 3.2.
Suppose . Then, we have the following:
-
i)
and are positively homogeneous, such that and for all .
-
ii)
is homogeneous, such that for all .
Secondly, we have the following theorem on the measurability of the function .
Theorem 3.3.
Suppose . Then, the function is Borel-measurable, which holds for and as well.
Definition of the SERT.
Theorem 3.3 allows us to define the smooth Euler-Radon transform (SERT) as follows,
(3.12) |
Theorem 3.3 implies that the Lebesgue integrals in Eq. (3.12) are well-defined, and the function is Borel-measurable. Transforms and are defined via and , respectively, in a similar way; they also have the referred properties of . Furthermore, Eq. (3.11) implies that for all .
Comparing the ERT and SERT.
The following theorem indicates that the SERT preserves all information about the ERT under a regularity condition.
Theorem 3.4.
Suppose . If is a right continuous function for each fixed , then can be expressed in terms of ; hence, and determine each other.
The proof of Theorem 3.4 is given in Appendix A.3. We selected right continuity over left continuity in Theorem 3.4 for four reasons. The first reason is to align with Morse theory (see Remark 2.4 in Milnor (1963), on page 20 therein, for a right-continuity result). The second reason is that is not left continuous in general (see Appendix E for examples with right-continuity). The third reason comes from probability theory. When is random, the function is a stochastic process for each fixed ; if is right continuous, it automatically becomes a stochastic process whose sample paths are right continuous with left limit (RCLL). Stochastic processes with RCLL sample paths are well studied in probability theory (e.g., see Section 21.4 of Klenke (2020)). The fourth reason is rooted in the following deliberation: if we view the Euler characteristic as an analog of a probability measure , then is an analog of the cumulative distribution function of a random variable and the function is right continuous.
Invertibility of the ERT and SERT.
In practical applications, grayscale images must be discretized into arrays of pixel intensities (or their higher-dimensional counterparts such as voxels) for storage on electronic devices. Consequently, we can represent grayscale images utilized in these contexts as members of the following piecewise-constant function class
(3.13) |
For any piecewise-constant grayscale image in , the following theorem indicates that does not lose any information about the image and, as a result, justifies the implementation of the ERT in practical applications.
Theorem 3.5.
(i) The restriction of on is invertible for all dimensions . (ii) The restriction of on is invertible for all dimensions .
Theorem 3.5 extends the invertibility findings of the ECT and SECT in “Corollary 1” of Ghrist et al. (2018). A comprehensive proof for Theorem 3.5 can be found in Appendix A.4. The piecewise constant constraint in Theorem 3.5 can be slightly relaxed. Namely, the invertibility of the ERT holds for all grayscale functions that satisfy the “Fubini condition” (see Appendix C). The invertibility of the ERT on , instead of , is still an open problem and is discussed in detail in Appendix C. The main obstacle in solving the open problem is that the “Fubini theorem” in Euler calculus (Ghrist, 2014, Section 3.8) does not hold over real-valued Euler integrands.
3.4 Dual Euler-Radon Transform
As a remark on the invertibility of the ERT presented in Theorem 3.5, we introduce the dual Euler-Radon transform (DERT). Let be the dual kernel of (see Eq. (3.1)) given by
(3.14) |
We define the DERT as follows
(3.15) |
Using the DERT, the following provides an inversion formula for recovering from
(3.16) |
where means that converges to a point on the sphere . The details and proof of Eq. (3.16) are given in Appendix C.
4 Existing Frameworks
In Section 3.3, we demonstrated that the introduced ERT and SERT serve as generalizations of the ECT and SECT, respectively. In this section, we discuss the relationship between our proposed framework and other established transforms: the WECT, LECT, SELECT, and the marginal Euler curve (MEC).
LECT and SELECT.
Kirveslahti and Mukherjee (2023) introduced the LECT and SELECT for the analysis of scalar fields (including grayscale images), motivated by the idea of super-level sets implemented in the topology of Gaussian random fields (Adler et al., 2007, Taylor and Worsley, 2008). Using the notations introduced in Section 3.3, the LECT can be represented as follows
(4.1) |
That is, the LECT transforms -dimensional grayscale images into integer-valued functions defined on a -dimensional manifold. Inspired by Morse theory (Milnor, 1963) and considerations of statistical robustness, the SELECT can be represented as follows
(4.2) |
We have the following result on the functions and , which is an analog of Theorem 3.1.
Theorem 4.1.
Suppose . Then, we have the following:
-
i)
and take only finitely many values as runs through . In addition, for each integer , the sets and are definable; hence, the functions and are definable.
-
ii)
The functions and are Borel-measurable.
MEC.
Relationship with the ERT.
The subsequent theorem establishes a connection between our proposed ERT and the LECT and SELECT — thereby also linking the ERT to both the MEC and WECT.
Theorem 4.2.
Suppose . Then, we have the following Euler integration representation of the via the
(4.4) |
In addition, we have the following Lebesgue integration representations of the and via the and
(4.5) |
In particular, we have the following Lebesgue integration representation of the
(4.6) |
The proof of Theorem 4.2 is in Appendix A.5. Theorem 4.1 guarantees that the Euler integral and Lebesgue integrals in Eqs. (4.4)-(4.6) are well-defined. The representations in Theorem 4.2 will be used to compute the ERT in the next section. Furthermore, with the Fubini theorem, the Lebesgue integration representations in Eq. (4.5) and Eq. (4.6) imply the result in Theorem 3.3.
The representations in Theorem 4.2 connect to our proposed ERT to the MEC and WECT in the following ways:
-
i)
If for all , then we have for all . Hence, — meaning that the is equal to the MEC specified in Eq. (4.3) for nonnegative grayscale functions.
-
ii)
If is nonnegative and for almost every with respect to the Lebesgue measure, Eq. (4.6) implies that . From this viewpoint, we can easily show that the WECT proposed in Jiang et al. (2020) is a special case of our proposed ERT. Jiang et al. (2020) models each grayscale image as a “weighted simplicial complex” in the form for a finite sum (each is a simplex, , and is a finite collection of simplexes), assuming the “consistency condition” for all . The WECT of is defined as follows
Kirveslahti and Mukherjee (2023) show that the WECT of coincides with the MEC of where . Furthermore, the definition of the LECT in Eq. (4.1) indicates that unless for some simplex . Therefore, . Hence, we have for all , if with .
Dissimilarities between Grayscale Images.
Lastly, we may use the ERT and SERT to measure the (dis-)similarity between two grayscale functions. Inspired by the dissimilarity quantities defined in the literature (Turner et al., 2014, Crawford et al., 2020, Meng et al., 2022, Marsh and Beers, 2023, Wang et al., 2023), we introduce the following (semi-)distances between grayscale functions
(4.7) |
where , and the -norm of a function is defined in a two-step process. Initially, we take the -norm with respect to ; then we next take the -norm with respect to (regarding the spherical measure on ). Theorem 3.3 implies that the -norm used in Eq. (4.7) is well-defined. Theorem 3.5 indicates that is a distance, rather than just a semi-distance, on the space defined in Eq. (3.13). Let and belong to . Then, we have the following:
-
•
agrees with the SECT distance stated in Crawford et al. (2020);
-
•
agrees with the ECT distance stated in Curry et al. (2022);
-
•
agrees with the distance stated in Meng et al. (2022), which underpins the generation of the Borel algebra implemented in that work;
-
•
aligns with the distance stated in Marsh and Beers (2023) for the examination of the stability of the ECT;
-
•
agrees with the distance utilized in Wang et al. (2023) for permutation test.
Futhermore, the distances defined in Eq. (4.7) are the analogs of the following distances proposed in Kirveslahti and Mukherjee (2023)
(4.8) |
for . Theorem 4.1 implies that the Lebesgue integrals implemented in the -norms in Eq. (4.8) are well-defined. We will compare the performance of all the referred distances from a statistical inference perspective in Section 8.

5 A Proof-of-Concept Example
Our proposed SERT plays an important role in the statistical inference discussed in Section 5, given its ability to convert grayscale images into functional data. Before delving into the SERT-based statistical inference, in this section, we illustrate the SERT via a proof-of-concept example. Here, we focus on dimensionality and the following scalar field
(5.1) |
The in Eq. (5.1) is a grayscale function (in the sense of Definition 3.3), where with and . A level set of is presented in Figure 3 (the level 0.0834 was specifically chosen to make the visualization of the level set look like a torus). We computed the ERT of the in a sequential manner. We first compute the LECT and SELECT using the MATLAB isosurface procedure. Next, we compute the ERT utilizing the Lebesgue integration representation in Eq. (4.6). Finally, the SERT is derived from the ERT via a standard numerical integration method.
The SERT of the -dimensional grayscale image defined in Eq. (5.1) is a scalar field over the 3-dimensional product manifold , where with . We visualize the following segments of the scalar field
(5.2) |
where and . The maps in Eq. (5.2) are scalar fields over and are presented in the second and third rows of Figure 3.
In Figure 3, the surfaces corresponding to consistently exhibit an approximate periodicity of in the variable (indicated by the axis label “Direction ”). This approximate periodicity is fundamentally derived from the “box-shape” indicator function in Eq. (5.1). The surfaces depicted in Figures 3(e1, e2) and 3(f1, f2) are indistinguishable, which is a characteristic attributed to the - symmetry of the grayscale function defined in Eq. (5.1). The surfaces presented in Figure 3(d1, d2) exhibit subtle distinctions from those in 3(e1, e2, f1, f2). The curves and surfaces in Figure 3, as well as the scalar field , suggest a potential association of the SERT with manifold learning (Yue et al., 2016, Dunson and Wu, 2021, Meng and Eloyan, 2021, Li et al., 2022).

6 Alignment of Images and Invariance of the ERT
In various applications, images are typically aligned before analysis (e.g., Bankman, 2008). Wang et al. (2021) utilized an ECT-based approach to align shapes (equivalently, binary images) through orthogonal actions. The primary aim of the ECT-based strategy is to lessen the difference between a pair of shapes resulting from the orthogonal movements. An in-depth exposition of the ECT-based method, along with a proof-of-concept example, can be found in Supplementary Section 4 of Wang et al. (2021). Analogous correspondence free alignment techniques are also needed for grayscale images. Kirveslahti and Mukherjee (2023) examined the invariance of the LECT with respect to orthogonal alignments and introduced an LECT/SELECT-based alignment method tailored for grayscale images. Motivated by the studies in both Wang et al. (2021) and Kirveslahti and Mukherjee (2023), in this section, we introduce an ERT-based alignment approach. This approach will serve as a preprocessing step for the ERT-based statistical inference detailed in Section 7.
Let represent a reference image designated as a template. For any source image under consideration, we consider a collection of transforms, denoted by , encompassing all transformations of interest. From , we select the transformation such that the transformed image is the most similar to based on a specified dissimilarity metric. Subsequent analysis is then conducted on the aligned image instead of the original source image . A potential choice for the dissimilarity metric can be one of the distances defined in Eq.(4.7), denoted as . This can be summarized as follows
(6.1) |
Beyond the orthogonal actions implemented in Wang et al. (2021) and Kirveslahti and Mukherjee (2023), we also consider scaling transforms of grayscale images, including the “white-to-black” transition. In this paper, we focus on the following collection of transforms
(6.2) |
where denotes the orthogonal group in dimension , and it contains all the rotations and reflections in . For ease of notation, we define the dual of by . The goal of employing minimization across the collection in Eq. (6.2) is to mitigate disparities between two images arising from orthogonal movements and variations in pixel intensity scales.
A challenge in using the criterion presented in Eq. (6.1), combined with any of the dissimilarity metrics in Eq.(4.7), is the computational cost of obtaining for all . More specifically, the computation of is required for every and . Fortunately, the homogeneity of the ERT (see Theorem 3.2) implies for all . Therefore, we can simply calculate and get the for all by simply scaling the computed . Similarly, if we further have the “-homogeneity”, where “,” the amount of computation required in Eq. (6.1) is further reduced. The “-homogeneity” is true and accurately presented by the following result.
Theorem 6.1.
For any and , we have for all and .
Theorem 6.1 is a direct result of “Proposition 2.18” of Kirveslahti and Mukherjee (2023) via Eq. (4.6); hence, we omit its proof. Combining the scalar homogeneity and -homogeneity, we have the following
(6.3) |
for all , , and . Using as an example (see Eq. (4.7) for the definition of ), an optimal transformation across the collection in Eq. (6.2) can be represented via Eq. (6.3) as follows
(6.4) |
In Eq. (6.4), we only need to compute the ERT of and instead of all the for all and . Notably, when both and are indicator functions representing constructible sets, the alignment method detailed in Eq. (6.4) is equivalent to the ECT-based alignment method proposed in Wang et al. (2021).
To illustrate the performance of the alignment approach described in Eq. (6.4), we present a proof-of-concept example. Our benchmark criterion for assessing the efficacy of the alignment approach is its ability to eliminate differences between images arising from rotation and scaling. Let denote the grayscale function defined in Eq. (5.1). We will study the scaled and rotated version of , where denotes the dual of the rotation matrix defined as
(6.5) |
which represents rotation on the -plane by angle . Obviously, the differences between the source image and the reference image vanish if and only if and (i.e., no rotation or scaling). Hence, in this example, our proposed alignment approach is effective if
(6.6) |
To validate Eq. (6.6), we analyze the surface of the following function of
(6.7) |
which is presented in Figure 4. The surfaces presented in Figure 4 confirm the minimization in Eq. (6.6) — the minimum point of the surface corresponds to the coordinates , implying that our alignment approach delineated in Eq. (6.4) is effective.
To illustrate the performance of the proposed alignment approach in our proof-of-concept example, we consider the defined in Eq. (5.1) as the reference image, as depicted in Figure 5(a). Next, with parameters is selected as the source image, as illustrated in Figure 5(b). The source image is a rotated and scaled version of the reference image. Aligning the source image with respect to the reference yields the post-aligned source image shown in Figure 5(c). The reference image in Figure 5(a) and post-aligned source image in Figure 5(c) are nearly congruent. This similarity underscores the efficacy of the proposed alignment methodology in mitigating discrepancies attributable to rotations and scaling.

7 Statistical Inference of Grayscale Functions
We now provide our second major contribution — approaches for statistical inference on grayscale images. The grayscale functions presented in the previous sections of this work have been viewed as deterministic. In this section, we now view grayscale functions as random where we assume that they are generated from underlying distributions satisfying some regularity conditions (see Assumptions 2 and 3 in Section 7.1). Let denote the collection of grayscale functions of interest, and assume that is equipped with a -field . Next, suppose that there are two underlying grayscale function-generating distributions (probability measures), and , defined on the sample space . Our data are two collections of random grayscale functions sampled from the two distributions: and . Here, we provide approaches to testing if the two collections of functions are significantly different. More precisely, we propose methods of testing the following hypotheses
(7.1) |
Without loss of generality, hereafter, we assume that the grayscale images and have been aligned using the ERT-based alignment method proposed in Section 6.
7.1 -test via the Karhunen–Loève Expansion
In this subsection, we propose -based hypothesis testing procedures via the Karhunen–Loève expansion and central limit theorem (CLT). These can be as generalizations of results presented in Meng et al. (2022) for the SECT and binary images. Testing the hypotheses in Eq. (7.1) is a highly nonparametric problem, and the -test approaches transform it into a parametric problem.
Suppose the grayscale image is random and for either or . For each fixed , we have as a real-valued random variable. Hence, for each fixed direction , is a stochastic process. Note that it is straightforward that the sample paths of the stochastic process are continuous (see Eq. (3.12)). In this section, we assume the following regarding and .
Assumption 2.
For each and , we have the finite second moment .
Under Assumption 2, we define the mean and covariance functions of as follows
for , , and , where denotes the expectation associated with the probability measure . Furthermore, we need the following assumption on the covariance functions.
Assumption 3.
For each and fixed , the function is continuous on the product space .
Under Assumption 3, the stochastic process is mean-square continuous, which is a direct result of “Lemma 4.2” of Alexanderian (2015). The mean-square continuity implies that is a continuous function over the compact interval .
Distinguishing the two collections of grayscale images, and , is done by rejecting the null hypothesis in Eq. (7.1). To reject the null in Eq. (7.1), it suffices to reject the null hypothesis in the following test
(7.2) |
We need the following assumption to perform a -test for the hypotheses in Eq. (7.2).
Assumption 4.
where the direction is defined in Eq. (7.2).
Assumption 4 is true under the null in Eq. (7.1). Under Assumption 4, we denote . Under Assumption 3, we have which further implies that the integral operator defined on is a compact, positive, and self-adjoint (see “Lemma 5.1” of Alexanderian (2015)). The Hilbert-Schmidt theorem (see “Theorem VI.16” of Reed (2012)) indicates that this integral operator has countably many orthonormal eigenfunctions and nonnegative eigenvalues . Without loss of generality, we assume . Following the proof of the “Karhunen-Loève expansion” in Meng et al. (2022), one can show the following result.
Theorem 7.1.
Suppose and are independent. Let denote a product probability measure. For each fixed , the following identity holds with probability one
(7.3) |
that is, , where,
(7.4) |
Furthermore, for each , random variables are defined on the probability space , mutually uncorrelated, and have mean 0 and variance 1.
Following the discussion in Meng et al. (2022), one can show that the null hypothesis in Eq. (7.2) is equivalent to for all . It is infeasible to check for all positive integers . In addition, a small in the denominator (e.g., see Eq. (7.4)) induces numerical instability. Therefore, we only consider for , where is given as the following
(7.5) |
Here, 0.99 can be replaced with any value in ; we take 0.99 as an example. The defined in Eq. (7.5) is motivated by principal component analysis (Jolliffe, 2002) and indicates that we maintain at least of the cumulative variance in the data. Hence, to test the hypotheses in Eq. (7.2), we may test the following approximate hypotheses
(7.6) |
Given data and , the approximate hypotheses in Eq. (7.6) can be tested using the random variables defined as follows
Theorem 7.5 implies that the random variables satisfy the following properties:
-
•
For each and , the random variable has mean and variance 1.
-
•
For each fixed , the random variables are mutually uncorrelated.
-
•
For each fixed , the random variables are iid.
The properties above indicate:
-
i)
For each fixed , the standardized asymptotically follows a standard Gaussian distribution under the null hypothesis in Eq. (7.6).
-
ii)
The asymptotic normality implies that random variables are asymptotically independent.
Hence, is asymptotically under the null hypothesis in Eq. (7.6), and we reject with asymptotic significance if
(7.7) |
Overall, we summarize our hypothesis testing problem as follows. Our goal is to test the hypotheses in Eq. (7.1). Through the Karhunen–Loève expansion (see Theorem 7.1), it suffices to test the approximate hypotheses in Eq. (7.6), which can be achieved by the -test in Eq. (7.7).
Suppose we have two groups of grayscale functions, and . We calculate the discretized SERT of the grayscale images, denoted as for . Then, we apply and as our input data to test the hypotheses in Eq. (7.2), which are approximated by that in Eq. (7.6). We may apply “Algorithm 1” in Meng et al. (2022) to test the hypotheses in Eq. (7.6) by simply replacing the “SECT of two collections of shapes” therein with the “SERT of two collections of grayscale functions”. The replacing of the SECT with SERT approach is explicitly summarized in Algorithm 1.
Although the null hypothesis in Eq. (7.1) theoretically implies Assumption 4, the finite sample size may numerically violate Assumption 4 due to the inaccuracy in the estimation of covariance functions. The (numerical) violation of Assumption 4 tends to lead to type-I error inflation. To reduce the type-I error rate, we apply a permutation technique (Good, 2013). That is, we first apply Algorithm 1 to our original grayscale images and then repeatedly re-apply Algorithm 1 to the grayscale images with shuffled group labels . Next, we compare how the statistic derived from the original data (see Eq. (7.7)) differs from that computed on the shuffled data. The idea behind the permutation approach is that shuffling the group labels of images should not significantly change the test statistic under the null hypothesis. The combination of the permutation technique and Algorithm 1 is an analog of the permutation test proposed in Meng et al. (2022). We summarize this method in Algorithm 2. Among the algorithms we propose throughout, we particularly recommend using Algorithm 2 in practice — this is also supported by simulation study results presented in Section 8. Specifically, we will show that Algorithm 2 is uniformly powerful under the alternative hypotheses and does not suffer from type I error inflation.
7.2 Full Permutation Test
In Section 7.1, we proposed two parametric-based approaches — Algorithms 1 and 2 — to testing the hypotheses in Eq. (7.1). Although Algorithm 2 involves a permutation-like technique, it still heavily depends on the -test in Eq. (7.7). In contrast, we also propose a full permutation hypothesis test. We will also compare this approach with Algorithms 1 and 2 using simulations in Section 8. The simulation studies therein indicate that our proposed Algorithms 1 and 2 tend to be more powerful than the fully permutation-based test. Following a strategy proposed by Robinson and Turner (2017), we apply the full permutation test based on the following loss function
(7.8) |
where (see Eq. (4.7) and Eq. (4.8)). The full permutation test based on Eq. (7.8) is summarized in Algorithm 3.


8 Numerical Experiments
In this section, we show the performance of our proposed Algorithms 1, 2, and 3 using simulations. Specifically, we generate grayscale functions from a family of random fields and apply our proposed algorithms to them. Motivated by the simulation designs in Meng et al. (2022) and Kirveslahti and Mukherjee (2023), we apply Algorithms 1-3 to the following family of random grayscale functions
where is a deterministic index, are iid random variables, , and all the random variables are independent. Let denote the underlying distribution corresponding to . All the realizations of belong to with and . The level sets for different indices are presented in Figure 6.
Null | Alternative | ||||||
---|---|---|---|---|---|---|---|
Indices | 0.000 | 0.050 | 0.100 | 0.125 | 0.150 | 0.200 | 0.300 |
RRs of Algorithm 1 | 0.18 | 0.21 | 0.43 | 0.59 | 0.79 | 0.99 | 1.00 |
RRs of Algorithm 2 | 0.05 | 0.08 | 0.22 | 0.30 | 0.52 | 0.86 | 1.00 |
RRs of Algorithm 3 with | 0.05 | 0.02 | 0.16 | 0.27 | 0.40 | 0.86 | 1.00 |
RRs of Algorithm 3 with | 0.05 | 0.06 | 0.14 | 0.23 | 0.34 | 0.78 | 1.00 |
RRs of Algorithm 3 with | 0.04 | 0.02 | 0.14 | 0.27 | 0.34 | 0.64 | 1.00 |
RRs of Algorithm 3 with | 0.05 | 0.02 | 0.16 | 0.27 | 0.40 | 0.86 | 1.00 |
We apply our proposed algorithms to test the following hypotheses
(8.1) |
The null hypothesis in Eq. (8.1) is true if and only if . We generate realizations of . Then, for each , we generate realizations of . We apply Algorithms 1, 2, and 3 to the two collections of generated grayscale functions to test the hypotheses in Eq. (8.1) with significance (i.e., the expected type I error rate is 0.05). We repeat this procedure 100 times, go through values of , and present the rejection rates across the 100 repetitions in Table 1 and Figure 7. The numerical experiment results can be summarized as follows:
-
i)
Among all the algorithms, Algorithm 1 is the most powerful under the alternative hypothesis where . However, it suffers from type I error inflation — meaning that the expected rejection rate when is 0.05 but the rejection rate of Algorithm 1 is higher. As previously mentioned, the type I error inflation of Algorithm 1 stems from the numerical violation of Assumption 4.
-
ii)
Algorithm 2, which is a combination of the permutation technique and Algorithm 1, does not suffer from type I error inflation. While the power of Algorithm 2 is lower than that of Algorithm 1 under the alternative hypothesis, it is still uniformly more powerful than the full permutation test in Algorithm 3 with all the four distance inputs .
-
iii)
The four distance inputs for Algorithm 3 result in comparable hypothesis testing performance. Particularly, the and result in the same performances when we apply them to Algorithm 3, which results from the similarity between the ERT and MEC. One theoretical advantage of the ERT over the MEC is that the ERT is homogeneous (i.e., for all ).
The results described above are similar to those shown in Meng et al. (2022) for numerical experiments conducted on random binary images. Based on the experiment results concluded above, we recommend Algorithm 2 in applications for the following reason: it is uniformly powerful (compared with the fully permutation-based Algorithm 3) and does not suffer from type I error inflation.
9 Discussion
The ultimate goal of our study is to generalize a series of ECT-based methods (Crawford et al., 2020, Wang et al., 2021, Meng et al., 2022, Marsh et al., 2022) to the analysis of grayscale images. In this paper, we took an initial step towards this goal by proposing an ECT-like topological summary, the ERT. The framework proposed in Baryshnikov and Ghrist (2010) provides solid mathematical foundations for our proposed ERT. Building upon the ERT, we introduced the SERT as a generalization of the SECT (Crawford et al., 2020, Meng et al., 2022). Importantly, the SERT represents grayscale images as functional data. By applying the Karhunen–Loève expansion to the SERT, we have proposed effective statistical algorithms (see Algorithms 1-3) designed to detect significant differences between two sets of grayscale images. Particularly, Algorithm 2 was shown in simulations to be uniformly powerful while not suffering from type I error inflation.
There are many motivating questions for future research. A few of them from the biomedical perspective include:
-
i)
Significantly different images usually correspond to different clinical outcomes (e.g., survival rates). Crawford et al. (2020) used the SECT on binary images of GBM tumors as the predictors in statistical inference. Here, the authors showed that the SECT has the power to predict clinical outcomes better than existing tumor quantification approaches. A natural generalization of the approach in Crawford et al. (2020) is the development of an SECT-like statistic designed for grayscale images which could prove to be powerful in terms of predicting clinical outcomes. For instance, one may consider analyzing the grayscale images in Figure 1 to predict the clinical outcomes of the corresponding lung cancer patients.
-
ii)
Suppose grayscale images can successfully predict a clinical outcome of interest. In that case, a subsequent question from the sub-image analysis viewpoint is: can we identify the physical features in the grayscales image that are most relevant to the clinical outcome? For binary images (equivalently, shapes), Wang et al. (2021) proposed an efficient method of seeking the desired physical features of shapes via the ECT. One may consider generalizing the method in Wang et al. (2021) to deal with grayscale images.
-
iii)
Tumors change over time. Hence, having the ability to study dynamically changing/longitudinal grayscale images is an area of interest. Using the ECT and SECT, Marsh et al. (2022) introduced the DETECT framework to analyze the dynamic changes in shapes. One may consider generalizing the DETECT approach to analyze the dynamic changes in grayscale images.
Lastly, another future direction would be to employ statistical methods analogous to those described in Section 7 for the analysis of networks using curvature-based approaches (Wu et al., 2022).
Software Availability
Code for implementing the Euler-Radon transform (ERT), the smooth Euler-Radon transform (SERT), as well as the lifted Euler characteristic transform (LECT) and the super lifted Euler characteristic transform (SELECT) is freely available at https://github.com/JinyuWang123/ERT.
Acknowledgements
LC would like to acknowledge the support of a David & Lucile Packard Fellowship for Science and Engineering. Research reported in this publication was partially supported by the National Institute On Aging of the National Institutes of Health under Award Number R01AG075511. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.
Statements and Declarations
The authors declare no competing interests.
Appendix A Proofs
A.1 Proof of Eq. (3.9)
Proof.
For any and , we have . Hence,
Similarly, we have that . Therefore, we have . Since for all , we obtain Eq. (3.9).
A.2 Proof of Theorem 3.1
We need the following lemma in van den Dries (1998).
Lemma A.1 (rephrased “(2.10) Proposition,” Chapter 4 of van den Dries (1998)).
Let be definable and for each . Then, takes only finitely many values as runs through . Furthermore, for each integer , the set is definable.
Proof.
(Proof of Theorem 3.1.) We implement Lemma A.1 by defining the following
-
i)
;
-
ii)
;
-
iii)
. Since , the set is definable under Assumption 1.
Then, for each fixed , we have
Lemma A.1 implies that takes only finitely many values as runs through . Therefore, takes only finitely many values as runs through .
A.3 Proof of Theorem 3.4
Proof.
It is straightforward that determines . It suffices to show that determines .
For every fixed direction , the definition of implies
for all that are not discontinuities of . Recall that the support of is strictly smaller than the domain . For any , we have for all , which indicates that . Hence,
which implies
(A.1) |
for all that are not discontinuities of . The right continuity of implies that Eq. (A.1) holds for all . That is, determines through Eq. (A.1). The proof is completed.
A.4 Proof of Theorem 3.5
Before the proof of Theorem 3.5, we suggest the audiences read Appendix C, especially Proposition C.1, as a prerequisite for the proof. A takeaway message from Appendix C is that the ERT is invertible if the “Fubini condition” (Eq. (C.2)) is satisfied. In addition to Appendix C, we need the following lemma as a prerequisite
Lemma A.2.
If , we have
for all .
Proof.
Both and are compactly supported real-valued definable functions; the images of and are both finite-point sets in . The equality above then follows from Lemma B.1 and the homogeneity of .
The following lemma implies the Fubini condition is satisfied by piecewise constant definable functions with compact support.
Lemma A.3.
Suppose is a definable set and is a bounded subset of for some positive integer . If function takes finitely many values, we have the following
for all .
Proof.
Suppose takes values in with . Denote for and . By the “cell decomposition theorem” (see Chapter 3 of van den Dries (1998)), there exists a finite decomposition of such that, for each , the restriction is continuous. Denote ; obviously, is a finite definable partition of . Furthermore, for every component , is continuous on and is a constant (say ) on .
For each , define the restriction . Since is continuous on , the “trivialization theorem” (see Chapter 9 of van den Dries (1998)) implies that there exists a finite definable partition of such that is definably trivial over for each . That is, for each , there exists a definable set for some and a definable map such that is a homeomorphism; furthermore, , where is a projection map, and is definably homeomorphic to for each .
The additivity of Euler characteristics implies
Lemma A.1 implies that is a constructible function defined on . Therefore, Lemma A.2, together with the additivity of Euler characteristics, implies the following
Since all fibers for are all definably homeomorphic to , we have for all . Hence, we have
Since, for each , is a partition of , we have
Applying Lemma A.2 again, we have
This concludes the proof.
Proof of Theorem 3.5.
Our goal is to prove that Eq. (C.2) is true if , which implies the desired invertibility via Proposition C.1.
For the ease of notations, we will denote and . Let be any point in and fixed. The kernel functions and are defined in Eq. (3.1) and Eq. (3.14), respectively. Let . Then, the function belongs to and takes finitely many values. Consider the standard projection maps and as follows
Combining the two equations above gives the desired Eq. (C.2).
Lastly, the invertibility of the SERT follows from Theorem 3.4. The proof is completed.
A.5 Proof of Theorem 4.2
Appendix B Definability vs. Tameness of Functions
In the literature on TDA, one may often come across the concept of tameness. The word “tame” is also often used interchangeably with “definable.” The concept of definability is presented in Definition 3.2, and the concept of tameness can be found in Bobrowski and Borman (2012). In this section, we analyze the relationship between them. To avoid confusion, we will not interchange the words “definable” and “tame” in this paper.
B.1 Tameness
We first go through the concept of tameness as follows, which is a generalized version of “Definition 2.2” in Bobrowski and Borman (2012).
Definition B.1.
Let be a topological space with finite and a continuous bounded function. For each , we define the super-level set at as and the sub-level set . The function is said to be tame if it satisfies the following two conditions
-
•
The homotopy types of and change finitely many times as varies through ;
-
•
the homology groups of and are all finitely generated for all .
Similar to Definition B.1, we define the following
Definition B.2.
Let be a topological space with finite . A (not necessarily continuous) bounded function is said to be EC-tame if the Euler characteristics and are finite for all and change only finitely many times as varies through .
Note that the definition of “tame functions” in Bobrowski and Borman (2012) are equivalent to continuous EC-tame functions on compact topological space in our context.
B.2 Relationship between Tameness and Definability
In general, it is not the case that a tame function is definable in the o-minimal sense, which is illustrated by the following example.
Example B.1.
Let denote the Warsaw circle (see Figure 8) defined as the union of the closed topologist’s sine curve and an arc “joining” the two ends of the topologist’s sine curve:

itself is not definable. However, is compact as it is bounded and is the union of two closed sets (the closed topologist’s sine curve and ). Now consider the constant continuous function that sends every point to - the graph of this function is and is not definable. Hence, is not definable.
On the other hand, the function is a tame function. This is because the Warsaw Circle is known to be simply connected and has all trivial homology groups beyond dimension .
Remark B.1.
If is a tame function between two definable sets, would be definable? The answer is no. Consider the indicator function on the Warsaw circle .
Conversely, a function that is definable in the o-minimal sense does not have to be tame either. The most obvious obstruction comes from the distinction that definable functions need not be continuous nor bounded. However, when we remove the trivial distinctions between the two, we do have the following result:
Proposition B.1.
Suppose is definable. If the function is continuous, bounded, and definable, then is tame.
Proof.
Let be the graph of and let be the standard projection function, we observe that is the set and is thus definable.
By the triangulation theorem (see Chapter 8 of van den Dries (1998)), it follows that is definably homeomorphic to a subcollection of open simplices in some finite Euclidean simplicial complex, which implies that the homology groups of are all finitely generated. The case for is similar.
Since is a continuous definable function between definable sets, the “trivialization theorem” (see Chapter 9 of van den Dries (1998)) asserts that there exists a definable partition of into finitely many definable sets such that, for any , there exists a definable set , for some dimension , making the following diagram commute
where is the function restricted to with , is a homeomorphism, is a continuous map, and is the standard projection map.
It is straightforward to have the following disjoint union
(B.1) |
To show that the homotopy type of changes finitely many times, Eq. (B.1) indicates that it suffices to verify that, for each projection map , the homotopy type of the super-level sets of changes finitely many times. Indeed, since , the set is a finite union of points and open intervals. The homotopy type of changes only when crosses the isolated points and boundary points of . The verification for the sub-level sets is similar. Hence, is a tame function.
B.3 A Useful Formula
We use Proposition B.1 to prove a variant of “Proposition 7.2” in Bobrowski and Borman (2012), which will be implemented in Appendix C.
Lemma B.1.
Suppose the topological space is definable, and functions are definable. If the image of is discrete and is bounded, then we have the following formula
The formula holds similarly for .
Proof.
Since belongs to and is discrete, must be a finite point set, say . We can then partition into such that
In addition, the “cell decomposition theorem” (see Chapter 3 of van den Dries (1998)) indicates that there exists a cell decomposition of such that is continuous on each cell in . Hence, without loss of generality, we may assume that is continuous on each .
By additivity of Euler characteristics, we can decompose as follows
It then suffices to verify . Since is continuous on for each , Proposition B.1 implies that is tame. Then, it follows from “Proposition 2.4” of Bobrowski and Borman (2012) that
where is the set of values (referred to as critical values) at which the homotopy type of changes; and is the change in Euler characteristic:
(B.2) |
for sufficiently small .
Since is bounded, so there exists such that and . The sum then collapse as a telescoping sum to (see Eq. (B.2)), hence
The proof is completed.
Appendix C Discussions on the Invertibility of the ERT
In this section, we discuss the invertibility of the ERT, especially its dependence on the “Fubini condition.” This section provides a prerequisite for the proof of Theorem 3.5.
Let and . Schapira (1995) and the proof of “Theorem 5” in Ghrist et al. (2018) show the following
(C.1) |
where is the dual kernel defined in Eq. (3.14), and if and is otherwise.
We recall the dual Euler-Radon transform (DERT) in Equation 3.15 as follows
The following proposition shows the relationship between the ERT and DERT, which is the core of the proof of Theorem 3.5.
Proposition C.1.
Suppose . If the following condition (referred to as the “Fubini condition” hereafter) holds
(C.2) |
we have the following formula
(C.3) |
where and .
Before providing the proof of Proposition C.1, we explain how Eq. (C.3) implies the invertibility of the ERT. Since has compact support, we have , where means that converges to a point on the sphere . Therefore, we have
The limit above implies
which is the inversion formula in Eq. (3.16) and shows the invertibility of the ERT.
We provide the proof of Proposition C.1 as follows
Proof of Proposition C.1.
For ease of notation, let and . Then, we have
The Fubini condition in Eq. (C.2) implies
Eq. (C.1) indicates the following
For each fixed , the function of is clearly discrete. Then, Lemma B.1 implies
Evaluating the two integrals above and keeping in mind that is homogeneous, we have that
that is, the proof of Eq. (C.3) is completed.
The Fubini condition specified above does fail in general. Plenty of examples are given in “Corollary 6” of Baryshnikov and Ghrist (2010). In “Theorem 7” of Baryshnikov and Ghrist (2010), this condition does hold when the definable function preserves fibers, ie. if is definable and is constant on the fibers of , then
Unfortunately, this does not help much in the discussion of invertibility. The typical Fubini’s Theorem for that swaps the order of integration
is a consequence of choosing to be the projection maps and . However, if we additionally impose the constraint that is constant on the fibers of and , this is the same as requiring to be identically constant on .
Appendix D Discussion on
Let be a kernel function with a bandwidth (e.g., see Eq. (D.1)), and the convolution of two functions. Although almost everywhere (e.g., see “Theorem 4.1” of Stein and Shakarchi (2011)), it is not generally true that . This phenomenon is symbolic of the general principle that a set of Lebesgue measure zero may not be of Euler characteristic zero.
Let be a kernel function with a bandwidth . For example
(D.1) |
Let denote the convolution of two functions,
Furthermore, we set , , and for .
Although almost everywhere (e.g., see “Theorem 4.1” of Stein and Shakarchi (2011)), the following limit is generally not true
(D.2) |
The failure of Eq. (D.2) is emblematic of the general principle that a set of Lebesgue measure zero may not be of Euler characteristic zero. The failure of Eq. (D.2) is illustrated by the following example.
Example D.1.
Consider the shape defined by the following where

Choose and any , then has the homotopy type of . Hence, .
On the other hand, since , it follows from Theorem 4.2 that,
(D.3) |
Omitting endpoint behaviors, for and sufficiently small (see Figure 9), the level set for has the homotopy type of the disjoint union of two circular arcs, hence its Euler characteristic is . On the other hand, the super-level set for has the homotopy type of a solid circular arc, hence its Euler characteristic is . Thus, we find that
That is, for all .
Appendix E is not left continuous
In this section, we provide two simple examples that is not left continuous for some fixed direction .
Example E.1.
Let and consider the indicator function on . Since the input function is integer-valued, we have that for any direction . Computing for all , we have that for and for . In particular, this shows that is right continuous but not left continuous.
Example E.2.
Let and . We consider the grayscale function defined as follows
Clearly, whenever . For , we have for all . Therefore, for all .
Now for , since , by Eq. (4.6), we can write
Recall from Equation 4.1 that
(E.1) |
For any and , the level set in Eq. (E.1) is either the empty set or is compact contractible. Specifically, we have the following
Similarly, from Equation 4.2, we have that
It follows that for ,
Finally, for , we have . Hence, . We conclude that is right continuous but not left continuous.
References
- Adler et al. (2007) R. J. Adler, J. E. Taylor, et al. Random fields and geometry, volume 80. Springer, 2007.
- Aerts et al. (2014) H. J. Aerts, E. R. Velazquez, R. T. Leijenaar, C. Parmar, P. Grossmann, S. Carvalho, J. Bussink, R. Monshouwer, B. Haibe-Kains, D. Rietveld, et al. Decoding tumour phenotype by noninvasive imaging using a quantitative radiomics approach. Nature communications, 5(1):4006, 2014.
- Alexanderian (2015) A. Alexanderian. A brief note on the Karhunen-Loève expansion. arXiv preprint arXiv:1509.07526, 2015.
- Ashburner (2007) J. Ashburner. A fast diffeomorphic image registration algorithm. Neuroimage, 38(1):95–113, 2007.
- Bankman (2008) I. Bankman. Handbook of medical image processing and analysis. Elsevier, 2008.
- Baryshnikov and Ghrist (2010) Y. Baryshnikov and R. Ghrist. Euler integration over definable functions. Proceedings of the National Academy of Sciences, 107(21):9525–9530, 2010.
- Baryshnikov et al. (2011) Y. Baryshnikov, R. Ghrist, and D. Lipsky. Inversion of Euler integral transforms with applications to sensor data. Inverse problems, 27(12):124001, 2011.
- Bobrowski and Borman (2012) O. Bobrowski and M. S. Borman. Euler integration of gaussian random fields and persistent homology. Journal of Topology and Analysis, 04(01):49–70, 2012. doi: 10.1142/s1793525312500057.
- Bredon (2012) G. E. Bredon. Sheaf theory, volume 170. Springer Science & Business Media, 2012.
- Brezis (2011) H. Brezis. Functional analysis, Sobolev spaces and partial differential equations, volume 2. Springer, 2011.
- Brooks and Grigsby (2013) F. J. Brooks and P. W. Grigsby. Quantification of heterogeneity observed in medical images. BMC medical imaging, 13(1):1–12, 2013.
- Carlsson (2009) G. Carlsson. Topology and data. Bulletin of the American Mathematical Society, 46(2):255–308, 2009.
- Chen and Rabadán (2017) A. X. Chen and R. Rabadán. A fast semi-automatic segmentation tool for processing brain tumor images. In Towards Integrative Machine Learning and Knowledge Extraction: BIRS Workshop, Banff, AB, Canada, July 24-26, 2015, Revised Selected Papers, pages 170–181. Springer, 2017.
- Crawford et al. (2020) L. Crawford, A. Monod, A. X. Chen, S. Mukherjee, and R. Rabadán. Predicting clinical outcomes in glioblastoma: an application of topological and functional data analysis. Journal of the American Statistical Association, 115(531):1139–1150, 2020.
- Curry et al. (2022) J. Curry, S. Mukherjee, and K. Turner. How many directions determine a shape and other sufficiency results for two topological transforms. Transactions of the American Mathematical Society, Series B, 9(32):1006–1043, 2022.
- Dunson and Wu (2021) D. B. Dunson and N. Wu. Inferring manifolds from noisy data using gaussian processes. arXiv preprint arXiv:2110.07478, 2021.
- Eloyan et al. (2020) A. Eloyan, M. S. Yue, and D. Khachatryan. Tumor heterogeneity estimation for radiomics in cancer. Statistics in medicine, 39(30):4704–4723, 2020.
- Ghrist et al. (2018) R. Ghrist, R. Levanger, and H. Mai. Persistent homology and Euler integral transforms. Journal of Applied and Computational Topology, 2(1):55–60, 2018.
- Ghrist (2014) R. W. Ghrist. Elementary applied topology, volume 1. Createspace Seattle, 2014.
- Good (2013) P. Good. Permutation tests: a practical guide to resampling methods for testing hypotheses. Springer Science & Business Media, 2013.
- Howell (2006) S. B. Howell. Handbook of CCD astronomy, volume 5. Cambridge University Press, 2006.
- Hsing and Eubank (2015) T. Hsing and R. Eubank. Theoretical foundations of functional data analysis, with an introduction to linear operators, volume 997. John Wiley & Sons, 2015.
- Jiang et al. (2020) Q. Jiang, S. Kurtek, and T. Needham. The weighted Euler curve transform for shape and image analysis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 844–845, 2020.
- Jolliffe (2002) I. T. Jolliffe. Principal component analysis for special types of data. Springer, 2002.
- Just (2014) N. Just. Improving tumour heterogeneity mri assessment with histograms. British journal of cancer, 111(12):2205–2213, 2014.
- Kidder and Haar (1995) S. Q. Kidder and T. H. V. Haar. Satellite meteorology: an introduction. Gulf Professional Publishing, 1995.
- Kirveslahti and Mukherjee (2023) H. Kirveslahti and S. Mukherjee. Representing fields without correspondences: the lifted euler characteristic transform. Journal of Applied and Computational Topology, pages 1–34, 2023.
- Klenke (2020) A. Klenke. Probability theory: a comprehensive course. Springer, 2020.
- Li et al. (2022) D. Li, M. Mukhopadhyay, and D. B. Dunson. Efficient manifold approximation with spherelets. Journal of the Royal Statistical Society Series B: Statistical Methodology, 84(4):1129–1149, 2022.
- Maldonado et al. (2021) F. Maldonado, C. Varghese, S. Rajagopalan, F. Duan, A. B. Balar, D. A. Lakhani, S. L. Antic, P. P. Massion, T. F. Johnson, R. A. Karwoski, et al. Validation of the broders classifier (benign versus aggressive nodule evaluation using radiomic stratification), a novel hrct-based radiomic classifier for indeterminate pulmonary nodules. European Respiratory Journal, 57(4), 2021.
- Marsh and Beers (2023) L. Marsh and D. Beers. Stability and inference of the Euler characteristic transform. arXiv preprint arXiv:2303.13200, 2023.
- Marsh et al. (2022) L. Marsh, F. Y. Zhou, X. Quin, X. Lu, H. M. Byrne, and H. A. Harrington. Detecting temporal shape changes with the Euler characteristic transform. arXiv preprint arXiv:2212.10883, 2022.
- Meng and Eloyan (2021) K. Meng and A. Eloyan. Principal manifold estimation via model complexity selection. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 83(2):369–394, 2021.
- Meng et al. (2022) K. Meng, J. Wang, L. Crawford, and A. Eloyan. Randomness and statistical inference of shapes via the smooth Euler characteristic transform. arXiv preprint arXiv:2204.12699, 2022.
- Milnor (1963) J. W. Milnor. Morse theory. Number 51. Princeton university press, 1963.
- Reed (2012) M. Reed. Methods of modern mathematical physics: Functional analysis. Elsevier, 2012.
- Reed (2005) S. J. B. Reed. Electron microprobe analysis and scanning electron microscopy in geology. Cambridge university press, 2005.
- Robinson and Turner (2017) A. Robinson and K. Turner. Hypothesis testing for topological data analysis. Journal of Applied and Computational Topology, 1:241–261, 2017.
- Schapira (1995) P. Schapira. Tomography of constructible functions. In Applied Algebra, Algebraic Algorithms and Error-Correcting Codes: 11th International Symposium, AAECC-11 Paris, France, July 17–22, 1995 Proceedings 11, pages 427–435. Springer, 1995.
- Stein and Shakarchi (2011) E. M. Stein and R. Shakarchi. Fourier analysis: an introduction, volume 1. Princeton University Press, 2011.
- Taylor and Worsley (2008) J. E. Taylor and K. J. Worsley. Random fields of multivariate test statistics, with applications to shape analysis. 2008.
- Turner et al. (2014) K. Turner, S. Mukherjee, and D. M. Boyer. Persistent homology transform for modeling shapes and surfaces. Information and Inference: A Journal of the IMA, 3(4):310–344, 2014.
- van den Dries (1998) L. P. D. van den Dries. Tame topology and o-minimal structures, volume 248. Cambridge university press, 1998.
- Vishwanath et al. (2020) S. Vishwanath, K. Fukumizu, S. Kuriki, and B. Sriperumbudur. On the limits of topological data analysis for statistical inference. arXiv e-prints, pages arXiv–2001, 2020.
- Wang et al. (2021) B. Wang, T. Sudijono, H. Kirveslahti, T. Gao, D. M. Boyer, S. Mukherjee, and L. Crawford. A statistical pipeline for identifying physical features that differentiate classes of 3d shapes. The Annals of Applied Statistics, 15(2):638–661, 2021.
- Wang et al. (2023) J. Wang, K. Meng, and F. Duan. Hypothesis testing for medical imaging analysis via the smooth euler characteristic transform. arXiv preprint arXiv:2308.06645, 2023.
- Wu et al. (2022) S. Wu, H. Cheng, J. Cai, P. Ma, and W. Zhong. Subsampling in large graphs using ricci curvature. In The Eleventh International Conference on Learning Representations, 2022.
- Yue et al. (2016) C. Yue, V. Zipunnikov, P.-L. Bazin, D. Pham, D. Reich, C. Crainiceanu, and B. Caffo. Parameterization of white matter manifold-like structures using principal surfaces. Journal of the American Statistical Association, 111(515):1050–1060, 2016.