Hello @jburel , @dominikl
I have an issue with the copyWellSamples() method in the Image.java class.
When I run this command
List<WellSample> wellSampleList = user_client.getGateway().getFacility(BrowseFacility.class).getImage(ctx, id).asImage().copyWellSamples()
with id the id of an image coming from a plate, I get the following error and I don't understand why because the image seems to be fully loaded as I use the BrowseFacility class.
omero.UnloadedCollectionException: Error updating collection:wellSamplesSeq
Collection is currently null. This can be seen
by testing "wellSamplesSeqLoaded". This implies
that this collection was unloaded. Please refresh this object
in order to update this collection.
at omero.model.ImageI.throwNullCollectionException(ImageI.java:40)
at omero.model.ImageI.copyWellSamples(ImageI.java:698)
at omero.model.Image.copyWellSamples(Image.java:240)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at New_.run(New_.groovy:52)
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:331)
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:161)
at org.scijava.plugins.scripting.groovy.GroovyScriptLanguage$1.eval(GroovyScriptLanguage.java:97)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at org.scijava.script.ScriptModule.run(ScriptModule.java:173)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
I tried to get the wellSamples using a query and it works correctly.
List<IObject> wellSamplesObjects = user_client.getGateway()..getQueryService(ctx).findAllByQuery("select ws from WellSample ws where image=" + id, null);
List<WellSample> wellSampleList = wellSamplesObjects.stream()
.map(WellSample.class::cast)
.collect(Collectors.toList())
Do you have an idea of what's going wrong ?
I added @ppouchin to this issue because ImageWrapper.getWells(client), and similar methods for plates and screens, are calling the same copyWellSamples() method
Thanks,
Rémy.
Hello @jburel , @dominikl
I have an issue with the
copyWellSamples()method in theImage.javaclass.When I run this command
with
idthe id of an image coming from a plate, I get the following error and I don't understand why because the image seems to be fully loaded as I use theBrowseFacilityclass.I tried to get the wellSamples using a query and it works correctly.
Do you have an idea of what's going wrong ?
I added @ppouchin to this issue because
ImageWrapper.getWells(client), and similar methods for plates and screens, are calling the samecopyWellSamples()methodThanks,
Rémy.