[ome-devel] Setting Pixels

Chris Allan callan at blackcat.ca
Mon May 11 11:49:19 BST 2009


On Mon, 2009-05-11 at 11:36 +0200, Bernhard Holländer wrote:
> Hi Chris!

Hi Bernhard.

> 
> Thanks for your answers.

No problem.

> 
> I have another question:
> 
> My method to save pixels accepts planes rather than 5-d image data.
> When a new plane is added I update the pixels object to reflect that
> change in the channel, timepoint size etc. Unfortunaltely, I have to
> recreate the pixel store after the change, otherwise I get an API
> exception that the (eg. channel) size of the pixel object is to small
> for the actual pixels written (this is from the server log):
> 
> 2009-05-11 10:51:20,014 INFO  [
> ome.services.util.ServiceHandler] (l.Server-6)  Excp:    ome.condition
> s.ApiUsageException: C '1' greater than sizeC '1'.
> 
> That error occurs after
> 1. creating the pixels
> 2. writing the first channel
> 3. updating the pixels object to have two channels
> 4. saving the object
> 5 writing the second channel fails (this call fails)
> 
> To avoid this problem I have to recreate the pixel store after 4.
> 
> My question, is this intentional or could you update the pixelstore
> service to deal with this partial writes?

It's intentional. The design decision was for users to declare the
dimensionality before performing any reads or writes. In fact, what
you're doing is corrupting the pixel buffer that's on disk. There's no
provision to rearrange all the planes when you change the
dimensionality.

Perhaps a silly question: is there some reason why you cannot know the
dimensions of the pixel buffer beforehand?

> 
> Thanks! Bernhard

Ciao.

-Chris



More information about the ome-devel mailing list