Automatic naming of the segmentation file Corresponding to DICOM file

Hello, greeting folks
I am working on a tumor classification model based on machine learning and deep learning that involves marking segmentation and saving it for each slice. DICOM data is labeled but while creating a new segmentation it takes up a name (for eg. segmentation 1) but ideally, I want it to be named as my original DICOM file(for eg. DICOM filename pateintno._sliceno._label). Is there any way to preset settings so that this can happen automatically.

While creating a new segmentation it takes up a name( segmentation 1) automatically as I am dealing with lots of data I would like to know if there is a way to set things up so that the new segmentation created can take the name as my DICOM file ( PatientNumber_SliceNumber_Label) automatically