How to use your own images in the DICOM example

Hi geant4ers:
I recently intended to use the sample DICOM to create a brain model from CT images, but when I changed the .g4dom in the sample to the same dcm file as in the sample (included in the share folder) the program started reporting errors.
This error is generated by G4PVPReplica::CheckAndSetParameters(). Illegal number of replicas.
I don’t know why this is happening.
I hope you can give me some advice on how to use the DICOM example to model through the images you provide. As a newbie your advice is very valuable to me and I thank you all for your answers.