Create cylinder from central coordinates

Hi,

I was wondering if it was possible to (programatically) create a curved cylinder segment from a list of coordinates which run along its centre?
This generated segement/mesh would then be subtracted from another to create a new one with these cylindrical tracks removed (with the ultimate aim of converting this back to a DICOM Structure file as well as for 3D printing).

Thanks,

This is implemented in “Draw Tube” effect in Segment Editor (provided by SegmentEditorExtraEffects extension.

If you want to use this for HDR brachytherapy catheter segmentation there are a couple of extensions you might find relevant: PathReconstruction extension can create catheter paths from electromagnetically tracked position sensor; SlicerIGT extension can reconstruct volumes from tracked ultrasound (so that you can draw catheters in ultrasound).

You can find examples of how to use Segment Editor using Python scripting instead of GUI in the script repository, which may be useful if you want to import curve point positions from an external source.