# How to initialize 100 DataNode for a new created SequenceNode without adding into the scene?

**URL:** <https://discourse.slicer.org/t/how-to-initialize-100-datanode-for-a-new-created-sequencenode-without-adding-into-the-scene/24986>\
**Category:** Development\
**Tags:** sequences, python, module\
**Created:** [August 30, 2022, 12:03am UTC](https://discourse.slicer.org/t/how-to-initialize-100-datanode-for-a-new-created-sequencenode-without-adding-into-the-scene/24986 "2022-08-30T00:03:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunshine](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@sunshine](https://discourse.slicer.org/u/sunshine)\
**Post date:** [August 30, 2022, 12:03am UTC](https://discourse.slicer.org/t/how-to-initialize-100-datanode-for-a-new-created-sequencenode-without-adding-into-the-scene/24986/1 "2022-08-30T00:03:36Z")

</div>

Hi everyone,

I am trying to write my first extension module related to sequence annotation but am stuck at the `SequenceNode` initialization step.

I have a `SequenceBrowser` with one `SequenceNode` containning 100 `vtkMRMLScalarVolumeNode`.  
I would like to add a new `SequenceNode` using 100 MarkUp `PointList`, i.e., `vtkMRMLMarkupsFiducialNode`.

How can I fill up the newly created `SequenceNode` with 100 empty `PointList` without adding any `PointList` to the scene file?  
How can I instance an empty `PointList` without adding to the scene, and what are the possible functions I can use to fill up the newly created `SequenceNode`?

Thank you very much in advance!

---

<div class="post-metadata">

**Author:** ![sunshine](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@sunshine](https://discourse.slicer.org/u/sunshine)\
**Post date:** [August 30, 2022, 3:47am UTC](https://discourse.slicer.org/t/how-to-initialize-100-datanode-for-a-new-created-sequencenode-without-adding-into-the-scene/24986/2 "2022-08-30T03:47:33Z")

</div>

So glad I made it by myself !! 😁  
Empty node\_PointList: `slicer.vtkMRMLMarkupsFiducialNode()`  
Fill Sequence: ` nodeSeq_Annotation.SetDataNodeAtValue(node_EmptyPointList, str_IndexValue_Time)`

```auto
# Fill up the SequenceNode with all empty 'PointList'
num_DataNodes = nodeSeqBrowser.GetNumberOfItems()
nodeSeq_Image = nodeSeqBrowser.GetSequenceNode(slicer.util.getNode('Existing_ProxyNodeName'))
for idx_DataNode in range(num_DataNodes):
    str_IndexValue_Time = nodeSeq_Image.GetNthIndexValue(idx_DataNode)
    nodeSeq_Annotation.SetDataNodeAtValue(slicer.vtkMRMLMarkupsFiducialNode(), str_IndexValue_Time)

```
