VisSim Cochlea Tools extension is now public


(ibr_ex@yahoo.com) #1

I added video tutorials on how to register and fuse and segment cochlea multi-modal images using our VisSim Tools extension that uses elastix toolbox as well. The source code can be found here.
Sample cochlea datasets are also shared and can be downloaded using “Data Store”
module.

This is still a beta version and more enhancement will be added to both source code and videos.


(ibr_ex@yahoo.com) #2

The SlicerCochlea extension is already merged few days ago but it does not appear in the extension manager. Is there something wrong?


#3

It does appear in the extension manager for me with the current nightly build on Linux (4.11.0-2018-10-23 r27518), but it doesn’t seem to work. I’m getting the following error messsage in the terminal window where I start Slicer:

$ slicer
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/torquil/.config/NA-MIC/Extensions-27518/SlicerCochlea/lib/Slicer-4.11/qt-scripted-modules/CochleaReg.py", line 24, in <module>
    import Tkinter, tkFileDialog
ImportError: No module named Tkinter
loadSourceAsModule - Failed to load file "/home/torquil/.config/NA-MIC/Extensions-27518/SlicerCochlea/lib/Slicer-4.11/qt-scripted-modules/CochleaReg.py"  as module "CochleaReg" !
Fail to instantiate module  "CochleaReg"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/torquil/.config/NA-MIC/Extensions-27518/SlicerCochlea/lib/Slicer-4.11/qt-scripted-modules/CochleaSeg.py", line 25, in <module>
    import Tkinter, tkFileDialog
ImportError: No module named Tkinter
loadSourceAsModule - Failed to load file "/home/torquil/.config/NA-MIC/Extensions-27518/SlicerCochlea/lib/Slicer-4.11/qt-scripted-modules/CochleaSeg.py"  as module "CochleaSeg" !
Fail to instantiate module  "CochleaSeg"

When it works I will be happy to try it.

Best regards,
Torquil Sørensen


(ibr_ex@yahoo.com) #4

Thanks for interesting in our work.

I tested it on Slicer 4.81. I will update it and test it on the recent versions 4.10 and 4.11 next week.

Not sure why Tkinter does not work, maybe Slicer 11 uses python 3? I just updated the code, hopefully, this problem is fixed in the next build.


(James Butler) #5

@brhoom Slicer is not using python 3 yet, but you might want to review the comment in this thread Should we do something about EM segmenter?. TCL support was recently disabled in Slicer.


(ibr_ex@yahoo.com) #6

Thanks for the info. I will remove Tkinter and tk from the code.


(ibr_ex@yahoo.com) #7

The extension is updated and it should work with recent slicer version 4.10 and 4.11 when it builds next time.

I don’t know why the extension icon and screenshots do not appear, is there something I should do to fix it?


(Andras Lasso) #8

Icon URLs in s4ext file are not used, they are for information purposes only. What matters is the URLs in the CMakeLists.txt file (https://github.com/MedicalImageAnalysisTutorials/SlicerCochlea/blob/master/CMakeLists.txt).

Also, URL seems incorrect. URL to raw data on github usually looks like this: https://raw.githubusercontent.com/MedicalImageAnalysisTutorials/SlicerCochlea/master/SlicerCochlea.png


(ibr_ex@yahoo.com) #9

Thanks, Andras, now it is clear. I updated the links with raw links in both s4ext and CMakeLists.txt.


#10

Ok, I installed the latest Slicer 3D nightly for Linux, and now I’m getting this error on the terminal after picking a point in the middle of the cochlea in a CT image, and then clicking on “Run”:

Switch to module:  "CochleaSeg"
 
=======================================================
   Automatic Cochlea Image Segmentation               
=======================================================
   Default Settings: 
      VisSimTools folder: /home/torquil/VisSimTools
      Output folder : /home/torquil/VisSimTools/outputs
      Parameter file: /home/torquil/VisSimTools/pars/parCochSeg.txt
      Cropping Length: 10
elastix binaries are found in /home/torquil/VisSimTools/sw/elastix-4.9.0/bin/elastix
Other files are found !
Traceback (most recent call last):
  File "/home/torquil/.config/NA-MIC/Extensions-27526/SlicerCochlea/lib/Slicer-4.11/qt-scripted-modules/CochleaSeg.py", line 746, in updateLengthBtnClick
    ptsRASNode =  self.markupsNode
AttributeError: CochleaSegWidget instance has no attribute 'markupsNode'
 ..... getting cochlea location in the input image

 ..... cochlea location RAS: [38.186453904880466, 170.83668361478453, 225.1563957681987, 1.0]
 ..... cochlea location in the fixed image set to: [85, 301, 299]
removing old output folder!
Traceback (most recent call last):
  File "/home/torquil/.config/NA-MIC/Extensions-27526/SlicerCochlea/lib/Slicer-4.11/qt-scripted-modules/CochleaSeg.py", line 465, in runBtnClick
    self.inputPath = self.inputNode.GetStorageNode().GetFileName()
AttributeError: 'NoneType' object has no attribute 'GetFileName'

Within Slicer, the “Run”-button turned red and says “…please wait”, but nothing is happening and the timer is not counting.


(ibr_ex@yahoo.com) #11

Thanks for testing.
I could not reproduce the problem. Does the cochlea registration module work?

Please try these steps:

  1. save your cochlea image in your home folder as nrrd format. Sometimes elastix does not recognize filenames with special characters or spaces, e.g. use this filename. /home/torquil/img.nrrd

  2. delete the output contents

      rm -r /home/torquil/VisSimTools/outputs/*
    
  3. restart slicer

  4. load your nrrd cochlea image

  5. run the cochlea segmentation module

Let me know if this works.


(ibr_ex@yahoo.com) #12

I just retest it again on a clean installation of Ubuntu 18.04. The only thing I needed to do is to install opencl:

sudo apt install ocl-icd-opencl-dev

please make sure you have this install before trying the above steps.


(Andras Lasso) #13

Do you really need OpenCL? Could you include runtime libraries in the extension instead of asking the user to manually download and install development packages? Many users are not comfortable with installing additional software tools.

If there is no chance for a better solution then at least the extension should detect if some OpenCL component is missing and display a meaningful error message - with an explanation and download link.


(ibr_ex@yahoo.com) #14

Do you really need OpenCL? Could you include runtime libraries in the extension instead of asking the user to manually download and install development packages?

Thanks for your comment. You are right. I used my elastix binaries as a temporary solution as I am planning to use SlicerElastix instead.


(ibr_ex@yahoo.com) #15

Update:

  • Runtime libraries are included now in the elastix binaries.
  • Logic classes are added so some useful function can be called from external Slicer modules.
  • Tests classes are added so the user can run them using Slicer Developer Mode and the button “Reload and Test”.
  • Minor bugs are fixed.

Using SlicerElastix binaries in the terminal