Kaynağa Gözat

Merge to remote

Andrej Studen 5 yıl önce
ebeveyn
işleme
faeb5c4673

+ 4 - 0
labkeySlicerPythonExtension/slicerNetwork.py

@@ -270,6 +270,8 @@ class labkeyURIHandler(slicer.vtkURIHandler):
         # check for file in cache. If available, use, if not, download
         localPath=self.GetLocalPathFromRelativePath(relativePath)
         if os.path.isfile(localPath):
+            if debug:
+                print("Returning localFile {}".format(localPath))
             return localPath
 
         if debug:
@@ -277,6 +279,8 @@ class labkeyURIHandler(slicer.vtkURIHandler):
 
         #make all necessary directories LOCALLY
         path=os.path.dirname(localPath)
+        if debug:
+            print("Target directory: '{}''".format(path))
         if not os.path.isdir(path):
             os.makedirs(path)
 

+ 3 - 3
utils/resample.py

@@ -165,7 +165,7 @@ class resampleLogic(ScriptedLoadableModuleLogic):
       coeff.Update()
       #interpolation ready to use
 
-      #this is tought. COpy only links (ie. shallow copy)
+      #this is tough. COpy only links (ie. shallow copy)
       newImage=vtk.vtkImageData()
       newImage.DeepCopy(refNode.GetImageData())
       newImage=self.cast(newImage,node.GetImageData())
@@ -199,11 +199,11 @@ class resampleLogic(ScriptedLoadableModuleLogic):
             if i%10000==0:
                 log.write(("[{}]: {}->{}\n").format(i,v0,v))
 
-      node.SetName(nodeName+"_BU")
+      #node.SetName(nodeName+"_BU")
 
 
       newNode=slicer.vtkMRMLScalarVolumeNode()
-      newNode.SetName(nodeName)
+      newNode.SetName(nodeName+"_RS")
       newNode.SetOrigin(refNode.GetOrigin())
       newNode.SetSpacing(refNode.GetSpacing())
       newNode.SetIJKToRASMatrix(refIJKtoRAS)