Is it possible to add a new plane to an existing image that was imported into a screen?
or
Is it possible to change the pixels content of a plane image that was imported into a screen?
I have a screen-plate-wells with images. Each image has 4 channels. I wrote some analysis that reads the 4 channels of each image and creates a new plane that I would like to add to that image.
I cannot find how to do it. The code I wrote in Java is:
- Code: Select all
ImageData image = browse.getImage(ctx, imageId);
byteBuf = generate_new_plane_as_buffer(image);
store = gateway.createPixelsStore(ctx);
pixelsId = image.getDefaultPixels().getId();
store.setPixelsId(pixelsId, true);
store.setPlane(byteBuf, 0, 4, 0);
store.save();
I get exception:
serverExceptionClass = "ome.conditions.InternalException"
message = " Wrapped Exception: (java.lang.UnsupportedOperationException):
Cannot write to repository"
I also tried: store.setPlane(byteBuf, 0, 0, 0); // thinking I might be able to overwrite the content of an existing plane.. same error.
Any help/ ideas?
Thanks