I’m working with a CT image dataset containing different time phases.
I would like to write a Python script to create an empty time sequence list as a placeholder to have these pre-created lists with specific names and fill them by selecting points in the interface.
My current code is:
emptyFiducialNode = slicer.vtkMRMLMarkupsFiducialNode()
emptyFiducialNode.SetName(“TSPlF”)
slicer.mrmlScene.AddNode(emptyFiducialNode)sequenceNode = slicer.vtkMRMLSequenceNode()
sequenceNode.SetName(“FS”)
sequenceNode.CreateNodeInstance()
slicer.mrmlScene.AddNode(sequenceNode)sequenceBrowserNode = slicer.vtkMRMLSequenceBrowserNode()
sequenceBrowserNode.SetName(“FSBrowser”)
slicer.mrmlScene.AddNode(sequenceBrowserNode)
sequenceBrowserNode.AddProxyNode(emptyFiducialNode, sequenceNode, True)sequenceBrowserNode.SetAndObserveMasterSequenceNodeID(sequenceNode.GetID())
sequenceBrowserNode.SetOverwriteProxyName(sequenceNode, True)
sequenceBrowserNode.SetPlayback(sequenceNode, True)
sequenceBrowserNode.SetRecording(sequenceNode, True)
sequenceBrowserNode.SetSaveChanges(sequenceNode, True)
With this code, I’m seeing in the 3Dslicer interface 3 Points Lists:
FS [time=0s]
TSPIF
FS [time0s]
However, none of them make a distinction between times. For example, one point inserted at time 0 will appear selected at all other times. Moreover, I only want one list appearing in the interface instead of this repeated one.
Is it possible to achieve this behavior through a Python script?