The problem of fitting an ellipse to geometric features like the contour is discussed widely in the literature (e.g., [
19,
20]). This work follows Ahn et al. [
19], who proposed a least-square minimizer for
. The nonlinear estimate of parameters
given
must minimize the error
Definition 1
(Best fitting ellipse (BFE)). A best fitting ellipse for slice
S
nl
is defined by the set
,
l = 1,…,
L
n
,
n = 1,…,
N and minimizes the error function
g, i.e.,
with
(2)
The first and second principal axes must be reordered after calculation of in order to establish correspondence between parameters of adjacent slices and across the population. Improved correspondence will support accurate statistics. The basic idea in our reordering procedure is to carry out the reordering corresponding to the lowest rotation angle of both principal axes to the first principal axis of the neighbor slice where the center slice is chosen as the basis. The rotation between the center slice M and an arbitrary slice is constrained by max(|ϕ
i
- ϕ
M
|) = π, i∈ {1,…,L} after reordering. Therefore, the set BFE
n
of reordered best-fitting ellipses is an element of .
A further improvement of correspondence is achieved by the introduction of two additional constraints in the parameter model.
First, we relax the rotation parameter
ϕ
nl
in case of circularity. If both principal axes have the same length, the orientation of an ellipse is undefined. Therefore we penalize
ϕ
nl
in the case of high circularity by taking
from the neighboring slices into account. Second, smoothing is performed between neighboring slices to avoid large forward and backwards rotations between
ϕ
n (l - 1),
ϕ
nl
and
ϕ
n (l + 1). The reordering algorithm and implementation of constraints are described in detail in Additional file
1.
The current implementation assumes the definition of control points
CP
n
in the training data set {
V
n
,
X
n
,
BFE
n
}, where
is a reordered set of best fitting ellipses,
n = 1,...,
N. Furthermore, the control points have to be defined manually by a physician in a new patient data set. The control points are used to make the best fitting ellipses
BFE
n
comparable and to transform the parametrized ellipses model to a common position, scale and orientation by a transformation matrix
Λ dCPn. The transformation matrix
Λ dCPn maps the de-rotated prior data {
dBFE
n
,
dCP
n
} to
in the sample space, as depicted in Figure
2. In this article, we assume 6 control points in the first, center and last slice at the boundary of the prostate, i.e.,
as visualized in Figure
3. In addition, we have tested alternative control point configurations. They are described together with the construction of
Λ dCPn in Additional file
1.
After transformation we have obtained a reordered and comparable set of best fitting ellipses
with , n = 1,…,N, l = 1,…,L
n
. The statistical analysis of the training data requires an equal number L
1 = … = L
N
to establish correspondence between the parameters of the best fitting ellipses. Therefore, we interpolate the set to a common number L.
When
L is chosen, interpolation is done by independent cubic interpolation in each dimension, i.e., we find points of a one-dimensional function that underlies the data
and
. The final interpolated best fitting ellipses are denoted by
(3)
These ellipses are used for the statistical analysis and computation of a mean shape model. To keep things simple, we denote such a reordered, transformed and interpolated set of best-fitting ellipses by BFE
nl
= (θ
nl
,α
nl
,ϕ
nl
)
T
for the number L of contour slices with l = 1,…,L and n = 1,…,N. The comparable set of best fitting ellipses BFE
n
is an element of the shape space .