[ome-devel] Storing raw files

josh.moore at gmx.de josh.moore at gmx.de
Mon Feb 11 10:54:31 GMT 2008


Matthias Dunda writes:
 > how do I store RAW files in OMERO like PDF documents and how do I attach them to a project or dataset?

Storing raw files is as easy as picking (or creating) the appropriate
"Format" via ITypes, creating an "OriginalFile", then uploading the
file via RawFileStore. Roughly:

  Format pdf =
    serviceFactory.getTypesService()
      .getEnumeration(Format.class, "application/pdf");
  OriginalFile file = new OriginalFile();
  file.setFormat(pdf);
  file.setName();
  // etc
  file = serviceFactory.getUpdateService().saveAndReturnObject(file);

  RawFileStore store = serviceFactory.createRawFileStore();
  store.setFileId(file.getId());
  store.write(buffer, position, length);

However, there's no way to link that file to an Image, Dataset,
etc. in Beta2.3

Cheers,
Josh.


 > I think the file annotations do this in TRUNK but is there a way to do it in Beta2.3?
 > 
 > Cheers,
 > Matthias
 > 
 > --
 > Matthias Dunda, Dipl.-Inform.
 > c.a.r.u.s. HMS GmbH
 > Bornbarch 9, D-22848 Norderstedt
 > Fon: +49.(0)40.5 14 35-0
 > Fax: +49.(0)40.5 14 35-11 11
 > 
 > Amtsgericht/Register Court: Kiel, HRB 4587 NO
 > Sitz/Registered Office: Norderstedt
 > Geschäftsführer/Managing Directors: Karl-Heinz Witt, Dr. Matthias Rath
 > 
 > 
 > _______________________________________________
 > 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