Import DICOM files problem

By default, Matlab’s DICOM write function creates invalid volume. See a bit more information and potential solutions in this topic: How to import all dicom files into one volume

Matlab is really limited compared to Python when it comes to medical image computing, analysis, and visualization. I would recommend you to try to fully implement your workflow using Python-based tools. All features of Slicer and several important medical image computing libraries are available in Slicer’s embedded Python interpreter, so most probably you can implement custom processing workflow directly in Slicer.