hsieh42 / exit_process

Exit process and project boards for tracking issues.
0 stars 0 forks source link

Document lung related codes and create a github repo #7

Closed hsieh42 closed 5 years ago

hsieh42 commented 6 years ago
hsieh42 commented 5 years ago

@bhaghighi could you please take a look at the segmentation codes? Would love to hear some feedback. Let's talk about it together.

bhaghighi commented 5 years ago

@hsieh42 Thanks Micheal. I am reading it and will talk about it this week.

bhaghighi commented 5 years ago

@hsieh42 I am trying to reproduce the results. It would be great if we could go through one subjects together? thanks

hsieh42 commented 5 years ago

Data is in /cbica/projects/ILD_Lung/Pipelines/renamedNifti which is a symbolic link to /cbica/projects/ILD_Lung/Data/renamedNifti_linear/.

Try the case 7: /cbica/projects/ILD_Lung/Pipelines/renamedNifti/7-20090512 first. Runtime is quick so feel free to run them all.

hsieh42 commented 5 years ago

pyLIBRA_lung branch created: https://github.com/CBICA/pyLIBRA/tree/pyLIBRA_lung. Not tested yet.

hsieh42 commented 5 years ago

I have submitted an elog to request a private repo in CBICA for all ILD related codes and scripts.

bhaghighi commented 5 years ago

@hsieh42 I activated the virtual environment with edm and then run python setup.py install after running _>>> from libra import libralung i am getting this: /cbica/home/haghighb/.local/share/canopy/edm/envs/venv3/lib/python2.7/site-packages/scikit_learn-0.18.1-py2.7-linux-x86_64.egg/sklearn/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20. "This module will be removed in 0.20.", DeprecationWarning)

bhaghighi commented 5 years ago

getting this :) do I need to use sendSegmentLung_pylibra.sh instead of segment_lung.py? it can not be run locally? (venv3)[haghighb@crete Scripts]$ python segment_lung.py -i /cbica/projects/ILD_Lung/Pipelines/renamedNifti/7-20090512 -o /cbica/projects/ILD_Lung/Pipelines/LungSegmentation_21/7-20090512_Seg_BH **Command segment_lung.py Arguments Namespace(bins=100, inputfile='/cbica/projects/ILD_Lung/Pipelines/renamedNifti/7-20090512', lower=None, output='/cbica/projects/ILD_Lung/Pipelines/LungSegmentation_21/7-20090512_Seg_BH', upper=None) Executing on crete.uphs.upenn.edu Executing at 2018-09-27 Thu 14:09:41 Executing in /cbica/projects/ILD_Lung/Scripts /cbica/home/haghighb/.local/share/canopy/edm/envs/venv3/lib/python2.7/site-packages/scikit_learn-0.18.1-py2.7-linux-x86_64.egg/sklearn/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20. "This module will be removed in 0.20.", DeprecationWarning)

Segmenting... Traceback (most recent call last): File "segment_lung.py", line 253, in sys.exit(main()) File "segment_lung.py", line 215, in main mask, kmeans, cutoff_low, cutoff_high = segment_lung_kmean(img, lower = args.lower, upper = args.upper, bins = args.bins) UnboundLocalError: local variable 'img' referenced before assignment**

bhaghighi commented 5 years ago

the previous fixed but this time: python segment_lung.py -i /cbica/projects/ILD_Lung/Data/Nifti/10-20091117/10-20091117_EXPIRATION1.0B41f-9.nii.gz -o /cbica/projects/ILD_Lung/Pipelines/LungSegmentation_21/7-20090512_Seg_BH Command segment_lung.py

_File "/cbica/home/haghighb/.local/share/canopy/edm/envs/venv3/lib/python2.7/site-packages/matplotlib-2.2.3-py2.7-linux-x86_64.egg/matplotlib/init.py", line 1867, in inner return func(ax, *args, **kwargs) File "/cbica/home/haghighb/.local/share/canopy/edm/envs/venv3/lib/python2.7/site-packages/matplotlib-2.2.3-py2.7-linux-x86_64.egg/matplotlib/axes/_axes.py", line 5501, in imshow im.set_data(X) File "/cbica/home/haghighb/.local/share/canopy/edm/envs/venv3/lib/python2.7/site-packages/matplotlib-2.2.3-py2.7-linux-x86_64.egg/matplotlib/image.py", line 654, in setdata raise TypeError("Invalid dimensions for image data") TypeError: Invalid dimensions for image data

hsieh42 commented 5 years ago

Do not use segment_lung.py as it is a prototype code for 2D slices only.

Please open a new issue in https://github.com/CBICA/pyLIBRA should there be any segmentation related bugs and issues.