Home

Awesome

C# API for OMX

Development Environment

It will be easiest if you have Visual Studio 2012 Express for Windows Desktop installed. The solution file provided was created using this version of Visual Studio. It might work with different versions but it hasn't been tested yet.

Where is the C# library for working with OMX?

The dll is located here

HDFDotNet

Before you begin any work, it is recommended that you look through the hdf5 site to familiarize yourself with how Dot Net works with HDF5. Warning! The HDFDotNet library and documentation is not well-maintained and so you will find some special puzzles when working with it.

The CSharpOMX.dll code references the HDF5DotNet dlls, which, for 64bit Windows .Net Framework Version 4, are in the hdf5dotnet folder.

Example Test Code

This test code uses the CSharpOMX dll and HDFDotNet dll libraries to create and read omx files. It can read in the R and Python example files referenced in their user's guides. As you can see, the paths are hard-coded so you will to set them for your environment.

Classes & Methods

The two classes are: OMXFile.cs and OMXMatrix.cs.

OMXFile An OMXFile has the following member variables:

The constructor for the class looks like this OmxFile(string filePath, long[] shape)

The following properties can be accessed outside the class

The following methods are available for use with an OMXFile.

OMXMatrix An OMXMatrix has the following member variables:

The constructors for the class look like this:

Use the first one if you are creating a matrix for the first time because in that case you need to send in its type.

The following property can be accessed outside the class.

The following methods are available for use with an OMXMatrix.