SCI Seg3D Mailing List

[Seg3D] Re: Re: New Spline Tool (was Re: what's Painter::set_status for?)

• From: Ramón Casero Cañas <ramon.casero@comlab.ox.ac.uk>
• To: seg3d@sci.utah.edu
• Subject: [Seg3D] Re: Re: New Spline Tool (was Re: what's Painter::set_status for?)
• Date: Wed, 14 Oct 2009 12:34:16 +0100

Michael Callahan wrote:
This Spline Too description is too light and I cannot tell what you are
wanting here.

The existing Polyline tool is not 3D.  It rasterizes onto the current
layer only.  Making a 3D version would be an interesting research
project in terms of how to make a reasonable GUI out of manipulating
control points.

Hi Mike,

Sorry for the poor description. Let me try to explain what I need to do a bit better. :-/

We want to segment valve annula in the heart.

Valve annula look like a loop that is bent and stretched here and there (like a buckled bike wheel), so they span several slices in a 3D image.

I.e. the annulus is not contained within one slice.

1) Sorting seed points
======================

In theory, one can use the Polyline Tool to create a loop in 3D: You move your 3 planes (axial, coronal, saggital) so that you see a bit of the annulus and click the first seed point. Then move the 3 planes around until you find the next point, click a new seed point, etc.

But in practice, it's very hard for a human to find the annulus' seeds _in order_.

So what we need is a tool that allows us to add new _unsorted_ seeds on the 3D annulus. Every time you add a new seed, the application sorts them for you to create the 3D loop.

2) Spline curve instead of lines
================================

Straight lines are not so good to represent a curved annulus, especially if we want to use a sparse set of seed points.

So we need a spline curve in 3D to extrapolate the annulus from the seeds.

3) Visual feedback
==================

The human is clicking new seed points, and needs to see the spline it has created so far.

The current 2D rasterisation of the 3D polygon lines is confusing for the human. (I need to remove it)

What we need to see is the intersection of the current 3D spline with each of the planes (axial, saggital and coronal).

This way, if the spline is not quite on the annulus, the human can just click a new seed point and the spline will be refined.

I believe this can be done with a label mask:

ii) reorder seed points
iii) recompute spline
v) set to 1 voxels in the label mask "touched" by the spline

4) Segmentation of the loop
===========================

We are not interested in the plane contained by the loop ("Fill" button in the Polyline Tool).

We need the loop itself.

If the visual feedback in 3) is implemented as a segmentation label, then at the same time we are getting the "segmentation of the loop" we need too.

Of course it's great if we can also get the coordinates of the seeds in a data file.

*  The 3D polygon is replaced by a 3D spline curve

The existing Polyline tool is not 3D.  It rasterizes onto the current
layer only.  Making a 3D version would be an interesting research
project in terms of how to make a reasonable GUI out of manipulating
control points.

As mentioned above, the current polyline tool seems to be storing the 3D-coordinates of the seed points, so it's good. Am I wrong?

Removing the rasterisation should be easy (hopefully) :)

The Speedlines tools are probably what you are wanting to look at here.
The speedlines tools are similar to the Polyline tool (and inherit from
it like you do).  Except that as a first step they create a speed
function which is basically an isocontouring of the original volume.
Then when you place or move the control points the minimum energy path
is computed between them such that the lines follow the data contours.

I think that the speed function would be misleading, because the structure we are looking for is not necessarily an edge on the image.

Just the spline interpolation of the seed points would be perfectly fine.

I am assuming that you want to compute the 'ring' of voxels for
interactive purposes rather than wanting to set that as your final
selection?

As mentioned above, we need the 'ring' both for visual feedback and as a final selection.

* Control points can be clicked in any order, and the program sorts them so that we get a closed loop

(I have already coded a prototype in Matlab for the last point, so I know how to do it).

The Polyline tool already does this as it is used for making and editing
closed loops.  I'm not sure what the Matlab code would be for?

This is superb, because it will allow us to move and adjust seed points.

However, we also need to be able to click the seed points in any order, and still get the same loop. This is what I was referring to with the Matlab prototype. It's done and it works, so I have to write the same functionality in C++ in the new Spline Tool ;)

Best regards,

Ramon.

--
Ramón Casero Cañas, DPhil

Computational Biology, Computing Laboratory
University of Oxford
Wolfson Building, Parks Rd
Oxford OX1 3QD

tlf     +44 (0) 1865 610807
web     http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas
photos  http://www.flickr.com/photos/rcasero/