{"action":"created","issue":{"url":"https://api.github.com/repos/SimpleITK/SimpleITK/issues/602","repository_url":"https://api.github.com/repos/SimpleITK/SimpleITK","labels_url":"https://api.github.com/repos/SimpleITK/SimpleITK/issues/602/labels{/name}","comments_url":"https://api.github.com/repos/SimpleITK/SimpleITK/issues/602/comments","events_url":"https://api.github.com/repos/SimpleITK/SimpleITK/issues/602/events","html_url":"https://github.com/SimpleITK/SimpleITK/issues/602","id":383754494,"node_id":"MDU6SXNzdWUzODM3NTQ0OTQ=","number":602,"title":"Host without imagej cannot redefine viewers via SITK_SHOW_COMMAND","user":{"login":"richardbeare","id":780449,"node_id":"MDQ6VXNlcjc4MDQ0OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/780449?v=4","gravatar_id":"","url":"https://api.github.com/users/richardbeare","html_url":"https://github.com/richardbeare","followers_url":"https://api.github.com/users/richardbeare/followers","following_url":"https://api.github.com/users/richardbeare/following{/other_user}","gists_url":"https://api.github.com/users/richardbeare/gists{/gist_id}","starred_url":"https://api.github.com/users/richardbeare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardbeare/subscriptions","organizations_url":"https://api.github.com/users/richardbeare/orgs","repos_url":"https://api.github.com/users/richardbeare/repos","events_url":"https://api.github.com/users/richardbeare/events{/privacy}","received_events_url":"https://api.github.com/users/richardbeare/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dave3d","id":611581,"node_id":"MDQ6VXNlcjYxMTU4MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/611581?v=4","gravatar_id":"","url":"https://api.github.com/users/dave3d","html_url":"https://github.com/dave3d","followers_url":"https://api.github.com/users/dave3d/followers","following_url":"https://api.github.com/users/dave3d/following{/other_user}","gists_url":"https://api.github.com/users/dave3d/gists{/gist_id}","starred_url":"https://api.github.com/users/dave3d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dave3d/subscriptions","organizations_url":"https://api.github.com/users/dave3d/orgs","repos_url":"https://api.github.com/users/dave3d/repos","events_url":"https://api.github.com/users/dave3d/events{/privacy}","received_events_url":"https://api.github.com/users/dave3d/received_events","type":"User","site_admin":false},"assignees":[{"login":"dave3d","id":611581,"node_id":"MDQ6VXNlcjYxMTU4MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/611581?v=4","gravatar_id":"","url":"https://api.github.com/users/dave3d","html_url":"https://github.com/dave3d","followers_url":"https://api.github.com/users/dave3d/followers","following_url":"https://api.github.com/users/dave3d/following{/other_user}","gists_url":"https://api.github.com/users/dave3d/gists{/gist_id}","starred_url":"https://api.github.com/users/dave3d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dave3d/subscriptions","organizations_url":"https://api.github.com/users/dave3d/orgs","repos_url":"https://api.github.com/users/dave3d/repos","events_url":"https://api.github.com/users/dave3d/events{/privacy}","received_events_url":"https://api.github.com/users/dave3d/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-11-23T09:37:01Z","updated_at":"2018-11-29T14:57:24Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"The SITK_SHOW_COMMAND allows redefinition of the viewer used by _Show_. However, _Show_ searches for imagej before doing anything else  https://github.com/SimpleITK/SimpleITK/blob/a4eba04b0380c3f76386d635a4c7defe92b2bb61/Code/IO/src/sitkShow.cxx#L616\r\n\r\n_FindImageJ_ issues an exception if it can't find imagej:  https://github.com/SimpleITK/SimpleITK/blob/a4eba04b0380c3f76386d635a4c7defe92b2bb61/Code/IO/src/sitkShow.cxx#L495\r\n\r\nThus, if there's no imagej on a host, supplying an environment variable doesn't help because the exception bypasses the environment variable code.\r\n\r\n```r\r\nlibrary(SimpleITK)\r\nm <- ReadImage(\"/usr/share/fsl/data/standard/MNI152_T1_1mm_brain.nii.gz\")\r\nShow(m)\r\nError in f(...) : Exception in SITK - check warnings\r\nIn addition: Warning message:\r\nIn f(...) :\r\n  Exception thrown in SimpleITK Show: /home/richardb/Projects/ITK4/SimpleITK/Code/IO/src/sitkShow.cxx:495:\r\nsitk::ERROR: No appropriate executable found.\r\n\r\n```\r\n\r\n```bash\r\nmkdir /tmp/bin\r\n# pretend imagej is installed\r\ntouch /tmp/bin/imagej\r\nexport PATH=${PATH}:/tmp/bin\r\nexport SITK_SHOW_COMMAND=$(which itksnap)\r\n```\r\n```r\r\nlibrary(SimpleITK)\r\nm <- ReadImage(\"/usr/share/fsl/data/standard/MNI152_T1_1mm_brain.nii.gz\")\r\nShow(m)\r\n# Success\r\n```\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/SimpleITK/SimpleITK/issues/comments/442863214","html_url":"https://github.com/SimpleITK/SimpleITK/issues/602#issuecomment-442863214","issue_url":"https://api.github.com/repos/SimpleITK/SimpleITK/issues/602","id":442863214,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0Mjg2MzIxNA==","user":{"login":"blowekamp","id":321061,"node_id":"MDQ6VXNlcjMyMTA2MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/321061?v=4","gravatar_id":"","url":"https://api.github.com/users/blowekamp","html_url":"https://github.com/blowekamp","followers_url":"https://api.github.com/users/blowekamp/followers","following_url":"https://api.github.com/users/blowekamp/following{/other_user}","gists_url":"https://api.github.com/users/blowekamp/gists{/gist_id}","starred_url":"https://api.github.com/users/blowekamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blowekamp/subscriptions","organizations_url":"https://api.github.com/users/blowekamp/orgs","repos_url":"https://api.github.com/users/blowekamp/repos","events_url":"https://api.github.com/users/blowekamp/events{/privacy}","received_events_url":"https://api.github.com/users/blowekamp/received_events","type":"User","site_admin":false},"created_at":"2018-11-29T14:57:24Z","updated_at":"2018-11-29T14:57:24Z","author_association":"MEMBER","body":"@Dave You can reference an issue in a pull request and indicates that it \"fixed issues ###\" and GitHub will automatically link and close the issue when merged. Here is the docs:\r\nhttps://help.github.com/articles/closing-issues-using-keywords/"}}
{"actor":{"display_login":"blowekamp"}}