This disclosure is directed to computing an interpolating envelope of an ordered set of 2D balls.
The geometric question of ball skinning is the computation of an interpolating envelope of a set of balls. An example ball skinning is shown in
Ball skinning arises in numerous applications, including character skinning, molecular surface model generation, and modeling of tubular structures. The balls can have different radii, be configured in different positions, and may or may not overlap. In one formulation of the problem, the envelopes are required to touch each ball at a point of contact, and be tangent to the ball at the point of contact, as illustrated in
The question of skinning appears in various contexts. In computer graphics and animation, often an articulated object or character is constructed by forming a layered representation consisting of a skeletal structure and a corresponding geometric skin. The skeleton has fewer degrees of freedom and is simpler to adjust by an animator. Given a new skeletal pose, the skinning algorithm is responsible for deforming the geometric skin to respond to the motion of the underlying skeleton.
The question of ball skinning appears frequently in the context of chemistry and molecular biology, when generating surface meshes for molecular models. Several algorithms exist to skin a molecular model to produce a C1 continuous surface that is tangent smooth and has high mesh quality. These methods are typically either based on Delaunay triangulation or by finding the isosurface of an implicit function. While the surfaces generated by these methods are tangent to the balls and have smoothness at the point of tangency, these methods do not provide an optimally smooth envelope.
One application concerns modeling the geometry of a blood vessel that has been identified using a 2D variant of a ball packing algorithm, which places numerous balls of different radii so that they fit snugly inside an imaged blood vessel. Given these balls, one would like to find an smooth, C1 envelope that smoothly interpolates the balls. This surface can then be used for visualization of the blood vessel as well as measurements such as volume or surface area. For a given configuration of balls, there are an infinite number of possible solutions to this question.
Exemplary embodiments of the invention as described herein generally include methods and systems for modeling the envelope as using a angle for each ball. An exemplary envelope is a C1 spline, which, by construction, touches each ball at a point of contact and be tangent to ball at the point of contact. To formulate the question so that it is well-posed, one seeks the envelope that has minimal arc length and/or curvature. This can be achieved by deriving two differential equations that minimize an energy based on this constrained variational problem, one for deforming this constrained spline to minimize its arc length, and a second for minimizing its curvature. These differential equations can then be solved to update a given spline to its optimal position. Given an initial envelope, the envelope's parameters are evolved using the differential equations until convergence occurs. This produces the envelope that has minimal length and/or curvature, touches each hall at a point of contact, and is tangent to the ball at the point of contact. In this sense, the method provides an optimal constrained interpolation of the balls. Experimental examples are presented of how these differential equations are used perform optimally generating interpolating envelopes of balls of different sizes and in various configurations.
According to an aspect of the invention, there is provided a method for modeling a 2-dimensional tubular structure in a digitized image, the method including providing a digitized image of a tubular structure, the image comprising a plurality of intensities associated with a 2 dimensional (2D) grid of voxels, the tubular structure containing a plurality of 2D balls of differing radii, initializing a plurality of connected spline segments Si that form an envelope surrounding the plurality of 2D balls, each the spline segment Si being parameterized by positions of the ith and i+1th balls and contact angles αi, αi+1 from the center of each respective ball to a point on the perimeter of each the ball contacting the spline segment Si, each the αi affecting spline segment Si and Si+1, and updating the angles by minimizing an energy E, where E is an energy that is a functional of the angles equal to E=(1−k)Eα+kEc, where k is a constant, Eα is an arc-length term and Ec is a curvature term, where the updating is repeated until the energy E is minimized subject to a constraint that the envelope is tangent to each ball at each point of contact, where the envelope is represented by the contact angles.
According to a further aspect of the invention, the angles are updated according to αn+1=αn−Δt∇Eα
According to a further aspect of the invention, each spline segment is a C1 cubic spline segment modeled as Si=Ait3+Bit2+Cit+Di, where tε[0,1] and where each the curve satisfies the constraints
where pi is the contact point on the ith ball
where ci is the center of the ball and ri is the radius, and
is the starting direction of the curve, where αi is a stiffness factor.
According to a further aspect of the invention, each αi is fixed to be half the distance between the next and previous ball centers, and where for the first and last balls, the αi is fixed to the distance between the ball center and its neighbor ball center.
According to a further aspect of the invention, minimizing the arc-length comprises minimizing
using derivatives with respect to the angles αi, where the prime indicates a derivative with respect to t and the sum is over all the curves, and where
According to a further aspect of the invention, minimizing the curvature comprises minimizing
using derivatives with respect to the angles αi, where the primes indicate derivatives with respect to t and the sum is over all the curves, and where
According to a further aspect of the invention, coefficients Ai, Bi, Ci, Di are defined as
Ai=−2pi+1+2pi+ti+ti+1
Bi=3pi+1−3pi−2ti−ti+1,
Ci=ti
Di=pi
and where
According to a further aspect of the invention, the energy E is minimized subject to a further constraint of one of that the envelope has a minimal arc-length, the envelope has a minimal curvature, or the envelope has a minimal arc-length and curvature.
According to a further aspect of the invention, the spline segments are initialized by choosing an angle αi for each ball i that matches a ray orthogonal to a centerline connecting adjacent ball center points.
According to a further aspect of the invention, the method includes initializing a plurality of connected spline segments Si that interpolate an inner boundary of the plurality of 2D balls, each the spline segment Si being parameterized by positions of the ith and i+1th balls and contact angles αi, αi+1 from the center of each respective ball to a point on the perimeter of each the ball contacting the spline segment Si, each the αi affecting spline segment Si and Si−1, and updating the angles by minimizing an energy E, where E is an energy that is a functional of the angles equal to E=(1−k)Eα+kEc, where k is a constant, Eα is an arc-length term and Ec is a curvature term, where the updating is repeated until the energy E is minimized subject to a constraint that the inner boundary is tangent to each ball at each point of contact, where the inner boundary is represented by the contact angles.
According to a further aspect of the invention, the tubular structure represents a blood vessel.
According to another aspect of the invention, there is provided a program storage device readable by a computer, tangibly embodying a program of instructions executable by the computer to perform the method steps for modeling a 2-dimensional tubular structure in a digitized image.
a)-(b) illustrate an example of a two sided ball skinning, according to an embodiment of the invention.
a)-(c) depict a simple example of ball skinning, according to an embodiment of the invention.
a)-(c) depict the skinning of another set of balls, according to an embodiment of the invention.
a)-(c) show an example of generating an interpolating region for a collection of balls, according to an embodiment of the invention.
a)-(c) illustrate ball skinning for balls arranged on a sine wave and having a variable radius, according to an embodiment of the invention.
Exemplary embodiments of the invention as described herein generally include systems and methods for computing an interpolating envelope of an ordered set of 2D halls. Accordingly, while the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that there is no intent to limit the invention to the particular forms disclosed, but on the contrary, the invention is to cover all modifications, equivalents, and alternatives falling, within the spirit and scope of the invention.
As used herein, the term “image” refers to multi-dimensional data composed of discrete image elements (e.g., pixels for 2-D images). The image may be, for example, a medical image of a subject collected by computer tomography, magnetic resonance imaging, ultrasound, or any other medical imaging system known to one of skill in the art. The image may also be provided from non-medical contexts, such as, for example, remote sensing systems, electron microscopy, etc. Although an image can be thought of as a function from R2 to R, the methods of the inventions are not limited to such images. For a 2-dimensional image, the domain of the image is typically a 2-dimensional rectangular array, wherein each pixel or voxel can be addressed with reference to a set of 2 mutually orthogonal axes. The terms “digital” and “digitized” as used herein will refer to images or volumes, as appropriate, in a digital or digitized format acquired via a digital acquisition system or via conversion from an analog image.
1. The envelope should be modeled by a point of contact with a ball.
2. The envelope should be tangent to a ball at the point of contact.
3. The envelope should minimize a functional composed of terms based on arc length and curvature.
An envelope according to an embodiment of the invention can be represented using the contact angle of each ball within the envelope.
Segments
Si=Ait3+Bit2+Cit+Di, (1)
since the four constraints require four degrees of freedom. For the ith segment, Ai, Bi, Ci, and Di are coefficients, and tε[0,1] is a time variable that parameterizes the curve.
To determine the coefficients for a segment, the following constraints should be satisfied:
With these constraints, and the derivative of the segment,
one can obtain a system of four equations for the four coefficients:
Di=pi,
Ci=ti,
Ai+Bi+Ci+Di=pi+1,
3Ai+2Bi+Ci=ti+1,
which can be solved, yielding:
Ai=−2pi+1+2pi+ti+ti+1
Bi=3pi+1−3pi−2ti−ti+1
Ci=ti
Di=pi
Endpoints
Now that there is a way to model each segment of the envelope, one can determine the endpoints pi, pi+1 and their respective tangents, ti, ti+1 of each segment. As shown in
where ri is the radius of a ball, ci is its center, and αi is an angle. In addition, the tangent can be represented as
where αi is a stiffness term that controls the influence of the tangential constraint. Each αi can be fixed to be half the distance between the next and previous ball centers (for the first and last halls, it is the distance between the hall center and its neighbor ball center). Note that both the point pi and the tangent ti are only a function of the angle αi, since the radius of the ball is fixed.
There is now a way to represent the envelope S as a set of segments Si, where each segment Si interpolates between the points of contact pi, pi+1 with balls Bi, Bi+1, subject to tangent conditions ti, ti+1 respectively.
By construction of the problem, the angle αi affects only the segment Si as well as the segment Si−1, as can be easily seen in
Energy Minimization
There are an infinite number of envelopes that are modeled by a contact point on each ball and have a direction tangent to the bail at the point of contact. To further constrain the problem, the envelope can be required to have minimal arc length and/or be smooth. This can be achieved by finding the angles αi that optimize an energy functional. First, equations are derived to compute the envelope with minimal arc length, then curvature is considered.
Arc Length Minimization
Minimization of the arc length results in the shortest envelope that satisfies the geometric constraints imposed by the ball representation. That is, it is desired to find angles αi that minimize
Eα=∫|S′|dt,
where S′ is the derivative of S with respect to t. Since the envelope is represented as a set of segments, this is equivalent to
Next, the derivative of the energy is taken with respect to the angle αi. As stated above, the ith angle only affects the segments Si−1 and Si. Therefore,
Second Term
Considering the second term of EQ. (6) first, propagating the derivative with respect to αi through the integral, it is easy to show that
where < > denotes an inner product. Next, an expression for the
terms can be derived using EQ. 2, yielding
The derivatives
can be derived using EQ. 3, as
Finally, the derivatives
can be derived from EQS. 4 and 5 as
All the derivatives needed to compute the second term in EQ. 6 have now been derived.
First Term
Now consider the first term of EQ. 6, which has a very similar derivation. Propagating the derivative with respect to αi through the integral yields
As before, an expression can be derived for the
terms using EQ. 2, yielding
Next, the derivatives
can be derived using EQ. 3, as
All the derivatives needed to compute the first term of EQ. 6 have been derived.
Curvature Minimization
In order to minimize the curvature, note that curvature can be positive or negative. Thus, the squared curvature is minimized by finding the angles αi that minimize
Ec=∫κ2(t)dt,
where κ(t) is the curvature of S at point t. Since the envelope is represented as a set of segments, this is equivalent to
where κ(t) is the curvature at point t along segment Si. Next, the derivative of the energy is taken with respect to the angle αi. As stated above, the ith angle only affects the segments Si−1 and Si. Therefore,
Recall that the curvature is given by
which can be re-expressed as
is a 90 degree rotation matrix and < > denotes an inner product. Using these equations, EQ. 9 becomes
Second Term
To derive the second term of EQ. 10, the derivative with respect to αi is propagated through the integral to obtain
For this, one needs the derivatives
These derivatives can be shown to be
Next, derive an expression for the
terms using EQ. 2, yielding
The derivatives
are given in EQ. 7. All the derivatives needed to compute the second term in EQ. 10 are now present.
First Term
The first term of EQ. 10 is very similar the second term derived above. Propagating the derivative with respect to αi through the integral, one obtains
For this, the derivatives
are needed. It can be shown that these derivatives are
The expressions for
are
The derivatives
are given in EQ. 8.
Thus, all the derivatives needed to compute the first term of EQ. 10 have been
Boundary Conditions
The integrals in EQ. 10 are evaluated for each angle αi. However, for the first ball, i=1, there is no segment Si−1, so the first integral is skipped in EQ. 10. Likewise, for the last ball, i=N, there is no segment Si, so the second integral in the equation is skipped.
Thus, the gradient of energy functionals Eα and Ec has been derived with respect to angles, αi. The derivation consisted implicitly of several steps via the chain rule, as the energy is the squared curvature, which in turn is a function of the envelope, which in turn is a function of the segment constants Ai, Bi, Ci, Di and Ai−1, Bi−1, Ci−1, Di−1, which in turn are functions of the angles αi.
Energy Minimization
The energies Eα and Ec can be combined together, as
E=(1−k)Eα+kEc,
where k is a constant used to weight the arc length minimization relative to the curvature minimization. Setting k=0 results in the arc length minimization, while setting k−1 gives the curvature minimization. Convex combinations of the two can be selected using kε[0,1]. Therefore, the combined energy minimization is given by
where
is given in EQ. 6 and
is provided in EQ. 9. In all of the experiments herein disclosed, k=0.9, to encourage smoother solutions. This value of k is exemplary and non-limiting, and can take on other values in other embodiments of the invention.
These equations are a set of differential equations that can be used to optimize the envelope by manipulating the angles α=[α1, . . . , αN]T. One exemplary, non-limiting method of optimizing the envelope is through a gradient descent procedure. A flowchart of such a method for computing an interpolating envelope of an ordered set of 2D balls is depicted in
αn+1=αn−Δt∇Eα
where Δt is a time step and
The updating of step 93 is repeated until the energy reaches a suitable minimum, at step 94. It is to be understood, however, that the disclosure of a gradient descent procedure is for expository purposes only, and is a special case of the more general formulation
αn+1=αn+Δt·ƒ(E|αn|).
Other techniques can be used to minimize the energy functional in other embodiments of the invention.
The computational complexity of an algorithm according to an embodiment of the invention depends on the number of balls N+1 and the number of points L on a segment where the points and derivatives are evaluated. For each iteration of the gradient descent procedure, the computational complexity is O(NL). The number of iterations required depends on the time step Δt as well as how close the initial envelope is to the final solution. Note that the gradient descent approach only guarantees a locally optimal solution; however, given the constraints of the problem formulation, the energy functional is rather convex.
Results
a)-(c) show a simple example ball skinning. The initial spline 41 is shown in
a)-(c) shows a slightly more complicated example for which some balls overlap and others do not. The initial envelope 51 is shown in
a)-(c) show an example of generating an interpolating region for a collection of balls. In this case, there are two envelopes, one defining the interior boundary of the region, and another defining the exterior boundary. For each ball, there are two points of contact: one from the interior envelope and one for the exterior envelope; however, these points of contact are constrained to be separated by 180 degrees. Therefore, for each ball there is only one angle αi to be determined as in the examples above. The angle is solved for all the balls, with each envelope contributing a term in EQ. 11.
More examples are provided in
System Implementation
It is to be understood that embodiments of the present invention can be implemented in various forms of hardware, software, firmware, special purpose processes, or a combination thereof. In one embodiment, the present invention can be implemented in software as an application program tangible embodied on a computer readable program storage device. The application program can be uploaded to, and executed by, a machine comprising any suitable architecture.
The computer system 101 also includes an operating system and micro instruction code. The various processes and functions described herein can either be part of the micro instruction code or part of the application program (or combination thereof) which is executed via the operating system. In addition, various other peripheral devices can be connected to the computer platform such as an additional data storage device and a printing device.
It is to be further understood that, because some of the constituent system components and method steps depicted in the accompanying figures can be implemented in software, the actual connections between the systems components (or the process steps) may differ depending upon the manner in which the present invention is programmed. Given the teachings of the present invention provided herein, one of ordinary skill in the related art will be able to contemplate these and similar implementations or configurations of the present invention.
While the present invention has been described in detail with reference to a preferred embodiment, those skilled in the art will appreciate that various modifications and substitutions can be made thereto without departing from the spirit and scope of the invention as set forth in the appended claims.
This application claims priority from “Variational Ball Skinning for Geometric Modeling of Tubular Structures”, U.S. Provisional Application No. 60/864,853 of Slabaugh, et al., filed Nov. 8, 2006, the contents of which are herein incorporated by reference.
Number | Name | Date | Kind |
---|---|---|---|
7042714 | Hillman et al. | May 2006 | B2 |
7346203 | Turek et al. | Mar 2008 | B2 |
Number | Date | Country | |
---|---|---|---|
20080109192 A1 | May 2008 | US |
Number | Date | Country | |
---|---|---|---|
60864853 | Nov 2006 | US |