Page 2 of 2

Re: Access original metadata from script

PostPosted: Thu Nov 24, 2011 3:23 pm
by wmoore
Hi,

It seems like this is a Bio-Formats issue. I have created a ticket here: https://trac.openmicroscopy.org.uk/ome/ticket/7319

Thanks for your feedback.

Will.

Re: Access original metadata from script

PostPosted: Thu Dec 08, 2011 2:26 pm
by ppouchin
I managed to write something that changes the acquisition date so that it matches the "last modified" date from the original file stat. I'm not sure I should do it this way (accessing a hidden attribute of an object is not very pretty), but here is how I do:
Code: Select all
date = os.stat(filename)[ST_MTIME]
img._obj.acquisitionDate._val = long(1000*date)

("filename" is based on the name of the image, and I look in the DropBox if it exists.)

I'm also able to change the "creationEvent" time of images but it seems I can't modify the "updateEvent" time which is used to define the "import date". With something like :
Code: Select all
img._obj.details.creationEvent.time._val = long(1000*date)


Now people importing their data for the first time get hundred of images in one week, which is not very practical to sort them out. That's why I'd like to let them "adjust" the import date.

An other way to display the data as they'd like to see it would be to modify Insight's code. I remember patching it myself once last year but I can't build it anymore on Windows (using build.py)... I get some error with a library, but I don't know how to correct it for omero to work correctly. I will try it on linux though.
Code: Select all
org.apache.fop.tools.anttasks.Fop cannot be found

Re: Access original metadata from script

PostPosted: Thu Dec 08, 2011 7:37 pm
by jburel
Good evening.
Adjusting the acquisition date is a functionality that we should probably allow from the client (to fix manually a bug while reading metadata)
Do you have other metadata that you think we should allow to modify from the client e.g. channel's name.

We will also need to add the option to sort by import, acquisition date.

If you want to build insight, directly from the command line using ant, you will need to make sure fop.jar is in the classpath or you could comment line 152 in lib.xml
<!--taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop" /--> The task Fop has several dependencies (listed in the file)
Fop was used to generate pdf documents

The easiest option might be to use Eclipse. Create a new insight project, add the jar from lib and from build/tools to the classpath
Select Window>Show View> Ant
Add the ant target.
Select the build target you wish.

Regards
Jmarie