[ome-users] how to store image analysis results

De Groot, Ari [PRDBE Extern] ADGROOT at its.jnj.com
Thu Dec 11 15:16:04 GMT 2008


Chris

Thanks for the pointer. I can now import the file. 
I found two errors:

--1--
When I place the file in the root dir c:\image.tif 
then the following error is thrown:
16:08:08,864 ERROR [omero.demo.MiasResultImageImport] java.lang.NullPointerException
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:77)
	at com.jnj.omero.demo.MiasResultImageImport.main(MiasResultImageImport.java:37)

After placing the file in a sub directory, the error disappaers...
So c:\subdir\image.tif  does work!

--2--
The following two lines produce errors
  Integer emWave = store.getPixels(series).getChannel(channel).getLogicalChannel().getEmissionWave().intValue();
   Integer exWave = store.getPixels(series).getChannel(channel).getLogicalChannel().getExcitationWave().intValue();                                
 
I haven't looked into them yet... but just commenting them out works for now.

Many thanks.

--Ari


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


For reference:

http://svn.openmicroscopy.org.uk/svn/omero/trunk/components/tools/ 
OmeroImporter/src/ome/formats/test/TestEngine.java

Looking at your block of code though there doesn't appear to be  
anything amiss, it's standard OMERO.importer boilerplate. Which  
version of Bio-Formats is this?

Ciao.

-Chris

On 11 Dec 2008, at 09:21, josh.moore at gmx.de wrote:

>
> 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.
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users





More information about the ome-users mailing list