Through the UI, you can import the labelmap as segmentation, turn them into individual segments using island tool, and then use the segment statistics module to get the centroids for each of those segments.
If you will do it more than once, scripting is probably the better approach.
I got the results like this
How can I get the position coordinates for each of the centroide of a segment and then replace it with a fiducial
Thanks I found the solution
The electrodes which I extracted now I can represent them with fiducials.
is there a way to project these fiducials onto the brain cortical surface on the T1 MRI? I need to calculate the distance between the projected and actual electrode positions in CT scan.
Any idea how can I get? Can I use the nearest neighbour to find cells on brain and then get cell centroid and convert to fiducials or is there a better way of projecting onto brain surface.
Projection to a curved surface is not a well-defined operation: it can be done many different ways, with slightly different results.
Can you post a few screenshots that show where the electrode positions are, how the cortical surface looks like, and where do you think they should be projected to?
I am attaching the screen shot.
How can I project to surface. The electrodes shown in red are segmented from CT and shown with fiducials
I need to go for an algorithm that can dynamically picks surface triangles with respect to the electrodes identified from ct of the same patient. I need to do it for multiple patients.
Is there anything I can do to do this automatically.
I need to calculated the displacements of the cells of the brain done during craniotomy and through placing these electrodes.
You can get the closest surface point or cell to a markup point as it is shown in these examples:
I got the selected cells of the model. It is possible to get the centroid for each selected cell.
I got it. I got the cell point ids and from there I get three points and then averaging over x axis y axis and z axis. to get the centroid.