Closed tsturgay closed 2 years ago
It seems there is a bug related to sys
NameError: global name 'sys' is not defined
Please try again and see if the error is solved!
Hello again,
Firstly thank you so much for quickly answering and helping.
We fix sys error on pyton codes and tried again.
But we saw error again :(
Error Log:
Traceback (most recent call last):
File "C:/Users/tunca/AppData/Roaming/NA-MIC/Extensions-28257/SlicerCochlea/lib/Slicer-4.10/qt-scripted-modules/CochleaSeg.py", line 243, in onApplyBtnClick
slicer.app.applicationLogic().GetSelectionNode().SetActiveTableID(self.logic.spTblNode.GetID())
AttributeError: CochleaSegLogic instance has no attribute 'spTblNode'
How can we fix this ?
Thank you for your helping.
I just updated the code, usually, it will take some time to be updated in the Slicer server.
It is useful to add some info e.g.
What system are you using, it seems to be windows! I only tested it on Windows 10!
What type of images are you using? you should use nrrd format and I suggest that the file name should be one word e.g. "imag1.nrrd". If it is DICOM, try to convert it to nrrd as described here:
[ 3D Slicer NRRD to DICOM or DICOM to NRRD (]https://www.youtube.com/watch?v=0EV_AL8YAGw&list=PLW9iOMxMvikpyCUMmuqiloNp7rpaUl2M1&index=1)
Hello dear Sir;
Thank you again for your interest.
We tried several things and unfortunately we had the same error with each one of them.
We used windows 10 and windows 11 and it did not work.
We installed 3dslicer 5.3 and downloaded sample data from there. Than we used that .nrrd data in 3dslicer 4.10.2 and we had the same error.
We downloaded dicom files from the internet and changed it to .nrrd in 3dslicer 4.10.2 and we used that data again and the result was same.
We couldnt convert our dicom files to .nrrd in 3dslicer 4.10.2 because when we try to click load it says: Could not load idose(1): as a scalar volume. ( we obtained this file from our hospital PACS system with 'export as DİCOM' )
We also used MdlDvLc.nrrd file which i think it is a model for your tool. and we had the same error which is:
** [Error 3] Sistem belirtilen yolu bulamýyor: 'C:\\Users\\tunca\\VisSimTools\\outputs/*.*' ERROR: model is not found modelPath: C:\Users\tunca\VisSimTools\models\modelCochlea\MdlDvRc.nrrd Traceback (most recent call last): File "C:/Users/tunca/AppData/Roaming/NA-MIC/Extensions-28257/SlicerCochlea/lib/Slicer-4.10/qt-scripted-modules/CochleaSeg.py", line 243, in onApplyBtnClick slicer.app.applicationLogic().GetSelectionNode().SetActiveTableID(self.logic.spTblNode.GetID()) _AttributeError: CochleaSegLogic instance has no attribute 'spTblNode_**
Thank you so much for your time.
Thanks for the info:
what is the content of C:\Users\tunca\VisSimTools?
Check is there is a folder in C:\Users\tunca\VisSimToolsCochlea\VisSimTools
if yes, move the folder VisSimTools to C:\Users\tunca
We couldnt convert our dicom files to .nrrd in 3dslicer 4.10.2 because when we try to click load it says: Could not load idose(1): as a scalar volume. ( we obtained this file from our hospital PACS system with 'export as DİCOM' )
could you please send me this dicom (after removing the patient private information) to my email? I will check what is wrong with it this weekend!
Hello dear Sir;
Thank you again for your response and we have good news :)
we changed the location of 'visSimtools' file to the 'C:\Users\tunca' location and the program were able to read it and it worked! We managed to calculate the scala tympani and scala vestibuli size and scala tympani length with the help of your program and thank you so much for that again.
Program worked with our original dicom file. We didnt convert it to the .nrrd format. But i will share our original data with you and ask for your help about the .nrrd convertion for possible future problems with dicom and your program.
Thank you again for this program and your time.
Good evening.
You are welcome! glad it works! this issue should be fixed by now!
We managed to calculate the scala tympani and scala vestibule size and scala tympani length with the help of your program and thank you so much for that again.
Please notice that the measurement is an approximation, you should be able to correct the measurement manually if needed by moving the points in the 3d view!
e when we try to click load it says: Could not load idose(1): as a scalar volume.
You should not load it as a scalar volume! you should first import the DICOM folder and then select the folder (not a file) as in the video tutorial.
You are welcome,
we changed the location of 'visSimtools' file to the 'C:\Users\tunca' location and the program were able to read it and it worked!
This should be fixed in the next extension update!
We managed to calculate the scala tympani and scala vestibuli size and scala tympani length with the help of your program and thank you so much for that again.
Please notice that the measurement gives an approximation based on how good is the segmentation, you should be able to add correct the measurement manually in the 3d view. Please also noticed that these measurements need more testing before using in actual surgery.
There will be a major update soon including a higher quality model and more measurements. Also the update should work in the recent stable Slicer version.
We couldnt convert our dicom files to .nrrd in 3dslicer 4.10.2 because when we try to click load it says: Could not load idose(1): as a scalar volume. ( we obtained this file from our hospital PACS system with 'export as DİCOM' )
This is a general 3D slicer question so I suggest you ask in Slicer forum many experts may help there.
The extension is updated and should work with the recent slicer version!
Thank you so much sir!
Hello,
We use 3d slicer version 4.10.
We have tried to run cochlear python but codes given error logs.
Error Log:
Traceback (most recent call last): File "C:/Users/tunca/AppData/Roaming/NA-MIC/Extensions-28257/SlicerCochlea/lib/Slicer-4.10/qt-scripted-modules/CochleaSeg.py", line 240, in onApplyBtnClick self.logic.run( self.inputSelectorCoBx.currentNode(),self.logic.inputFiducialNode, self.vsc.vtVars['cochleaSide'] ) File "C:/Users/tunca/AppData/Roaming/NA-MIC/Extensions-28257/SlicerCochlea/lib/Slicer-4.10/qt-scripted-modules/CochleaSeg.py", line 291, in run print("ERROR: model is not found", file=sys.stderr) NameError: global name 'sys' is not defined