remove the intermediate file
@@ -30,6 +30,8 @@ function OnStoredInstance(instanceId, tags, metadata, origin)
os.execute('pymedphys dicom adjust-rel-elec-density -i ' .. received_filepath .. ' ' .. intermediate_filepath .. ' "Couch Edge" 1.1 "Couch Foam Half Couch" 0.06 "Couch Outer Half Couch" 0.5')
os.execute('pymedphys dicom structure-name-red-adjust ' .. intermediate_filepath .. ' ' .. converted_filepath)
+ os.remove(intermediate_filepath)
+
elseif tags['SOPClassUID'] == plan_UID then
print('Converting a plan')
os.execute('pymedphys dicom adjust-machine-name ' .. received_filepath .. ' ' .. converted_filepath .. ' 2619')
