# Python script to create an empty time sequence list

**URL:** https://discourse.slicer.org/t/python-script-to-create-an-empty-time-sequence-list/33233
**Category:** Development
**Tags:** sequences, python, markups-fiducials
**Created:** [December 5, 2023, 2:47pm UTC](https://discourse.slicer.org/t/python-script-to-create-an-empty-time-sequence-list/33233 "2023-12-05T14:47:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![admarques](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@admarques](https://discourse.slicer.org/u/admarques)
#### Post date: [December 5, 2023, 2:47pm UTC](https://discourse.slicer.org/t/python-script-to-create-an-empty-time-sequence-list/33233/1 "2023-12-05T14:47:46Z")

</div>

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?
