{"action":"created","issue":{"url":"https://api.github.com/repos/imagej/imagej-omero/issues/92","repository_url":"https://api.github.com/repos/imagej/imagej-omero","labels_url":"https://api.github.com/repos/imagej/imagej-omero/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/imagej/imagej-omero/issues/92/comments","events_url":"https://api.github.com/repos/imagej/imagej-omero/issues/92/events","html_url":"https://github.com/imagej/imagej-omero/issues/92","id":328204329,"node_id":"MDU6SXNzdWUzMjgyMDQzMjk=","number":92,"title":"Working with cell images from OMERO fails","user":{"login":"ctrueden","id":556626,"node_id":"MDQ6VXNlcjU1NjYyNg==","avatar_url":"https://avatars2.githubusercontent.com/u/556626?v=4","gravatar_id":"","url":"https://api.github.com/users/ctrueden","html_url":"https://github.com/ctrueden","followers_url":"https://api.github.com/users/ctrueden/followers","following_url":"https://api.github.com/users/ctrueden/following{/other_user}","gists_url":"https://api.github.com/users/ctrueden/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrueden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrueden/subscriptions","organizations_url":"https://api.github.com/users/ctrueden/orgs","repos_url":"https://api.github.com/users/ctrueden/repos","events_url":"https://api.github.com/users/ctrueden/events{/privacy}","received_events_url":"https://api.github.com/users/ctrueden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-31T16:11:29Z","updated_at":"2018-05-31T17:20:55Z","closed_at":null,"author_association":"MEMBER","body":"Install the following script into `lib/Fiji.app/scripts/Plugins/Curtis/Frangi_Coolness.py`:\r\n```groovy\r\n#@ OpService ops\r\n#@ Dataset image\r\n#@output Img result\r\nresult = ops.run(\"create.img\", image)\r\nops.filter().frangiVesselness(result, image, [1, 1], 20)\r\n```\r\nThen try running it on an image e.g. with `omero script launch`. The following error occurs:\r\n```\r\nTraceback (most recent call last):\r\n  File \"Plugins/Curtis/Frangi_Vessels.py\", line 4, in <module>\r\nCall setReader(Reader) before invoking create()\r\n\tat io.scif.img.cell.SCIFIOCellImgFactory.create(SCIFIOCellImgFactory.java:366)\r\n\tat io.scif.img.cell.SCIFIOCellImgFactory.create(SCIFIOCellImgFactory.java:92)\r\n\tat net.imagej.DefaultDataset$1.makeImgPlus(DefaultDataset.java:744)\r\n\tat net.imagej.DefaultDataset$1.create(DefaultDataset.java:731)\r\n\tat net.imagej.DefaultDataset$1.create(DefaultDataset.java:720)\r\n\tat net.imglib2.img.ImgFactory.create(ImgFactory.java:168)\r\n\tat net.imagej.ops.create.img.Imgs.create(Imgs.java:64)\r\n\tat net.imagej.ops.create.img.CreateImgFromImg.calculate(CreateImgFromImg.java:56)\r\n\tat net.imagej.ops.create.img.CreateImgFromImg.calculate(CreateImgFromImg.java:49)\r\n\tat net.imagej.ops.special.function.UnaryFunctionOp.run(UnaryFunctionOp.java:74)\r\n\tat net.imagej.ops.special.function.AbstractUnaryFunctionOp.run(AbstractUnaryFunctionOp.java:58)\r\n\tat org.scijava.command.CommandModule.run(CommandModule.java:199)\r\n\tat net.imagej.ops.OpEnvironment.run(OpEnvironment.java:944)\r\n\tat net.imagej.ops.OpEnvironment.run(OpEnvironment.java:135)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\njava.lang.IllegalStateException: java.lang.IllegalStateException: Tried to create a new SCIFIOCellImg without a Reader to use for opening planes.\r\nCall setReader(Reader) before invoking create()\r\n\r\n\tat org.python.core.Py.JavaError(Py.java:552)\r\n\tat org.python.core.Py.JavaError(Py.java:543)\r\n\tat org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190)\r\n\tat org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:206)\r\n\tat org.python.core.PyObject.__call__(PyObject.java:515)\r\n\tat org.python.core.PyObject.__call__(PyObject.java:519)\r\n\tat org.python.core.PyMethod.__call__(PyMethod.java:156)\r\n\tat org.python.pycode._pyx0.f$0(Plugins/Curtis/Frangi_Vessels.py:5)\r\n\tat org.python.pycode._pyx0.call_function(Plugins/Curtis/Frangi_Vessels.py)\r\n\tat org.python.core.PyTableCode.call(PyTableCode.java:171)\r\n\tat org.python.core.PyCode.call(PyCode.java:18)\r\n\tat org.python.core.Py.runCode(Py.java:1614)\r\n\tat org.python.core.__builtin__.eval(__builtin__.java:497)\r\n\tat org.python.core.__builtin__.eval(__builtin__.java:501)\r\n\tat org.python.util.PythonInterpreter.eval(PythonInterpreter.java:259)\r\n\tat org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:57)\r\n\tat org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)\r\n\tat javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)\r\n\tat org.scijava.script.ScriptModule.run(ScriptModule.java:160)\r\n\tat org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)\r\n\tat org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)\r\n\tat org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)\r\n\tat org.scijava.thread.DefaultThreadService$3.call(DefaultThreadService.java:238)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.lang.IllegalStateException: Tried to create a new SCIFIOCellImg without a Reader to use for opening planes.\r\nCall setReader(Reader) before invoking create()\r\n\tat io.scif.img.cell.SCIFIOCellImgFactory.create(SCIFIOCellImgFactory.java:366)\r\n\tat io.scif.img.cell.SCIFIOCellImgFactory.create(SCIFIOCellImgFactory.java:92)\r\n\tat net.imagej.DefaultDataset$1.makeImgPlus(DefaultDataset.java:744)\r\n\tat net.imagej.DefaultDataset$1.create(DefaultDataset.java:731)\r\n\tat net.imagej.DefaultDataset$1.create(DefaultDataset.java:720)\r\n\tat net.imglib2.img.ImgFactory.create(ImgFactory.java:168)\r\n\tat net.imagej.ops.create.img.Imgs.create(Imgs.java:64)\r\n\tat net.imagej.ops.create.img.CreateImgFromImg.calculate(CreateImgFromImg.java:56)\r\n\tat net.imagej.ops.create.img.CreateImgFromImg.calculate(CreateImgFromImg.java:49)\r\n\tat net.imagej.ops.special.function.UnaryFunctionOp.run(UnaryFunctionOp.java:74)\r\n\tat net.imagej.ops.special.function.AbstractUnaryFunctionOp.run(AbstractUnaryFunctionOp.java:58)\r\n\tat org.scijava.command.CommandModule.run(CommandModule.java:199)\r\n\tat net.imagej.ops.OpEnvironment.run(OpEnvironment.java:944)\r\n\tat net.imagej.ops.OpEnvironment.run(OpEnvironment.java:135)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:188)\r\n\t... 24 more\r\n```\r\nSeems that cell images are not playing nicely somehow."},"comment":{"url":"https://api.github.com/repos/imagej/imagej-omero/issues/comments/393608000","html_url":"https://github.com/imagej/imagej-omero/issues/92#issuecomment-393608000","issue_url":"https://api.github.com/repos/imagej/imagej-omero/issues/92","id":393608000,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzYwODAwMA==","user":{"login":"ctrueden","id":556626,"node_id":"MDQ6VXNlcjU1NjYyNg==","avatar_url":"https://avatars2.githubusercontent.com/u/556626?v=4","gravatar_id":"","url":"https://api.github.com/users/ctrueden","html_url":"https://github.com/ctrueden","followers_url":"https://api.github.com/users/ctrueden/followers","following_url":"https://api.github.com/users/ctrueden/following{/other_user}","gists_url":"https://api.github.com/users/ctrueden/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrueden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrueden/subscriptions","organizations_url":"https://api.github.com/users/ctrueden/orgs","repos_url":"https://api.github.com/users/ctrueden/repos","events_url":"https://api.github.com/users/ctrueden/events{/privacy}","received_events_url":"https://api.github.com/users/ctrueden/received_events","type":"User","site_admin":false},"created_at":"2018-05-31T17:20:55Z","updated_at":"2018-05-31T17:20:55Z","author_association":"MEMBER","body":"The above exception is caused by the `ops.run(\"create.img\", image)` call. Because `SCIFIOCellImg.imgFactory().imgFactory(type)` produces a new image factory that is uninitialized. It can be worked around (see next example).\r\n\r\nUnfortunately, there are still problems. Consider the following, even simpler script:\r\n```groovy\r\n#@ OpService ops\r\n#@ Dataset image\r\n#@output Img result\r\n\r\noutputType = image.firstElement()\r\nimgFactory = net.imglib2.util.Util.getSuitableImgFactory(image, outputType)\r\nresult = ops.run(\"create.img\", image, outputType, imgFactory)\r\n\r\nops.image().invert(result, image)\r\n```\r\n\r\nIt produces the following error:\r\n```\r\njava.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException\r\n\tat net.imagej.ops.thread.chunker.DefaultChunker.run(DefaultChunker.java:103)\r\n\tat org.scijava.command.CommandModule.run(CommandModule.java:199)\r\n\tat net.imagej.ops.OpEnvironment.run(OpEnvironment.java:944)\r\n\tat net.imagej.ops.OpEnvironment.run(OpEnvironment.java:156)\r\n\tat net.imagej.ops.map.MapUnaryComputers$IIToRAIParallel.compute(MapUnaryComputers.java:159)\r\n\tat net.imagej.ops.map.MapUnaryComputers$IIToRAIParallel.compute(MapUnaryComputers.java:145)\r\n\tat net.imagej.ops.image.invert.InvertII.compute(InvertII.java:87)\r\n\tat net.imagej.ops.image.invert.InvertII.compute(InvertII.java:47)\r\n\tat net.imagej.ops.special.computer.UnaryComputerOp.run(UnaryComputerOp.java:77)\r\n\tat net.imagej.ops.special.computer.UnaryComputerOp.run(UnaryComputerOp.java:92)\r\n\tat org.scijava.command.CommandModule.run(CommandModule.java:199)\r\n\tat net.imagej.ops.OpEnvironment.run(OpEnvironment.java:944)\r\n\tat net.imagej.ops.OpEnvironment.run(OpEnvironment.java:156)\r\n\tat net.imagej.ops.image.ImageNamespace.invert(ImageNamespace.java:263)\r\n\tat net.imagej.ops.image.ImageNamespace$invert.call(Unknown Source)\r\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)\r\n\tat Script1.run(Script1.groovy:9)\r\n\tat org.scijava.plugins.scripting.groovy.GroovyScriptEngine.eval(GroovyScriptEngine.java:303)\r\n\tat org.scijava.plugins.scripting.groovy.GroovyScriptEngine.eval(GroovyScriptEngine.java:122)\r\n\tat javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)\r\n\tat org.scijava.script.ScriptModule.run(ScriptModule.java:160)\r\n\tat org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)\r\n\tat org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)\r\n\tat org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)\r\n\tat org.scijava.thread.DefaultThreadService$3.call(DefaultThreadService.java:238)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException\r\n\tat java.util.concurrent.FutureTask.report(FutureTask.java:122)\r\n\tat java.util.concurrent.FutureTask.get(FutureTask.java:192)\r\n\tat net.imagej.ops.thread.chunker.DefaultChunker.run(DefaultChunker.java:97)\r\n\t... 30 more\r\nCaused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException\r\n\tat net.imglib2.cache.util.CacheAsUncheckedCacheAdapter.get(CacheAsUncheckedCacheAdapter.java:32)\r\n\tat net.imglib2.img.cell.LazyCellImg$LazyCells.get(LazyCellImg.java:104)\r\n\tat net.imglib2.img.list.AbstractLongListImg$LongListCursor.get(AbstractLongListImg.java:98)\r\n\tat net.imglib2.img.cell.CellLocalizingCursor.getCell(CellLocalizingCursor.java:105)\r\n\tat net.imglib2.img.cell.CellLocalizingCursor.jumpFwd(CellLocalizingCursor.java:141)\r\n\tat net.imagej.ops.map.Maps.map(Maps.java:310)\r\n\tat net.imagej.ops.map.MapUnaryComputers$IIToRAIParallel$1.execute(MapUnaryComputers.java:164)\r\n\tat net.imagej.ops.thread.chunker.DefaultChunker$2.run(DefaultChunker.java:87)\r\n\tat org.scijava.thread.DefaultThreadService$2.run(DefaultThreadService.java:221)\r\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\r\n\t... 4 more\r\nCaused by: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException\r\n\tat net.imglib2.cache.ref.SoftRefLoaderRemoverCache.get(SoftRefLoaderRemoverCache.java:168)\r\n\tat net.imglib2.cache.util.LoaderRemoverCacheAsLoaderCacheAdapter.get(LoaderRemoverCacheAsLoaderCacheAdapter.java:37)\r\n\tat net.imglib2.cache.util.LoaderCacheAsCacheAdapter.get(LoaderCacheAsCacheAdapter.java:30)\r\n\tat net.imglib2.cache.util.CacheAsUncheckedCacheAdapter.get(CacheAsUncheckedCacheAdapter.java:28)\r\n\t... 13 more\r\nCaused by: java.lang.ArrayIndexOutOfBoundsException\r\n\tat java.lang.System.arraycopy(Native Method)\r\n\tat io.scif.util.ImageTools.splitChannels(ImageTools.java:237)\r\n\tat io.scif.filters.PlaneSeparator.openPlane(PlaneSeparator.java:321)\r\n\tat io.scif.filters.PlaneSeparator.openPlane(PlaneSeparator.java:207)\r\n\tat io.scif.filters.AbstractReaderFilter.openPlane(AbstractReaderFilter.java:224)\r\n\tat io.scif.filters.AbstractReaderFilter.openPlane(AbstractReaderFilter.java:190)\r\n\tat io.scif.img.cell.loaders.AbstractArrayLoader.read(AbstractArrayLoader.java:289)\r\n\tat io.scif.img.cell.loaders.AbstractArrayLoader.read(AbstractArrayLoader.java:271)\r\n\tat io.scif.img.cell.loaders.AbstractArrayLoader.read(AbstractArrayLoader.java:253)\r\n\tat io.scif.img.cell.loaders.AbstractArrayLoader.loadArray(AbstractArrayLoader.java:232)\r\n\tat io.scif.img.cell.SCIFIOCellImgFactory$SCIFIOCellLoader.load(SCIFIOCellImgFactory.java:204)\r\n\tat net.imglib2.cache.img.LoadedCellCacheLoader.get(LoadedCellCacheLoader.java:91)\r\n\tat net.imglib2.cache.img.LoadedCellCacheLoader.get(LoadedCellCacheLoader.java:51)\r\n\tat net.imglib2.cache.img.DiskCellCache.get(DiskCellCache.java:104)\r\n\tat net.imglib2.cache.img.DiskCellCache.get(DiskCellCache.java:43)\r\n\tat net.imglib2.cache.IoSync.get(IoSync.java:174)\r\n\tat net.imglib2.cache.ref.SoftRefLoaderRemoverCache.get(SoftRefLoaderRemoverCache.java:158)\r\n\t... 16 more\r\n```\r\n\r\nMaybe an issue with concurrent access to cell images? @tpietzsch Should we expect concurrent access to such cell images to be possible? Or is it single-threaded only?"}}
{"actor":{"display_login":"ctrueden"}}