We're Hiring!

.pdf files?

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

.pdf files?

Postby jwarren » Tue Nov 18, 2014 1:00 pm

Hi

I see that bioformats doesn't support .pdf files (which is understandable as its a document format not an image format). I also heard that some people are developing omero to be used as a document management system? So I was wondering if there is a way for omero to support .pdf files or at least just allow us to upload and download them from the server somehow and avoid validity checks etc? Also we would probably want to do the same with .mov files?

Thanks

Jonathan.
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: .pdf files?

Postby wmoore » Wed Nov 19, 2014 10:36 am

I don't know of any specific work to build a "document management system" on OMERO, but you can certainly attach documents to Projects, Datasets, Images etc. Just browse to the P/D/I and in the right panel click the [+] beside Attachments then choose to upload a local document. Since PDFs are text files, they will be indexed by the search engine (Lucene) and searchable in the clients.

E.g. if you go to the public OMERO instance at https://cisbic.bioinformatics.ic.ac.uk/ ... nt/search/
And search for E.g.
monoexponential

In group: public
Owned by: All Members

You should find a Project that has an attached PDF containing this text, and the PDF can be downloaded by showing the Project in the right panel, then clicking on the PDF under 'Attachments' (see screenshot).

Since .mov files are supported by BioFormats, they would just be imported as regular movies (without the sound I'm afraid). Or you could attach them in the same way as PDFs.

Will.
Attachments
Screen Shot 2014-11-19 at 10.23.23.png
Screen Shot 2014-11-19 at 10.23.23.png (119.28 KiB) Viewed 3732 times
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: .pdf files?

Postby jwarren » Wed Nov 19, 2014 11:07 am

wmoore wrote:I don't know of any specific work to build a "document management system" on OMERO, but you can certainly attach documents to Projects, Datasets, Images etc. Just browse to the P/D/I and in the right panel click the [+] beside Attachments then choose to upload a local document. Since PDFs are text files, they will be indexed by the search engine (Lucene) and searchable in the clients.

Great! Is there an example of uploading using python somewhere? As this is what I need to do.
wmoore wrote:
You should find a Project that has an attached PDF containing this text, and the PDF can be downloaded by showing the Project in the right panel, then clicking on the PDF under 'Attachments' (see screenshot).

Since .mov files are supported by BioFormats, they would just be imported as regular movies (without the sound I'm afraid). Or you could attach them in the same way as PDFs.

Interesting that .mov files are supported - I did see it listed - but when I tried uploading using the Insight client it said "file not valid" ? Even though the movie file played fine on my mac.
I also need to upload using python - so please let me know if there is anything special I need to do for this?
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: .pdf files?

Postby wmoore » Thu Nov 20, 2014 3:14 pm

Hi,

You can upload a file quite simply using the Python Blitz Gateway:

Code: Select all
fileAnn = conn.createFileAnnfromLocalFile("path/to/my.pdf", mimetype="application/pdf")


This will create an OriginalFile and a FileAnnotation. You get returned the FileAnnotationWrapper, which you can then use to attach to a Project, Dataset, Image etc.

Code: Select all
dataset = conn.getObject("Dataset", datasetId)
dataset.linkAnnotation(fileAnn)


I know that there can be a problem importing .mov files since this requires a "Quicktime for Java" decoder to be installed. However, if that was the problem, you should see a clear error message in the importer.
Maybe you could check the Insight log which should be somewhere like.

Code: Select all
/Users/wmoore/omero/log/omeroinsight.log


If there's nothing obvious there, maybe you could send us a copy of the file (or a similar one with the same problem) and we can have a look. I think you'll have to zip it and upload it at http://qa.openmicroscopy.org.uk/qa/uplo ... _format=37 (since we didn't add .mov to the formats list there yet).

Will.
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: .pdf files?

Postby jwarren » Thu Dec 04, 2014 3:50 pm

Thanks for the reply I'll try the code out.

FYI I guess this uses sharepoint for the management and omero for the view http://panabula.zegami.com/
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: .pdf files?

Postby jrswedlow » Wed Dec 10, 2014 9:08 am

Hi,

The demo you see at the URL is for a new visualisation tool called Zegami and has been developed by the Coritsu team. It is not directly using OMERO, but rather images exported from an OMERO system. We’ve spoken with the Coritsu team about directly integrating with OMERO in the future and if you’d like to know more about this, you can contact them directly at info@coritsu.com or visit them http://www.coritsu.com.

Cheers,

Jason
User avatar
jrswedlow
Team Member
 
Posts: 38
Joined: Mon May 25, 2009 9:28 pm


Return to Developer Discussion

Who is online

Users browsing this forum: Google [Bot] and 0 guests