https://github.com/bonsai-rx/ximea

A Bonsai library for interfacing with XIMEA cameras using the xiAPI

https://github.com/bonsai-rx/ximea

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.2%) to scientific vocabulary

Keywords

bonsai-rx ximea
Last synced: 11 months ago · JSON representation

Repository

A Bonsai library for interfacing with XIMEA cameras using the xiAPI

Basic Info
  • Host: GitHub
  • Owner: bonsai-rx
  • License: other
  • Language: C#
  • Default Branch: main
  • Size: 9.48 MB
Statistics
  • Stars: 1
  • Watchers: 3
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Topics
bonsai-rx ximea
Created almost 3 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

docs/README.md

Bonsai - XIMEA Library

A Bonsai library for interfacing with XIMEA cameras using the xiAPI.

How to Use

To use Bonsai.Ximea for visual reactive programming, please install this package using the Bonsai package manager.

The package can also be used to create custom operators which can be useful to encapsulate custom initialization logic or to create other reusable components that can be shared with others.

Below we show an example of how to create a custom operator that initializes a XIMEA camera with a specific set of parameters and logs the applied settings to disk. If using this script as an extension, remember to add the Ximea package to your Extensions.cproj file.

```csharp using System; using System.ComponentModel; using xiApi.NET; using xiApi; using System.Collections.Generic; using System.Reactive; using System.IO; using System.Linq;

namespace Bonsai.Ximea { [Description("Configures and initializes a custom instance of a XimeaCapture operator with specific parameters and exports applied settings to a log file.")] public class CustomXimeaCapture : XimeaCapture { public string logFilePath = "log.txt";

    [Description("The name of the output log file.")]
    [Editor("Bonsai.Design.SaveFileNameEditor, Bonsai.Design", DesignTypes.UITypeEditor)]
    public string LogFilePath
    {
        get { return logFilePath; }
        set { logFilePath = value; }
    }

    protected override void Configure(xiCam camera)
    {
        //Set additional parameters
        try
        {
            camera.SetParam(PRM.SHUTTER_TYPE, SHUTTER_TYPE.SHUTTER_GLOBAL);
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
            throw;
        }
        base.Configure(camera);

        //Query and export settings
        ExportSettings(camera, LogFilePath);
    }

    private static void ExportSettings(xiCam camera, string logFilePath)
    {
        var settings = new Dictionary<string, int>
        {
            {"Width", QueryParam(camera, PRM.WIDTH) },
            {"Height", QueryParam(camera, PRM.HEIGHT) },
            {"ShutterType", QueryParam(camera, PRM.SHUTTER_TYPE) },

        };
        File.WriteAllLines(logFilePath,
            settings.Select(x => x.Key + "," + x.Value).ToArray());
    }

    private static int QueryParam(xiCam camera, string prm)
    {
        camera.GetParam(prm, out int val);
        return val;
    }
}

} ```

Additional Documentation

For additional documentation and examples, refer to the official Bonsai documentation.

Feedback & Contributing

Bonsai.Ximea is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository. Bonsai.Ximea integrates and makes use of the XIMEA Application Programming Interface, which is subject to the License For Customer Use of XIMEA Software.

Owner

  • Name: Bonsai
  • Login: bonsai-rx
  • Kind: organization

A visual language for reactive programming

GitHub Events

Total
  • Issue comment event: 3
  • Push event: 4
  • Pull request review event: 1
  • Pull request event: 3
  • Fork event: 1
Last Year
  • Issue comment event: 3
  • Push event: 4
  • Pull request review event: 1
  • Pull request event: 3
  • Fork event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 13
  • Total Committers: 2
  • Avg Commits per committer: 6.5
  • Development Distribution Score (DDS): 0.077
Past Year
  • Commits: 12
  • Committers: 2
  • Avg Commits per committer: 6.0
  • Development Distribution Score (DDS): 0.083
Top Committers
Name Email Commits
glopesdev g****s@n****g 12
brunocruz 7****z 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago


Dependencies

.github/workflows/Bonsai.Ximea.yml actions
  • actions/checkout v4 composite
  • actions/deploy-pages v4 composite
  • actions/download-artifact v4 composite
  • actions/setup-dotnet v4 composite
  • actions/upload-artifact v4 composite
  • actions/upload-pages-artifact v3 composite
  • bonsai-rx/configure-build v1 composite
  • bonsai-rx/setup-bonsai v1 composite
src/Bonsai.Ximea/Bonsai.Ximea.csproj nuget
  • Bonsai.Core 2.8.1
  • OpenCV.Net 3.4.2