[ome-devel] Import date of an image

José Salavert Torres josator at ebi.ac.uk
Thu May 14 11:39:10 BST 2015


Thank you for the information.


> On 14 May 2015, at 11:33, William Moore <will at lifesci.dundee.ac.uk> wrote:
> 
> Hi José,
> 
> If you're using the Python Blitz Gateway 'conn' you can do:
> 
>>>> for i in conn.getObjects("Image", [4420,4421]):
>>>> 	print i.creationEventDate()
> 	  
>>>> 2014-09-03 12:46:40
>>>> 2014-09-03 12:46:55
> 
> Cheers,
> 
>   Will.
> 
> 
> On 14 May 2015, at 11:21, Josh Moore <josh at glencoesoftware.com> wrote:
> 
>> Hi José,
>> 
>> the field you are looking for is Image.Details.CreationEvent.time and
>> in the database this is `time` on the `event` table which is linked by
>> its primary key to the `creation_id` column of `image`. You can play
>> with this on the command line via:
>> 
>> $ omero hql -q "select i.id, i.name, i.details.creationEvent.time from Image i"
>> #  | Col1 | Col2      | Col3
>> ----+------+-----------+--------------------------
>> 0  | 1585 | testImage | Tue Oct  1 11:12:04 2013
>> 1  | 1677 | testImage | Tue Oct  1 11:14:11 2013
>> 2  | 1678 | testImage | Tue Oct  1 11:14:12 2013
>> 
>> For example,
>> 
>> $ omero hql -q "select count(i) from Image i where
>> i.details.creationEvent.time < '2015-01-01'" --style=plain | cut -f2
>> -d,
>> 197
>> 
>> Cheers,
>> ~Josh.
>> 
>> On Thu, May 14, 2015 at 12:00 PM, José Salavert Torres
>> <josator at ebi.ac.uk> wrote:
>>> Dear all,
>>> 
>>> When I  explore images in the insight browser I am able to see the import date of the image by looking at the general tab in the image detail’s section.
>>> 
>>> I need to code an script to delete old versions of the images with the same name. I was doing this by deleting the images with the lowest id. But i would prefer to use the import date for this.
>>> 
>>> I am trying to find in the omero database the table with this date, but I am unable to find it.
>>> Can you please point me to the correct table and sequence of foreign keys from the image table?
>>> 
>>> Thank you in advance,
>>> José
>>> _______________________________________________
>>> ome-devel mailing list
>>> ome-devel at lists.openmicroscopy.org.uk
>>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>> _______________________________________________
>> ome-devel mailing list
>> ome-devel at lists.openmicroscopy.org.uk
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
> 
> _______________________________________________
> 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