[ome-devel] Python Script: Copy all metadata from one Image to another.

Chris Allan callan at lifesci.dundee.ac.uk
Tue Apr 12 13:07:42 BST 2011


Hi Jerome,

Sorry for the much delayed reply. The answer is that you probably want to create that image using the IPixels service rather than using "script_utils." There are three methods on IPixels for performing tasks such as these:

 * copyAndResizePixels()
 * copyAndResizeImage()
 * createImage()  -- (Which "createNewImage()" in script_utils.py uses under the hood)

You should be able to create a largely copied metadata set by using either of the copyAndResize methods with just the original sizes.

Documentation for the IPixels service is available here:

 * http://hudson.openmicroscopy.org.uk/job/OMERO-trunk/javadoc/slice2html/omero/api/IPixels.html#IPixels
 * http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/IPixels.html

-Chris

On 3 Mar 2011, at 12:15, Jerome Avondo wrote:

> 
> Hi all,
> 
> Just a quick question. 
> 
> I am writting some python scripts to do some image processing, 3D filters... 
> 
> The result of these scripts will be a new image, but I would like this image to inherit all the metadata from the parent.
> Currently I am using:
> 
> scriptUtil.createNewImage(...)
> 
> to create a new image, but of course no metadata is inherited.
> 
> So my question, are there any methods to say either create a duplicate of the parent image and/or just set the metadata from parent to child?
> 
> Thanks,
> 
> Jerome.
> 
> PS: Your forums are down btw.
> 
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel



More information about the ome-devel mailing list