# Video sequence of 3D volumetric data?

**URL:** <https://discourse.threejs.org/t/video-sequence-of-3d-volumetric-data/53354>\
**Category:** Questions\
**Tags:** video, 3d-textures\
**Created:** [June 29, 2023, 11:25am UTC](https://discourse.threejs.org/t/video-sequence-of-3d-volumetric-data/53354 "2023-06-29T11:25:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Boker](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jeff_boker/32/22518_2.png) [@Jeff\_Boker](https://discourse.threejs.org/u/Jeff_Boker)\
**Post date:** [June 29, 2023, 11:25am UTC](https://discourse.threejs.org/t/video-sequence-of-3d-volumetric-data/53354/1 "2023-06-29T11:25:15Z")

</div>

I have a stack of 100 images of size 300 x 300 which represent a 3D volume of a medical scan. I have another 100 of these 3D volumes as a sequence. I have been trying to visualize this 3D image sequence data as a video where I can watch how the volume is changing over time and move around the scene to see the changes in the volume from different views.

I initially tried doing this in matplotlib but it only works on 3D point data and I could not figure out how to make it visualize a 3D stack of images as a video. I also did not see support for this in mayavi or plotly and I was wondering if there is a package that can do this visualization out of the box? I would like to see the video sequence As MIP and if possible to slice through them. This is when I though of ThreeJS but I was not sure if Three Js is capable of rendering volumetric data in real-time or update fast enough as a sequence of videos? Or if there are any examples of this available?

---

<div class="post-metadata">

**Author:** ![Fennec](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fennec/32/59265_2.png) [@Fennec](https://discourse.threejs.org/u/Fennec)\
**Post date:** [June 29, 2023, 11:45am UTC](https://discourse.threejs.org/t/video-sequence-of-3d-volumetric-data/53354/2 "2023-06-29T11:45:23Z")

</div>

You can try [DataArrayTexture](https://DataArrayTexture), check the official [example](https://threejs.org/examples/?q=texture#webgl2_materials_texture2darray).

---

<div class="post-metadata">

**Author:** ![Fyrestar](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fyrestar/32/52793_2.png) [@Fyrestar](https://discourse.threejs.org/u/Fyrestar)\
**Post date:** [June 29, 2023, 2:51pm UTC](https://discourse.threejs.org/t/video-sequence-of-3d-volumetric-data/53354/3 "2023-06-29T14:51:02Z")

</div>

What do you mean by sequence?

---

<div class="post-metadata">

**Author:** ![Jeff\_Boker](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jeff_boker/32/22518_2.png) [@Jeff\_Boker](https://discourse.threejs.org/u/Jeff_Boker)\
**Post date:** [June 29, 2023, 3:15pm UTC](https://discourse.threejs.org/t/video-sequence-of-3d-volumetric-data/53354/4 "2023-06-29T15:15:06Z")

</div>

So for a video, you have 2D frames as a sequence. I have 3D volumes as a sequence and I wanted to visualize how this volume is changing in that sequence like a video.

---

<div class="post-metadata">

**Author:** ![Fyrestar](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fyrestar/32/52793_2.png) [@Fyrestar](https://discourse.threejs.org/u/Fyrestar)\
**Post date:** [June 29, 2023, 3:23pm UTC](https://discourse.threejs.org/t/video-sequence-of-3d-volumetric-data/53354/5 "2023-06-29T15:23:09Z")

</div>

Then you would just render it like a video, sequence by sequence with a delay. However i don’t know how you compressed that.

Assuming the depth is also 300 that would be 300 frames of 300x300 images. You could squeeze them in a compressed video and render the frames of one sequence into a 3D texture, and continue for the next sequences, but i don’t know how well the result will look as there is no exact access on single frames on videos asides of compression artifacts.
