You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
jcfr
changed the title
Exporting two segmentation node in a row in the same output directory overwrite the prevous one
Exporting two segmentation nodes in a row in the same output directory overwrite the prevous one
Jun 11, 2021
Instance UID can be too long to be used as filename. We often had DICOM import failures when used DICOM UIDs directly for folder and file names due to the complete file path becoming longer than maximum path length.
When we create temporary filenames based on timestamp in Slicer, we typically add a 3-4 digit random number to the timestamp to keep the filename relatively short but prevent name clashes.
For cases when we want to separate DICOM files based on UIDs, we use an md5 hash, as it provides good separation but keeps the file path length in control. It is usable even when we build a folder structure from patient, study, series, instance ID.
Note that DICOM export plugins generally expect to get an empty output folder. For example, if I remember correctly, the DICOM RT export plugin uses image0001, image0002,... output filenames.
Since the DICOM file name is initialized using the current date and time, exporting in the same directory overwrites the previous file.
QuantitativeReporting/DICOMPlugins/DICOMSegmentationPlugin.py
Line 351 in 87852c8
QuantitativeReporting/DICOMPlugins/DICOMSegmentationPlugin.py
Lines 437 to 440 in 87852c8
The text was updated successfully, but these errors were encountered: