Voxels to Line

I have a set of voxels that I have identified as an edge and I can convert it into a line, but when the edge is a couple voxels thick my algorithm produces junk.
Here’s a 2D example:
(this I have no problem)
___X
__X
_X
X
(this I have a problem)
______XX
_____XX
__XXX
_XX
XX

I need to strip away the voxels and make it one voxel thick. How can I do this?

Hi

This sounds like a typical line fitting problem. Try a search on line fitting to see how this is done. This problem is quite common in fitting lines (or other curves in its generla case) over scientific data. It should apply to what you’re doing, unless you’ve got some sort of special situation there.

madmortigan