[ome-devel] [ome-files] Getting Exceptions When Opening Files for setId(...)

Dennis Ai dennis.ai at sri.com
Mon Jan 29 17:09:50 GMT 2018


Hi Roger,
 
1.       I tried to set my environment variable OME_FILES_HOME to the root directory where I extracted the binary distribution. (“C:\Users\...\Documents\Visual Studio 2015\Projects\OMEFilesSharp\External\ome-files”).  This gives me the same exception as before.
2.       I was able to inspect the what() of the std::runtime_error and the message says, “Could not determine runtime path for “ome-xml-schema” directory”.
3.       Seeing this, I tried to set the environment variable OME_XML_SCHEMADIR to “C:\Users\...\Documents\Visual Studio 2015\Projects\OMEFilesSharp\External\ome-files\share\xml\ome” and that resulted in the same exception as before.
4.       I confirmed that I have the same files in the directories you described below.
 
% cd ome-files-bundle-0.5.0-VC14-x64-Release-b25
% ls share
doc  man  ome  pkgconfig  xml  xsl
% ls share/xml/ome
2003-FC   2003-IR2  2003-RC1  2003-RC3  2003-RC5  2007-06  2008-04
2009-09  2010-06  2012-06  2015-01  catalog.xml
2003-IR1  2003-IR3  2003-RC2  2003-RC4  2003-RC6  2008-02  2008-09
2010-04  2011-06  2013-06  2016-06  external
% ls share/xml/ome/2016-06
catalog.xml  ome.xsd
% ls share/xsl/ome
2003-FC-to-2007-06.xsl  2008-02-to-2008-09.xsl  2010-06-to-2003-FC.xsl
2011-06-to-2012-06.xsl  2013-06-to-2015-01.xsl  units-conversion.xsl
2003-FC-to-2008-09.xsl  2008-09-to-2009-09.xsl  2010-06-to-2008-02.xsl
2012-06-to-2011-06.xsl  2015-01-to-2013-06.xsl
2007-06-to-2008-02.xsl  2009-09-to-2010-04.xsl  2010-06-to-2011-06.xsl
2012-06-to-2013-06.xsl  2015-01-to-2016-06.xsl
2007-06-to-2008-09.xsl  2010-04-to-2010-06.xsl  2011-06-to-2010-06.xsl
2013-06-to-2012-06.xsl  2016-06-to-2015-01.xsl
 
Any idea why I might still be running into issues?  I’m happy to send you the source code if it might help figure out what’s going on.
 
Thanks,
Dennis
 
On 25/01/18 23:56, Dennis Ai wrote:
> Hi Roger,
> 
> Sorry for not responding earlier, I guess I wasn’t subscribed to the
> list so I didn’t see your response in my email.  Had to find it manually
> via the archive list.  Following your advice, I tried:
> 
> To give some context, my goal is to create a C# wrapper around ome-files
> (or at least certain functionality in ome-files), so that I can
> read/write OME-TIFF files.  What I have done so far is:
> 
> 1.Download OME Files 0.5.0
> <https://www.openmicroscopy.org/ome-files/downloads/> (Windows VC14
> 64-bit, self-contained super build) into a directory
> “C:\Users\...\Documents\Visual Studio 2015\Projects\OMEFilesSharp\External”.
> 
> 2.Created a C++ DLL project in Visual Studio 2015 (hence the
> “OMEFiles.dll”) that effectively creates a wrapper around OMETIFFReader
> and OMETIFFWriter, and VariantPixelBuffer to get basic functionality
> working.  I followed the instructions here
> <https://www.openmicroscopy.org/community/viewtopic.php?f=13 <https://www.openmicroscopy.org/community/viewtopic.php?f=13&t=8233&p=18005&hilit=ome+files+tutorial#p18005> &t=8233&p=18005&hilit=ome+files+tutorial#p18005>
> for getting the project to build properly.
> 
> 3.The reason that the C++ DLL is necessary is that I needed to make the
> API compatible with C types, so that I could use CppSharp
> <https://github.com/mono/CppSharp> to generate automatic C# bindings.
 
Ah, that makes sense, thanks for the explanation.
 
> I tried to following your instructions, and did the following:
> 
> 4.Adding ome::files::register_module_paths(); before I called setId(…).
> This resulted in the same stack trace and exceptions that I relayed before.
> 
> 5.I set the OME_FILES_HOME environment variable to the root directory
> (“C:\Users\...\Documents\Visual Studio
> 2015\Projects\OMEFilesSharp\External\ome-files”), and to the binary
> sub-directory (““C:\Users\...\Documents\Visual Studio
> 2015\Projects\OMEFilesSharp\External\ome-files\bin”), along with adding
> the ome::files::register_module_paths() call, but that resulted in the
> same stack trace and exceptions that I relayed before too.
> 
> 6.I did a search for “ome-model.xsl” and ““ome-model.xsd” and found
> neither in the downloaded super build.
 
It's in the ome-model component, and is in the provided binary builds:
 
In the ome-model sources:
 
% ls specification/src/main/resources/released-schema
2003-FC   2003-IR2  2003-RC1  2003-RC3  2003-RC5  2007-06  2008-04
2009-09  2010-06  2012-06  2015-01  2018-01-DEV  external
2003-IR1  2003-IR3  2003-RC2  2003-RC4  2003-RC6  2008-02  2008-09
2010-04  2011-06  2013-06  2016-06  catalog.xml
% ls specification/src/main/resources/released-schema/2016-06
catalog.xml  ome.xsd
% ls specification/src/main/resources/transforms
2003-FC-to-2007-06.xsl  2008-09-to-2009-09.xsl  2010-06-to-2011-06.xsl
2013-06-to-2012-06.xsl  2016-06-to-2018-01-DEV.xsl   ome-transforms.xml
2003-FC-to-2008-09.xsl  2009-09-to-2010-04.xsl  2011-06-to-2010-06.xsl
2013-06-to-2015-01.xsl  2016-06-to-2018-01-DEV.xsl~  units-conversion.xsl
2007-06-to-2008-02.xsl  2010-04-to-2010-06.xsl  2011-06-to-2012-06.xsl
2015-01-to-2013-06.xsl  2018-01-DEV-to-2016-06.xsl   util
2007-06-to-2008-09.xsl  2010-06-to-2003-FC.xsl  2012-06-to-2011-06.xsl
2015-01-to-2016-06.xsl  2018-01-DEV-to-2016-06.xsl~
2008-02-to-2008-09.xsl  2010-06-to-2008-02.xsl  2012-06-to-2013-06.xsl
2016-06-to-2015-01.xsl  internal
 
In a binary build:
 
% cd ome-files-bundle-0.5.0-VC14-x64-Release-b25
% ls share
doc  man  ome  pkgconfig  xml  xsl
% ls share/xml/ome
2003-FC   2003-IR2  2003-RC1  2003-RC3  2003-RC5  2007-06  2008-04
2009-09  2010-06  2012-06  2015-01  catalog.xml
2003-IR1  2003-IR3  2003-RC2  2003-RC4  2003-RC6  2008-02  2008-09
2010-04  2011-06  2013-06  2016-06  external
% ls share/xml/ome/2016-06
catalog.xml  ome.xsd
% ls share/xsl/ome
2003-FC-to-2007-06.xsl  2008-02-to-2008-09.xsl  2010-06-to-2003-FC.xsl
2011-06-to-2012-06.xsl  2013-06-to-2015-01.xsl  units-conversion.xsl
2003-FC-to-2008-09.xsl  2008-09-to-2009-09.xsl  2010-06-to-2008-02.xsl
2012-06-to-2011-06.xsl  2015-01-to-2013-06.xsl
2007-06-to-2008-02.xsl  2009-09-to-2010-04.xsl  2010-06-to-2011-06.xsl
2012-06-to-2013-06.xsl  2015-01-to-2016-06.xsl
2007-06-to-2008-09.xsl  2010-04-to-2010-06.xsl  2011-06-to-2010-06.xsl
2013-06-to-2012-06.xsl  2016-06-to-2015-01.xsl
 
> To be honest, C++ is not my strong suit.  If there’s a better way to get
> set up in Windows, I’m all ears.
 
I think you are likely missing the datafiles, and it should be fairly
simple to resolve once it's clear what's missing and why.
 
When building from source with the superbuild, I think if you were to
run the superbuild "install" target, or look at the contents of the
"stage" directory, you'll get a full set of the binaries, libraries,
headers and datafiles needed for a functional installation.
 
Since you started with the binary build, the above files should all be
present, as shown above, unless they were omitted for some reason from
your "External" directory.  Setting OME_FILES_HOME to the root where you
unpacked the binary distribution zip should be sufficient to make them
available.
 
 
Regards,
Roger
 
--
Dr Roger Leigh -- Open Microscopy Environment
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK   Tel: (01382) 386364
 
The University of Dundee is a registered Scottish Charity, No: SC015096

 

 

Dennis Ai

Senior Strategic Advisor, SRI Biosciences

SRI International

333 Ravenswood Ave

Menlo Park, CA 94025

(847) 440-4765

 

SRI Biosciences™

A DIVISION OF SRI INTERNATIONAL

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20180129/10ddc24a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5112 bytes
Desc: not available
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20180129/10ddc24a/attachment.p7s>


More information about the ome-devel mailing list