Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rotational_mintracc crashes if run without a mask #43

Open
gdevenyi opened this issue Jan 9, 2019 · 9 comments
Open

rotational_mintracc crashes if run without a mask #43

gdevenyi opened this issue Jan 9, 2019 · 9 comments

Comments

@gdevenyi
Copy link

gdevenyi commented Jan 9, 2019

rotational_minctracc.py -t /dev/shm/ -w 0.448,0.448,0.448 -s 0.224 -g 0.56 -r 50 -i 10 --simplex 1.12 embryo_mia_24122018_processed/img_28nov18.10.sept2014_dist_corr_preproc/tmp/img_28nov18.10.sept2014_dist_corr_preproc_fwhm0.28_blur.mnc embryo_mia_24122018_reg_target_resampled/tmp/E18.0_39micron_resampled_fwhm0.28_blur.mnc embryo_mia_24122018_processed/img_28nov18.10.sept2014_dist_corr_preproc/transforms/img_28nov18.10.sept2014_dist_corr_preproc_lsq6.xfm /dev/null
[autocrop] [gumeli@cicws37:/data/chamal/projects/elisa/embryo_mia/derivatives] [2019-01-03 15:43:35] /opt/quarantine/minc-toolkit/1.9.16/install/bin/mincresample embryo_mia_24122018_processed/img_28nov18.10.sept2014_dist_corr_preproc/tmp/img_28nov18.10.sept2014_dist_corr_preproc_fwhm0.28_blur.mnc //dev/shm//rot_23164/rot_0..mnc -start -7.8373 -7.44048 -12.3214 -step 0.224 0.224 0.224 -nelements 58 64 113
Transforming slices:.................................................................................................................Done
[autocrop] [gumeli@cicws37:/data/chamal/projects/elisa/embryo_mia/derivatives] [2019-01-03 15:43:40] /opt/quarantine/minc-toolkit/1.9.16/install/bin/mincresample embryo_mia_24122018_reg_target_resampled/tmp/E18.0_39micron_resampled_fwhm0.28_blur.mnc //dev/shm//rot_23164/rot_1.mnc -start -1.2 -2.4 -2.28 -step 0.224 0.224 0.224 -nelements 60 83 109
Transforming slices:.............................................................................................................Done
TMP: /dev/shm/
RANGE: 50 INTERVAL: 10
Traceback (most recent call last):
  File "/opt/quarantine/minc-stuffs/0.1.24^minc-toolkit-1.9.16/install/bin/rotational_minctracc.py", line 4, in <module>
    __import__('pkg_resources').run_script('python-stuffs==0.1.24', 'rotational_minctracc.py')
  File "/opt/quarantine/anaconda/5.1.0-python3/install/lib/python3.6/site-packages/pkg_resources/__init__.py", line 750, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/opt/quarantine/anaconda/5.1.0-python3/install/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1534, in run_script
    exec(script_code, namespace, namespace)
  File "/opt/quarantine/minc-stuffs/0.1.24^minc-toolkit-1.9.16/install/lib/python3.6/site-packages/python_stuffs-0.1.24-py3.6.egg/EGG-INFO/scripts/rotational_minctracc.py", line 422, in <module>
  File "/opt/quarantine/minc-stuffs/0.1.24^minc-toolkit-1.9.16/install/lib/python3.6/site-packages/python_stuffs-0.1.24-py3.6.egg/EGG-INFO/scripts/rotational_minctracc.py", line 413, in main
  File "/opt/quarantine/minc-stuffs/0.1.24^minc-toolkit-1.9.16/install/lib/python3.6/site-packages/python_stuffs-0.1.24-py3.6.egg/EGG-INFO/scripts/rotational_minctracc.py", line 181, in loop_rotations
AttributeError: 'NoneType' object has no attribute 'data'
@bcdarwin bcdarwin changed the title rotational_mintracc errors out in loop_rotations rotational_mintracc crashes if run without a mask Jan 10, 2019
@gdevenyi
Copy link
Author

gdevenyi commented Apr 8, 2019

Any update on this? Running into this problem again.

@bcdarwin
Copy link
Member

bcdarwin commented Apr 8, 2019

Did you try the most recent develop (72b88fa)?

@gdevenyi
Copy link
Author

gdevenyi commented Apr 8, 2019

I haven't tried any development versions and I wasn't aware that any changes had been made there.... I really wish github would give me some way to follow all commits on a project...

@bcdarwin
Copy link
Member

bcdarwin commented Apr 8, 2019

I'm sorry, I should have tagged the issue in the commit so you'd get a notification.

@gdevenyi
Copy link
Author

git-develop instead:

Traceback (most recent call last):
  File "/opt/quarantine/minc-stuffs/git-develop/install/bin/rotational_minctracc.py", line 4, in <module>
    __import__('pkg_resources').run_script('python-stuffs==0.1.23', 'rotational_minctracc.py')
  File "/opt/quarantine/anaconda/5.1.0-python3/install/lib/python3.6/site-packages/pkg_resources/__init__.py", line 750, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/opt/quarantine/anaconda/5.1.0-python3/install/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1534, in run_script
    exec(script_code, namespace, namespace)
  File "/opt/quarantine/minc-stuffs/git-develop/install/lib/python3.6/site-packages/python_stuffs-0.1.23-py3.6.egg/EGG-INFO/scripts/rotational_minctracc.py", line 436, in <module>
  File "/opt/quarantine/minc-stuffs/git-develop/install/lib/python3.6/site-packages/python_stuffs-0.1.23-py3.6.egg/EGG-INFO/scripts/rotational_minctracc.py", line 427, in main
  File "/opt/quarantine/minc-stuffs/git-develop/install/lib/python3.6/site-packages/python_stuffs-0.1.23-py3.6.egg/EGG-INFO/scripts/rotational_minctracc.py", line 274, in loop_rotations
TypeError: minctracc() got an unexpected keyword argument 'source_mask'

@gdevenyi
Copy link
Author

Added:

(f" -source_mask {source_mask} " if source_mask else "") +

and testing

@gdevenyi
Copy link
Author

oh and

minctracc(source, target, target_mask, source_mask, stepsize, wtranslations, simplex, use_lsq12_for_alignment):

@bcdarwin
Copy link
Member

Thanks. At some point when I was making these changes I realized @nzxwang was making a branch to generalize a bunch of settings including adding LSQ3/.../12 but I never got around to porting to that branch and for some reason left the changes in an inconsistent state.

However, I have neural brain segmentation now so hopefully brute-force rotations will soon be a thing of the past :)

@gdevenyi
Copy link
Author

Yup that fixes it up.

I can't help but feel that all my drilling down into bending registration tools to my will is going to be completely supplanted when I'm replaced by a neural network...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants