MedicalImageAnalysisTutorials / SlicerCochlea

Multi-modal cochlea Images registration, segmentation and analysis
13 stars 4 forks source link

segmentation not working in mac #19

Closed fikrimirza closed 5 years ago

fikrimirza commented 5 years ago

Thank you for your update, now the modules is already installed but sadly it's not working after picking cochlear location the module stop working and here are the message on phyton interactor :

File "/Applications/Slicer.app/Contents/Extensions-28257/SlicerCochlea/lib/Slicer-4.10/qt-scripted-modules/CochleaSeg.py", line 253, in onApplyBtnClick self.logic.run( self.inputSelectorCoBx.currentNode(),self.logic.inputFiducialNode, self.vsc.vtVars['cochleaSide'] ) AttributeError: CochleaSegLogic instance has no attribute 'inputFiducialNode'

Thank you for your attention

idhamari commented 5 years ago

WHich Slicer version are you using it same there is version conflict?

fikrimirza commented 5 years ago

4.10.2 , after converting dicom into nrrd data we found this error responses

File "/Applications/Slicer.app/Contents/Extensions-28257/SlicerCochlea/lib/Slicer-4.10/qt-scripted-modules/CochleaSeg.py", line 253, in onApplyBtnClick self.logic.run( self.inputSelectorCoBx.currentNode(),self.logic.inputFiducialNode, self.vsc.vtVars['cochleaSide'] ) File "/Applications/Slicer.app/Contents/Extensions-28257/SlicerCochlea/lib/Slicer-4.10/qt-scripted-modules/CochleaSeg.py", line 339, in run copyfile(resTransPathOld, resTransPath) File "/Applications/Slicer.app/Contents/lib/Python/lib/python2.7/shutil.py", line 82, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: '/Users/fikrimp/VisSimTools/outputs/TransformParameters.0.txt'

idhamari commented 5 years ago

Thanks for reporting. There was a bug in the last update now it is fixed. Please check again tomorrow. To check if the extension work please:

Screenshot from 2019-06-20 17-49-24

Screenshot from 2019-06-20 17-50-57

Screenshot from 2019-06-20 17-51-59

I already tested the updated module on Linux and Windows. Next week I will test it on Mac but I think it should work as well.

fikrimirza commented 5 years ago

yes sir

On 20 Jun 2019, at 22.39, idhamari notifications@github.com wrote:

Thanks for reporting. There was a bug in the last update now it is fixed. Please check again tomorrow. To check if the extension work please:

Check the box Enable developer mode" from Edit >Application Settings > Developer, after that restart Slicer. Open Cochlea segmentation module then click "Reload and Test" If there is an error, copy paste the whole Python interactor text and paste it here. I already tested the updated module on Linux and Windows. Next week I will test it on Mac but I think it should work as well.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MedicalImageAnalysisTutorials/SlicerCochlea/issues/19?email_source=notifications&email_token=AJAMUDFALCT7C4EAURYS5XDP3OQCNA5CNFSM4HZDQQM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYFZNNY#issuecomment-504075959, or mute the thread https://github.com/notifications/unsubscribe-auth/AJAMUDACPT6QF4Y5CM4CKPTP3OQCNANCNFSM4HZDQQMQ.

fikrimirza commented 5 years ago

I still cannot work with my data

Automatic Cochlea Image Segmentation

/Applications/Slicer.app/Contents/Extensions-28257/SlicerCochlea/lib/Slicer-4.10/qt-scripted-modules/Resources/UI/CochleaSeg.ui Defaults paths: VisSimTools folder: /Users/fikrimp/VisSimTools Output folder : /Users/fikrimp/VisSimTools/outputs elastix binaries are found in /Applications/Slicer.app/Contents/Extensions-28257/SlicerElastix/lib/Slicer-4.10/elastix Cochlea Extension is selected sha256computedCheckSum: 5b94b2afd1c7a04a87cad4a443b1facd865e32d78624a7e4878d54732c8b3ce2 Models or contents are wrong, trying to download ... Downloading VisSim Tools ... Downloading VisSimTools others ... Extracting to user home done! ..... getting Cochlea location in the input image Fiducial adding event! 0 <type 'vtkSlicerMarkupsModuleMRMLPython.vtkMRMLMarkupsFiducialNode'> ..... location RAS: [-33.143189755529676, 129.66796875, -146.42369353146717] ..... location in the input image set to: [366 319 75] time:1561083131.56 Processing started Defaults paths: VisSimTools folder: /Users/fikrimp/VisSimTools Output folder : /Users/fikrimp/VisSimTools/outputs elastix binaries are found in /Applications/Slicer.app/Contents/Extensions-28257/SlicerElastix/lib/Slicer-4.10/elastix Cochlea Extension is selected sha256computedCheckSum: 5b94b2afd1c7a04a87cad4a443b1facd865e32d78624a7e4878d54732c8b3ce2 Models or contents are wrong, trying to download ... Downloading VisSim Tools ... Downloading VisSimTools others ... Extracting to user home done! 0 <type 'vtkSlicerMarkupsModuleMRMLPython.vtkMRMLMarkupsFiducialNode'> =================== Cropping ===================== ================= Begin cropping ... ===================== location: [366,319,75] cropping length: [ 10 , 10 , 10 ] [ 10 , 10 , 10 ] [ 0.125, 0.125 , 0.125 ] [366,319,75] location: [366.0, 319.0, 75.0] cropping length: [10.0, 10.0, 10.0] Cropping with [352, 305, 63] and [132, 179, 163]. cropped: /Users/fikrimp/VisSimTools/2 InnerEarUHR 0.4 U75u_Crop.nrrd iso cropped: /Users/fikrimp/VisSimTools/2 InnerEarUHR 0.4 U75u_CropIso.nrrd /Applications/Slicer.app/Contents/lib/Slicer-4.10/cli-modules/ResampleScalarVolume.exe darwin Executing ... /Applications/Slicer.app/Contents/lib/Slicer-4.10/cli-modules/ResampleScalarVolume.exe -i linear -s [0.125,0.125,0.125] /Users/fikrimp/VisSimTools/2 InnerEarUHR 0.4 U75u_Crop.nrrd /Users/fikrimp/VisSimTools/2 InnerEarUHR 0.4 U75u_CropIso.nrrd Cropping and resampling are done !!! Cropped image is saved in : [/Users/fikrimp/VisSimTools/2 InnerEarUHR 0.4 U75u_Crop.nrrd] Cropping is done !!! **** Register model to cropped input image ** **** Compute the Transform ** darwin elastix is running in Mac :( !!! ['/Applications/Slicer.app/Contents/Extensions-28257/SlicerElastix/lib/Slicer-4.10/elastix', '-f', '/Users/fikrimp/VisSimTools/2', 'InnerEarUHR', '0.4', 'U75u_Crop.nrrd', '-m', '/Users/fikrimp/VisSimTools/models/modelCochlea/MdlDvLc.nrrd', '-out', '/Users/fikrimp/VisSimTools/outputs', '-p', '/Users/fikrimp/VisSimTools/pars/parCochSeg.txt'] 0 done !!! Traceback (most recent call last): File "/Applications/Slicer.app/Contents/Extensions-28257/SlicerCochlea/lib/Slicer-4.10/qt-scripted-modules/CochleaSeg.py", line 255, in onApplyBtnClick self.logic.run( self.inputSelectorCoBx.currentNode(),self.logic.inputFiducialNode, self.vsc.vtVars['cochleaSide'] ) File "/Applications/Slicer.app/Contents/Extensions-28257/SlicerCochlea/lib/Slicer-4.10/qt-scripted-modules/CochleaSeg.py", line 341, in run copyfile(resTransPathOld, resTransPath) File "/Applications/Slicer.app/Contents/lib/Python/lib/python2.7/shutil.py", line 82, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: '/Users/fikrimp/VisSimTools/outputs/TransformParameters.0.txt'

idhamari commented 5 years ago

if the test works, then probably there is a problem with your image filename or path. Please make sure that the filename and the path do not have spaces or special characters e.g. change your image file name to img.nrrd.

idhamari commented 5 years ago

Shall I close this issue? or do you still have problems?

fikrimirza commented 5 years ago

Thx now its working

can i use your module to detect location of electrode in cochlea? would you kindly help me how can i do this evaluation

Thx

On 22 Jun 2019, at 00.21, idhamari notifications@github.com wrote:

Shall I close this issue? or do you still have problems?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MedicalImageAnalysisTutorials/SlicerCochlea/issues/19?email_source=notifications&email_token=AJAMUDECCA76DMJQKFRYBEDP3UEZRA5CNFSM4HZDQQM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYJCAOI#issuecomment-504504377, or mute the thread https://github.com/notifications/unsubscribe-auth/AJAMUDHKHFN44R4AQUYGN2LP3UEZRANCNFSM4HZDQQMQ.

idhamari commented 5 years ago

Thanks for the feedback. If you need help for other stuff, I suggest you post in Slicer forum. I think you may use segmentation editor effects in Slicer and some thresholding as the implant has high-intensity values.

This issue is now closed.