Problem using MEMOS extension

Thank you Murat! It started running and eventually failed with this error: Traceback (most recent call last):

File “C:/Users/Bowling Lab/AppData/Local/slicer.org/Slicer 5.8.1/slicer.org/Extensions-33241/MEMOS/lib/Slicer-5.8/qt-scripted-modules/MEMOS.py”, line 306, in onApplySingleButton

labelFilePath = self.launchInference(volumeNode)

File “C:/Users/Bowling Lab/AppData/Local/slicer.org/Slicer 5.8.1/slicer.org/Extensions-33241/MEMOS/lib/Slicer-5.8/qt-scripted-modules/MEMOS.py”, line 368, in launchInference

logic.processInference(tempVolumeFile, self.modelPathSingle.currentPath, outputLabelPath, self.colorNode)

File “C:/Users/Bowling Lab/AppData/Local/slicer.org/Slicer 5.8.1/slicer.org/Extensions-33241/MEMOS/lib/Slicer-5.8/qt-scripted-modules/MEMOS.py”, line 491, in processInference

slicer.util.logProcessOutput(proc)

File “C:\Users\Bowling Lab\AppData\Local\slicer.org\Slicer 5.8.1\bin\Python\slicer\util.py”, line 3862, in logProcessOutput

raise CalledProcessError(retcode, proc.args, output=proc.stdout, stderr=proc.stderr)

subprocess.CalledProcessError: Command ‘[‘C:/Users/Bowling Lab/AppData/Local/slicer.org/Slicer 5.8.1/bin/../bin\\PythonSlicer.EXE’, ‘C:/Users/Bowling Lab/AppData/Local/slicer.org/Slicer 5.8.1/slicer.org/Extensions-33241/MEMOS/lib/Slicer-5.8/qt-scripted-modules\\Scripts\\MEMOS_inference.py’, ‘–volume-path’, “{‘image’: ‘C:/Users/Bowling Lab/AppData/Local/Temp/Slicer\\\\tempMEMOSVolume\\\\2793: Linear Attenuation [1-cm] (2793).nii.gz’}”, ‘–model-path’, ‘C:/Users/Bowling Lab/AppData/Local/slicer.org/Slicer/cache/SlicerIO\\best_metric_model_largePatch_noise.pth’, ‘–output-path’, ‘C:/Users/Bowling Lab/AppData/Local/Temp/Slicer\\tempMEMOSOut\\2793: Linear Attenuation [1-cm] (2793)_seg.nii.gz’, ‘–color-node’, ‘vtkMRMLColorTableNode (000001EA9A67B360)\n ID: vtkMRMLColorTableNode1\n ClassName: vtkMRMLColorTableNode\n Name: KOMP2\n Debug: false\n MTime: 261593\n Description: A color table read in from a text file, each line of the format: IntegerLabel Name R G B Alpha\n SingletonTag: (none)\n HideFromEditors: false\n Selectable: true\n Selected: false\n UndoEnabled: false\n Attributes:\n Category:File\n Node references:\n storage [storageNodeRef]: vtkMRMLColorTableStorageNode22\n StorageNodeIDs[0]: vtkMRMLColorTableStorageNode22\n Name: KOMP2\n Type: (File)\n NoName = (none)\n Names array initialised: true\n Color Names:\n 0 background (0, 0, 0, 1)\n 1 left lung (0.772549, 0.647059, 0.568627, 1)\n 2 cranial lobe (0.501961, 0.682353, 0.501961, 1)\n 3 middle lobe (0.945098, 0.839216, 0.568627, 1)\n 4 caudal lobe (0.694118, 0.478431, 0.396078, 1)\n 5 accessory lobe (0.435294, 0.721569, 0.823529, 1)\n 6 left kidney (0.72549, 0.4, 0.32549, 1)\n 7 right kidney (0.72549, 0.4, 0.32549, 1)\n 8 stomach wall (0.847059, 0.396078, 0.309804, 1)\n 9 stomach lumen (0.866667, 0.509804, 0.396078, 1)\n 10 medial lobe of liver (0.564706, 0.933333, 0.564706, 1)\n …\n Look up table:\n Debug: Off\n Modified Time: 261572\n Reference Count: 1\n Registered Events: \n Registered Observers:\n vtkObserver (000001EA9C545DA0)\n Event: 33\n EventName: ModifiedEvent\n Command: 000001EA99D315A0\n Priority: 0\n Tag: 2\n vtkObserver (000001EA9C545D70)\n Event: 2\n EventName: DeleteEvent\n Command: 000001EA99D315A0\n Priority: 0\n Tag: 1\n Alpha: 1\n VectorMode: Component\n VectorComponent: 0\n VectorSize: -1\n IndexedLookup: OFF\n AnnotatedValues: 0 entries.\n TableRange: (0, 50)\n Scale: Linear\n HueRange: (0, 0.66667)\n SaturationRange: (1, 1)\n ValueRange: (1, 1)\n AlphaRange: (1, 1)\n NanColor: (0.5, 0, 0, 1)\n BelowRangeColor: (0, 0, 0, 1)\n UseBelowRangeColor: OFF\n AboveRangeColor: (1, 1, 1, 1)\n UseAboveRangeColor: OFF\n NumberOfTableValues: 51\n NumberOfColors: 51\n Ramp: SCurve\n InsertTime: 261571\n BuildTime: 0\n Table: \n Debug: Off\n Modified Time: 261316\n Reference Count: 1\n Registered Events: (none)\n Name: (none)\n Data type: unsigned char\n Size: 1040\n MaxId: 203\n NumberOfComponents: 4\n Information: 0000000000000000\n Name: (none)\n Number Of Components: 4\n Number Of Tuples: 51\n Size: 1040\n MaxId: 203\n LookupTable: (none)\n\n’]’ returned non-zero exit status 1. The data I am trying to analyse is not very good (very noisy), would that be the reason for failure?

Can you try to rename your dicom volume that doesn’t have special characters and retry? With its space and square brackets it might be causing problem? 2793: Linear Attenuation [1-cm] (2793)

Just rename it to something simple like volume and try.

Also how big is the volume, and how much memory your GPU has.

Thank you for your reply Murat. I tried that and got the same error. The dimensions are 1445, 1386, 800, the folder size is 3.21GB. My GPU has 18GB I think (under graphics card). I am now trying downsampling the file to 25% and I got this warning Warning: In vtkSlicerSegmentationsModuleLogic.cxx, line 1467

vtkMRMLSegmentationNode (0000019D610A53A0): vtkSlicerSegmentationsModuleLogic::ImportLabelmapToSegmentationNode: Segmentation is a floating point scalar type and will be cast to an integer type. Voxel values may be truncated but it did give me an output!!!

Thats a very large volume. Try downsampling it by 2 and retry.

But now the memos segmentation and my image don’t overlay and my guess would be that it is something to do with the downsampling?

Thats a simple fix, but that’s least of your concerns. From images your embryo looks like E11-E12 or whereabouts. MEMOS is specific to E15 time point. It will not help you much, in fact probably not at all. You will be better of using nnInteractive and do prompt based segmentation.