[ome-users] how to store image analysis results

De Groot, Ari [PRDBE Extern] ADGROOT at its.jnj.com
Thu Dec 11 09:39:33 GMT 2008


Josh

Loading the images using Importer works without problems. 
We now try to find out how we can upload the images in our own batch job. 
May be this could be done in some other way? 
During this batch import job we will add annotations coming from a results file. 

I tried to distill the relavant import code form the Importer code, but have
not succeeded yet. I get the following exception:

java.lang.NullPointerException
	at java.io.File.<init>(Unknown Source)
	at loci.formats.Location.<init>(Location.java:61)
	at loci.formats.Location.getParentFile(Location.java:228)
	at loci.formats.in.FV1000Reader.isThisType(FV1000Reader.java:109)
	at loci.formats.FormatReader.isThisType(FormatReader.java:641)
	at loci.formats.ImageReader.getReader(ImageReader.java:130)
	at loci.formats.ImageReader.setId(ImageReader.java:573)
	at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:75)
	at loci.formats.ChannelFiller.setId(ChannelFiller.java:186)
	at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:75)
	at loci.formats.ChannelSeparator.setId(ChannelSeparator.java:61)
	at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:75)
	at ome.formats.importer.ImportLibrary.open(ImportLibrary.java:199)
	at ome.formats.importer.ImportLibrary.importImage(ImportLibrary.java:389)
	at com.jnj.omero.demo.MiasResultImageImport.run(MiasResultImageImport.java:62)
	at com.jnj.omero.demo.MiasResultImageImport.main(MiasResultImageImport.java:31)
10:28:29,673 ERROR [omero.demo.MiasResultImageImport] java.lang.NullPointerException

I guess this should go the developer list...
Thanks for the input.

Ari de Groot


-----Original Message-----
From: josh.moore at gmx.de [mailto:josh.moore at gmx.de]
Sent: Thursday, 11 December 2008 10:21
To: De Groot, Ari [PRDBE Extern]
Cc: ome-users at lists.openmicroscopy.org.uk
Subject: Re: [ome-users] how to store image analysis results



Ari-

Passing this on to the list, since you'll get the most help that
way. Both for the simple import and general tips for working with HCS
data.

First though: What kind of problems are you having with the code
below?  I.e. did the TIFF import fail? If so, have you also tried
directly from the importer. If that doesn't work, can you tell us a
little bit more about your files?

Best wishes,
~Josh.


De Groot, Ari [PRDBE Extern] writes:
 > Josh
 > 
 > Thanx for the quick and very usefull reply. I've spend some time 
 > going through the wiki but did not find the page you pointed me to.
 >
 > We're doing a proof of principle to see if OMERO could be used to support 
 > some aspects of our HCS work. 
 > At this moment we want to import a set of processed images along with the 
 > results (the annotations). These are all plate based sceenings so were 
 > building a simple plate viewer to display results as a heatmap. 
 > When you click on a well, the images should show up. 
 > 
 > So, importing the results file now works nicely. 
 > Next step is to import the images (IDL tif). This works using the importer. 
 > Now I'm looking to add this to mmy batch program. Could you point me out 
 > what the basics are to import a tif file? 
 > 
 > This is where I am right now.
 > 
 > 	protected void run(String[] args) {
 > 
 > 		try {
 > 			log.info("Logging in to server");
 > 			store = new OMEROMetadataStore("ari", "ari", "localhost", "1099");
 > 			reader = new OMEROWrapper();
 > 			library = new ImportLibrary(store, reader);
 > 
 > 		} catch (Exception e1) {
 > 			log.error(e1);
 > 		}
 > 
 > 
 > 		log.info("creating objects");
 > 		Project project = new Project();
 > 		project.setName("hello world project");
 > 
 > 		Dataset dataset = new Dataset();
 > 		dataset.setName("tif import test");
 > 
 > 		project.linkDataset(dataset);
 > 
 > 		library.setDataset(dataset);
 > 
 > 		log.info("objects created");
 > 
 > 		try {
 > 			File file = new File("c:\\mias-image.tif");
 > 			library.importImage(file, 0, 0, 0, "test image", true);
 > 		} catch (Exception e) {
 > 			e.printStackTrace();
 > 			log.error(e);
 > 		}
 > 
 > 		store.close();
 > 
 > 		log.info("Done");
 > 
 > 	}
 > 
 > Kind regards
 > 
 > Ari de Groot
 > 
 > 
 > 
 > -----Original Message-----
 > From: josh.moore at gmx.de [mailto:josh.moore at gmx.de]
 > Sent: Wednesday, 10 December 2008 14:15
 > To: De Groot, Ari [PRDBE Extern]
 > Cc: ome-users at lists.openmicroscopy.org.uk
 > Subject: [ome-users] how to store image analysis results
 > 
 > 
 > 
 > Hi Ari,
 > 
 > De Groot, Ari [PRDBE Extern] writes:
 >  > I have some questions related to storing image analysis results.
 >  > 
 >  > --1--
 >  > In the database and model.xml I find items like CellArea, CellPosition etc.
 >  > but I can't find any use of them in the Java code. 
 >  > I assumed results could be mapped to datasets...
 >  > How can I find out how these results can be used in Java code? Is there example code?
 >  > Are there client applications using these results? I don't see them in insight.
 > 
 > No, they aren't used. The types defined in:
 > 
 > https://trac.openmicroscopy.org.uk/omero/browser/trunk/components/model/resources/mappings/results.ome.xml
 > 
 > were an experiment, have never been put into production, and will
 > almost certainly be removed for the Beta4 release.
 > 
 > Could you let us know exactly what it is that you would like to do?
 > 
 >  > --2--
 >  > A related question is how to add new result types? 
 >  > Let's say we would like to add a result type called NeuriteLength. 
 >  > How is this accomplished? 
 >  > 
 >  > Would it be possible to have a more flexible way of handling result types or features? 
 >  > Creating a new table for each result type is not my idea of flexibility.
 >  > 
 >  > Am I missing something? 
 > 
 > It sounds like what you need are attachments, also called structured
 > annotations. You might take a look at the wiki page:
 > 
 > https://trac.openmicroscopy.org.uk/omero/wiki/StructuredAnnotations
 > 
 > with which it's possible to structure your own types as primitives
 > (floats, ints, etc), as a String (including XML), or as any binary
 > blob. The floats and ints won't scale very well, so depending on what
 > you are shooting for, a coarser-grained result type would be
 > advisable.
 > 
 >  > Kind regards
 >  > Ari de Groot
 > 
 > Let us know what we can do to help.
 > ~Josh.




More information about the ome-users mailing list