mnarizzano / SEEGA

SEEG Assistant
GNU General Public License v3.0
26 stars 17 forks source link

Issue with SEEGA Install #31

Closed parkerjo08 closed 2 years ago

parkerjo08 commented 4 years ago

Dear Team:

I am currently running: Slicer Version 4.10.2 Mac OSX 10.15.4

I downloaded and unzipped the package today (4/6/20) and re-set the paths as directed in the installation instructions.

I am attempting to localize and detect electrodes from a pig brain CT scan using Adtech electrodes.

When I load the CT scan in slicer and click on the Contact Position Estimator Module, no electrodes show up under the segmentation tab.

I'm not sure if I have installed correctly, or I am not properly triggering the CPE tool within SLICER.

Thank you very much, Jonathon

Jonathon Parker MD PhD Resident in Neurosurgery Stanford University

parkerjo08 commented 4 years ago

I also tried installing the scripts on my Windows 10 computer running slicer 4.10.2 with the same result. I also tried going back to 4.8 Slicer with no change.

Any advice would be much appreciated.

gabri470 commented 4 years ago

Dear @parkerjo08 ,

thanks for the interest in our tool and sorry for the late reply. Can you possibly share here a screenshot of the axial slice of the post-implant CT scan where electrode contacts are visible? That would help us in understanding where the problem might resides.

About triggering CPE, you can look whether there are error messages in the Slicer Python Interpreter window (small Python symbol located in the right corner of the tool bar).

best regards,

parkerjo08 commented 4 years ago

See below the screenshot requested. Is there something I need to click to trigger CPE? I have selected it from the module window. However, it does not display any of the contact information like you have displayed in some of screenshots online.

image

For your reference, the config file was customized to the electrode that I am attempting to segment (see exact config file below):

{"AD_SD08R": [8, 1.32, 1.1, 0.88, 0.88, 0.88, 0.88, 0.88, 0.88, 0.88, 16.72]}

Thank you again for your help.

Hope you are staying healthy in these trying times! Best, Jonathon

Jonathon J. Parker MD PhD Neurosurgery Resident Stanford University

gabri470 commented 4 years ago

Dear @parkerjo08 ,

Citing from the corresponding paper:

The Contact Position Estimator segments the contact positions of each SEEG electrode in each subject’s geometrical space, requiring two inputs (Fig. 1). The first input is a pre-processed post-implant CT volume where multilead electrodes are imaged. The preliminary processing of this dataset includes two steps and should be performed outside the proposed tool. The former aims to remove the skull, as its voxel intensities lie in the same range as contacts, by subtracting a co-registered (affine registration, mutual information, performed using FSL/FLIRT [25]) pre-implant CT. The latter uses a manually selected threshold of voxel intensities to enhance boundaries between contacts and the background.

Precisely, CT post implant needs to be skull-stripped and opportunely thresholded to remove skull and brain.

Hence the issue your are experiencing is not (apparently) linked to not being able to trigger CPE rather more linked to inappropriate file inputs.

Please let us know if you experience further problems.

Best regards,

Gabriel

parkerjo08 commented 4 years ago

Could you point me the correct direction for what scripts/tools you used to do this.

Apologies I am new to these workflows.

Additionally, can I just window the CT scan aggressively such that just the electrode contacts are visible (they have much higher HU than the pig skull) and then run CPE?

Additionally, the CT loaded is in NIFTI format is that ok?

Many thanks for your help.

Best, Jonathon

gabri470 commented 4 years ago

Dear @parkerjo08,

We've been working with Niguarda hospital in Milan for several years now. They used to acquire CT scan in OR prior SEEG electrodes implantation. This sequence is the used as reference frame during coregistration of surgical space (assessed in OR with O-arm CT scan from Medtronic) and pre-implant T1 MRI. Finally, when all electrodes are in place, ct-bone is then subtracted from CT post (with visible electrodes in it) after a rigid coregistration. Ultimately, CT-post from which we remove skull by subraction of pre-implant CT is thresholded to just show the metal artefacts surrounding the actual contacts. This processed volume is then saved and it constitutes the input of the CPE.

I think you can isolate the brain volume by using one Brain Extraction Tool ( e.g. BET from FSL) to identify cortex from skull/dura in T1MRI, use that to mask the CT (prior coregistation) to obtain a ct-bone imaging and subtract it from your CT. Finally find a suitable range of threshold that highlight the contact locations while preserving their real shape (not dimensions) as much as possible.

best,

Gabriele