The invention is concerned with the processing of digital images and, in particular, with the deformation of regions of segmented regions of the image, to facilitate further analysis/processing.
Users of image processing software such as medical practitioners often wish to create regions of interest (ROIs) corresponding to some region of the underlying image (for example for segmentation, which separates the image into regions). The types of tools that are appropriate for the creation of such regions depend on the underlying representation of the ROI in the source image. For example, if the ROI is represented and wholly defined as a contour, 2D control point manipulations may be appropriate, or if the ROI is a mesh, 3D manipulation of nodes may be useful
However, contours and meshes do not provide a flexible enough representation for regions of interests with more complex shapes or complex topology. Contours require a modeling of the region to be segmented, which is not always possible. To enable a more generic representation of the contours, binary masks can be used, in which each voxel in the ROI has a one to one correspondence with a voxel in the underlying image. Such masks do not have a parametric representation that permits easy manipulation from a corner or control point as contours and meshes do.
The present invention is concerned with the case when ROIs are represented by binary masks by allowing deformation of the ROI shape without the need of a parametric representation.
Among the tools that have been used for mask-based ROI manipulation with some success are 3D paintbrushes. However, these are associated with one significant disadvantage: because the brush is finite (has no roll-off), non-smooth edge-effects that are difficult to remove later are created.
Approaches have also been developed for contour- and mesh-based ROI representations (see, e.g., Shechter, J. M. Declerck, C. Ozturk, and E. R. McVeigh. “Fast Template Based Segmentation of Cine Cardiac MR”, Proceedings of the 7th Scientific Meeting of the International Society for Magnetic Resonance in Medicine, Philadelphia, Pa., May 1999). In particular, the manipulation of ROIs represented by contours (in 2D) or meshes (in 3D) by dragging control points is one of the most common methods of changing the shape. The method works well, but creating the mesh structure in the first place is usually a costly step (particularly when using a mask-based representation of the ROI). Avoidance of this step is desirable when the structures to be segmented are complex.
The present invention addresses a requirement for a tool that allows a user to select a mask-based ROI in a source image and manipulate said ROI by simple interactive operations such as ‘clicking and dragging’ of a computer mouse, as one would do to manipulate control points if there were any.
According to the invention, a method of deforming a mask-based image comprises the steps set out in claim 1 attached hereto.
The invention will now be described by non-limiting example, with reference to the following figures in which:
a and 1b illustrate the deformation of regions of interest represented by contours by dragging control points;
a and 2b illustrate the use of a paintbrush tool to deform a mask-based region of interest in an image;
a and 3b illustrate the application of the current invention to a masked based region of interest;
a and 4b show two example sets of vectors used to identify which pixels or voxels in an image, deformed according to the invention, correspond to pixels or voxels in the image prior to deformation;
Throughout this description, the invention is exemplified by reference to both two-dimensional (2-D) cases and three-dimensional cases. Neither of these should be seen as limiting as the invention is equally applicable to both.
Referring to
Referring to
Referring to
For clarity,
The “roll-off” function ensures that changes made to the ROI are smooth. The dashed circle (sphere in 3D) defines the region for which the roll-off function is non-zero. Pixels (voxels in 3D) that are outside this region are not affected by the stretching operation.
The following properties define the term “roll-off function” as used in describing the current invention:
These properties are mathematical translations of a definition of a function which has a large value in its centre and decreases continuously with from the centre. The function could be ‘strictly decreasing’ i.e. the value is always reduced as the distance from the centre is increased, or it could be ‘non-strictly’ decreasing, for example having a constant value along a certain distance.
Variations are acceptable, depending on the desired final result. For instance, in addition to the above, the following properties, whilst not strictly required, lead to a visually more pleasing result:
One such function that satisfies these properties is a truncated 3D Gaussian, but other functions such as B-splines could also be used.
Other constraints to ensure that the topology of the ROI is preserved could be applied, but this is not always desirable when performing segmentation.
During execution of the current invention, a user defines the centre of the deformation (stretch) e.g., by a mouse click on a point in the initial ROI. The vector defining the stretch is defined (e.g., by dragging the mouse pointer from the centre to a new point) and the updated ROI is created as follows.
A set of pixels (voxels in the 3-D case) is selected in the initial ROI and for each of these, a corresponding pixel that will be in the updated ROI is identified. The corresponding pixels in the updated ROI are separated from those in the initial ROI in a direction parallel with the initial stretch vector and by a distance that varies (according to the roll-off function) with the distance between the pixel in the initial ROI and the origin of the stretch vector. The value of each of the corresponding pixels in the updated ROI is set according to the value of the pixel in the initial ROI.
To begin, many vectors originating from within the region affected (indicated by the circle in
Each of the vectors is interpreted as follows: if the pixel at the origin of the vector is on, the pixel at the head of the vector is set to on; if the pixel at the base of the vector is off, the pixel at the head of the vector is left alone.
In summary, at a high level, the algorithm for one embodiment of the invention is as follows:
This summary raises three further questions that must be answered before the algorithm can be implemented:
The answers to these questions are given in the following sections.
1. Determination of the Region of the Output ROI that can be Affected.
Suppose that the user drags the mouse as indicated by vector d in
2. Definition of the Vectors
There are at least two approaches that can be taken in defining the vectors: either the holes created between the heads of neighbouring vectors must be filled using a separate approach, or enough vectors must be defined to ensure that every output voxel is hit at least once, ensuring that no holes are generated in the first place.
a. Filling Holes
Using this approach in its simplest form, one vector is assigned to each of the eight corners of every original ROI voxel within the source sphere that is ‘on’. If all voxels within the bounding cuboid of the source sphere are considered, there are a maximum of (m+1)(n+1)(p+1) vectors (for an m by n by p bounding box), since many vectors will be shared by eight neighbouring voxels. The eight vectors from each voxel are then be transformed using the roll-off function, and any voxels in the output ROI that fall inside the warped cuboid defined by these vectors set to on. If this is repeated for every voxel that is ‘on’, it is not possible for the result to contain holes that were not present in the original ROI.
One method of computing the image of the warped voxel is to break the original voxel up into five tetrahedra as shown in
b. Ensuring that No Holes are Generated
The goal in defining the vectors with this approach is to ensure that each voxel within the region of the output ROI that is affected by the transformation is touched by the tip of at least one vector. For simplicity (and computational efficiency), the ‘start’ of the vectors is defined using an irregular, axis-aligned grid (i.e., a grid that is defined by (possibly) irregular spacing in each of the three dimensions); the vector starting at each grid-point is then uniquely determined by the roll-off function and the stretch vector (i.e., the vector d in
This is a worst case situation, in which the four neighbouring vectors just fail to touch a particular pixel.
Working (without loss of generality) with pixel dimensions of 1 by 1, if it can be ensured that the heads of any two neighbouring vectors are within
of each other (
Now that it is established how close the heads of neighbouring vectors should be, it is still necessary to work out the grid-spacing to use for the starting points of the vectors. The mathematics given in the appendix shows that any two neighbouring vectors starting at points si and si+1 must satisfy
(where d is the user-defined stretch vector and gx
3. Preservation of ROI Topology
The topology of the ROI will be preserved if the displacement field that is applied does not wrap around itself. Without loss of generality, it can be supposed that the displacement is made in the x direction only. The generalisation can be made easily by rotation of the axes.
In
where r is the distance to the origin of the stretch vector. The transformed coordinate is then expressed as:
The condition for the topology of the ROI to be preserved is that t is an invertible function of r. This is ensured if the derivative of t is always strictly positive.
The derivative of t is then:
In order to ensure that the derivative is always positive, the constraint that ties d, R and g is:
Given a particular displacement imposed by the user, this topology preservation constraint can be enforced by either:
Both examples will ensure preservation of the topology of the ROI, but the user feedback will be different. Both may be desirable depending on the particular application.
A typical application of the invention would be for the segmentation of structures using the following steps:
This appendix describes how the vectors can be placed so that no holes result in the creation of the warped ROI.
Given a user-defined stretch vector d, and any two neighbouring vectors ai and ai+1 originating from source points si and si+1, which have their tips at vi and vi+1, the tips should lie within
of each other:
In other words,
and in order to obtain this, the step size, ∥si+1−si∥ can be controlled. Now, we know that vi=si+gx
Considering the special situation in which the grid is computed one dimension at a time (i.e., firstly in x, then y, then z), and considering without loss of generality only the x-grid, for any particular row of the grid, the equalities gy
Since the aim is to have a grid that has the same column-spacing for all rows on all slices (this is the definition of an irregular grid), the values of gy
Rewriting (1) with this in mind, the inequality becomes
Now, the norm on the left hand side of this equation can be bounded:
since the roll-off values are scaled to ensure that the maximum value is 1 (i.e., the maximum displacement is attained at the point the user dragged the ROI to). This leads us to the following inequality that must be satisfied to guarantee that all voxels are hit:
The problem is now that both gx
which is only valid when all components of the stretch vector are 0. It is also clear that taking a step size of 0 will always satisfy the inequality, and that the value of the norm of the vector in (2) is monotonic in the size of the step (for each half of the roll-off function, independently). Thus, starting with a step size of
if we continually reduce it, eventually we will have a step size that satisfies (2).
The only unknown now is how much to reduce the step at each iteration. At odds here are the desire to have the step size as large as possible (to define as few vectors as possible, and hence make the computation faster), and to minimise the number of iterations required (to avoid spending time on this part of the computation). Two possible strategies are to reduce the distance by a fixed amount, say 0.05 voxels, at each iteration (although this would cause problems if the inequality were still not satisfied when the points were only 0.05 apart), or simply to halve the distance at each iteration (although this will mean that the maximum step size used will always be
since the inequality will never be satisfied on the first iteration, and this could result in additional, unnecessary vectors being defined).
A strategy of subtracting 0.05 until the distance is less than 0.1, then halving the distance at each iteration combines the benefits of both of these approaches into a robust algorithm.
Number | Date | Country | Kind |
---|---|---|---|
0610757.7 | Jun 2006 | GB | national |
Number | Name | Date | Kind |
---|---|---|---|
6121979 | Carver | Sep 2000 | A |
20020141640 | Kraft | Oct 2002 | A1 |
20040156556 | Lopez | Aug 2004 | A1 |
20040249270 | Kondo et al. | Dec 2004 | A1 |
Number | Date | Country |
---|---|---|
2 312 123 | Oct 1997 | GB |
Number | Date | Country | |
---|---|---|---|
20070297674 A1 | Dec 2007 | US |