Why are the dicom files disordered after I added them into the DICOM database?

I have converted 1000+ consecutive CT scanning TIFF files into DICOM files in the right order, but when I add the folder with all the converted files, 3D slicer made them into the wrong order. I checked the converted files, but they are in the right order. Does anyone know why it’s messed up?

DICOM files are sorted according to metadata in the header, so if you didn’t convert them with the correct values they will be invalid. If the source data is tiff you can use the ImageStacks module in SlicerMorph instead.