Exporting sequence annotation (2d + time)

I am a new user of 3d slicer and I am working on segmenting 2d + time sequences. I have successfully annotated the sequences and I have saved the annotations as sequence files. I am now trying to export the annotations to either DICOM, NIFTI, or nrrd files however when I export the annotation it appears to export only a single point in the sequence.

I have previously read that this can be accomplished using a python script which I have attempted to do, however I am unaware of how I can access the segmentation sequence node using the API. I will include the python code that I am currently using below. It

import numpy as np
sequenceNode = slicer.mrmlScene.GetFirstNodeByClass("vtkMRMLSequenceNode") 
dims = slicer.util.arrayFromVolume(sequenceNode.GetNthDataNode(0)).shape

voxelArray = np.zeros([dims[0], dims[1], dims[2], sequenceNode.GetNumberOfDataNodes()])
for volumeIndex in range(sequenceNode.GetNumberOfDataNodes()):
    voxelArray[:, :, :, volumeIndex] = slicer.util.arrayFromVolume(sequenceNode.GetNthDataNode(volumeIndex))


Any help is greatly appreciated