Open tdowrick opened 3 years ago
In GitLab by @RolandGuichard on Jul 18, 2019, 11:51
changed the description
In GitLab by @RolandGuichard on Jul 18, 2019, 12:04
changed the description
In GitLab by @AnastasisGeorgoulas on Jul 18, 2019, 12:25
There are (at least) two options for showing the points. The first is to create a spherical model:
radius = 5 # for example
sphere = slicer.modules.createmodels.logic().CreateSphere(radius)
slicer.mrmlScene.AddNode(sphere) # maybe not needed
sphere.GetDisplayNode().SetColor(255, 0, 0) # for red (RGB triplet)
# To show sphere outline in slice viewers:
sphere.GetDisplayNode().SetSliceIntersectionVisibility(True)
neurostim_location_tf
:
functions.set_parent_of_transform_hierarchy_node(sphere, neurostim_location_tf)
In GitLab by @AnastasisGeorgoulas on Jul 18, 2019, 15:53
The second way is using the Markups module to add fiducials. In this case, we need the coordinates of the point rather than a transform:
slicer.modules.markups.logic().AddFiducial(coord_x, coord_y, coord_z)
# Assuming there is only fiducial node
fidNode = slicer.util.getNode("vtkMRMLMarkupsFiducialNode1")
fidNode.GetDisplayNode().SetSelectedColor(255, 0, 0)
To show points in different colours (for example, depending on whether there was a response), we can use multiple fiducial lists. Can also check the Fiducial Registration module, which uses a transform instead of coordinates.
In GitLab by @DavidPerez-Suarez on Aug 20, 2019, 17:13
I believe !20 implements this.
In GitLab by @AnastasisGeorgoulas on Aug 21, 2019, 07:20
@DavidPerez-Suarez There is actually more work on that in the ageorgou/form-to-get-neurostim-point
branch. That contains the code for showing the points and saving the voltage, among other things.
In GitLab by @RolandGuichard on Jul 18, 2019, 11:51
From the transform an actual point coordinates (?) save the location into a timestamped file and show the point under another sphere model (?) in the 3D viewer.
This is a sub-issue of #66