|
@@ -234,15 +234,12 @@ class exportDicomLogic(slicer.ScriptedLoadableModule.ScriptedLoadableModuleLogic
|
|
|
f.write("{}".format(id))
|
|
|
f.close()
|
|
|
return forId
|
|
|
-
|
|
|
+
|
|
|
def generateSeriesUUID(self,type,baseUUID):
|
|
|
|
|
|
x=datetime.datetime.now()
|
|
|
- hour=x.strftime("%H")
|
|
|
- hour=re.sub('^0','',hour)
|
|
|
- ft=hour+x.strftime("%M%S")
|
|
|
seriesInstanceUid=baseUUID+'.'+self.labelUUID['series']+'.'
|
|
|
- seriesInstanceUid+=self.dataUUID[type]+'.'+x.strftime("%Y%m%d")+'.'+ft
|
|
|
+ seriesInstanceUid+=self.dataUUID[type]+'.'+x.strftime("%Y%m%d")+'.'+getTimeCode(x)
|
|
|
return seriesInstanceUid
|
|
|
|
|
|
def setAttribute(self,shn,itemId,label,metadata):
|
|
@@ -410,3 +407,9 @@ class exportDicomLogic(slicer.ScriptedLoadableModule.ScriptedLoadableModuleLogic
|
|
|
remotePath=net.GetLabkeyPathFromRelativePath(relativePath)
|
|
|
print("remotePath: {}").format(relativePath)
|
|
|
net.copyLocalFileToRemote(localPath,remotePath)
|
|
|
+
|
|
|
+def getTimeCode(x):
|
|
|
+ hour=x.strftime("%H")
|
|
|
+ hour=re.sub('^0','',hour)
|
|
|
+ return hour+x.strftime("%M%S")
|
|
|
+
|