https://github.com/bonsai-rx/ximea
A Bonsai library for interfacing with XIMEA cameras using the xiAPI
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
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
Metadata Files
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
- Website: bonsai-rx.org
- Repositories: 13
- Profile: https://github.com/bonsai-rx
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
Issues and Pull Requests
Last synced: about 1 year ago
Dependencies
- 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
- Bonsai.Core 2.8.1
- OpenCV.Net 3.4.2