How to use Threejs DataArrayTexture to render dicom or one position nrrd image?

I want to render Dicom or nrrd image like this threejs example: three.js examples

I have two possible solutions:

  1. Create an image array file like the example used (head256x256x109). Then, I read this article(Getting Started with Volume Rendering using OpenGL - CodeProject), it almost tell us how use OpenGL to create that dataset. If we can create that kind of dataset file, then maybe we can use threejs Fileloader function to use it directly. But this way is too hard for me, to merge all dicom pixels data into one position(z) in one file, and I have no idea on openGL.
  2. Convert Dicom image to Nrrd, then use threejs nrrdloader to load the nrrd image. If we can get position z all slice’s volume data, then we may also can use that data as a 2d array and use THREE.DataArrayTexture to render it, like in texture2darray. But the biggest issue for me is how to get one position all volume data in threejs nrrd method?

Does anyone familiar with these and could you give me a hand? Thanks so much!