How can I display special .nii file (with timeline) in sequence

Hi. I’m a beginner for VTK.
Right now I have an special .nii file which is 2D but has timeline. I had tried use vtkNIFTIImageReader + vtkImageActor + vtkRender + vtkRenderWindow to display this file as an image sequence. But I only can get the first frame of the sequence. What should I do?