DBS electrode reconstruction

Hi,

I’m interested in DBS electrode reconstruction and was wondering if there was a way to do this in 3D Slicer. I’ve used the Editor and Model Maker modules to segment out the DBS leads. I am now trying to figure out the contact positions for each lead. I understand that the PaCER method in Matlab is able to model the center-line for each lead and subsequently obtain a lead skeleton and derive the contact coordinates. After seeing this discussion, I ran the ‘Extract Skeleton’ module on one of the segmented leads using 1000 points and a 2D skeleton type; the points can be clearly seen within the leads. I installed the SlicerVMTK module to compute the center-line but having trouble using the Input function, i.e., I cannot load anything. A,so, if there is an easier way to do DBS electrode reconstruction in 3D Slicer, that would be great to know. Thanks for your help.

Vinny

Pierre Jannin’s group in Rennes developed a nice system for DBS planning and guidance based on Slicer and PyDBS. You can download an overview paper from here. Maybe @mholden8 can give you more details or can help you get in contact with them.

If you only need DBS lead segmentation, then I think Segment Editor’s Grow from seeds effect could work very well. You may need to crop and resample the volume using Crop volume module (to have high, anisotropic resolution so that region growing can follow the leads more robustly). You should be able to segment multiple leads at once, specifying one small seed segment for each, and a larger seed for “other”.

I would be happy to help with this, too, but of course I need much more accurate description of what you did, what you expected to happen, and what happened instead.

1 Like

Hi Andras,

Thank you very much for your reply. I’ll go through the PyDBS paper and
will contact @mholden8 for further details on PyDBS. I
have been manually segmenting the electrodes using the Threshold Effect in
the Editor Module and removing any artifact (surgical staples, etc…)
prior to using the Model Maker module and saving the output in both NIFTI
and VTK formats. I’m establishing a tractography workflow and imported the
white matter tracts into 3d Slicer and converted to VTK. I’d like to be
able to quantify distances between white matter tracts of interest and the
electrode contacts in 3d Slicer. So, my goal is to determine the contact
coordinates on the segmented lead.

I was thinking that computing a center-line through the segmented lead and
deriving a polynomial expression may help with determining the coordinates
of the four contacts. Alternatively, I’ve used PaCER to derive the lead
skeleton and the xyz contact coordinates and saved them as an excel file.
I’m certain that Slicer has a method of plotting these contact coordinates
onto the segmented lead. Maybe I can start with this and see what I get.
Will the Python Interactor help with this or is there an established module
that I could use for plotting these coordinates onto the image?

Regards,

Vinny

I’ve updated ‘Extract Skeleton module to be able to export centerline points to markups fiducial list node (and improved point computation accuracy). It will be available in tomorrow’s nightly build.

Once you have your centerline points in markups node, then you can use Markups To Model module (available in MarkupsToModel extension) to create a trajectory model using spline or polygonal line fitting.

Hi Andras,

Thank you very much for the update! I look forward to testing this out
soon.

Regards,

Vinny

Hi Andras,

Thanks, the trajectory model works great. Is there a way of getting the equation of the calculated trajectory model?

You cannot get the trajectory model, but you can get the curve point at any resolution (by setting high value for “segments per point”). I’ve also updated the module so that when you specify 0 for radius then instead of a tube model, a simple polyline model is generated.

You can get points of the line in the output model as a numpy array like this:

curveModelNode = slicer.util.getNode('MarkupsToModelModel')
points = slicer.util.arrayFromModelPoints(curveModelNode)
1 Like

@Vinny, I just spoke directly to Dr. Pierre Jannin about this. He says he would be happy to chat with you about using PyDBS for DBS electrode reconstruction. He asks you to contact him directly. Please find his contact info here: https://medicis.univ-rennes1.fr/members/pierre.jannin/index.

@mholden8, thank you very much for speaking to Dr. Jannin about this and providing me his contact information. @lassoan: thanks for all your help so far.