IDSImaging.Peak.API
1.13.0.1
Prefix Reserved
dotnet add package IDSImaging.Peak.API --version 1.13.0.1
NuGet\Install-Package IDSImaging.Peak.API -Version 1.13.0.1
<PackageReference Include="IDSImaging.Peak.API" Version="1.13.0.1" />
<PackageVersion Include="IDSImaging.Peak.API" Version="1.13.0.1" />
<PackageReference Include="IDSImaging.Peak.API" />
paket add IDSImaging.Peak.API --version 1.13.0.1
#r "nuget: IDSImaging.Peak.API, 1.13.0.1"
#:package IDSImaging.Peak.API@1.13.0.1
#addin nuget:?package=IDSImaging.Peak.API&version=1.13.0.1
#tool nuget:?package=IDSImaging.Peak.API&version=1.13.0.1
IDS peak genericAPI for .NET
The IDS peak genericAPI provides a high-level interface for communicating with IDS industrial cameras. It simplifies access to underlying GenAPI and GenTL libraries, handling camera parameterization and high-performance image data transfer.
Installation
Install the package via NuGet:
dotnet add package IDSImaging.Peak.API
Requirements
- IDS peak runtime: Ensure the IDS peak software is installed on the host system to provide the necessary transport layer drivers.
Quickstart
using System;
using IDSImaging.Peak.API;
using IDSImaging.Peak.API.Core;
using IDSImaging.Peak.API.Core.Nodes;
// Initialize library
Library.Initialize();
Console.WriteLine($"API Version {Library.Version().ToString()}");
// Create a DeviceManager object
var deviceManager = DeviceManager.Instance();
try
{
// Add event handler for the device found event
deviceManager.DeviceFoundEvent += (object o, DeviceDescriptor newDev)
=> Console.WriteLine("DeviceFound: {0} (from Sender: {1})", newDev.DisplayName(), o);
// The error callback is a delegate, so for example you can use an anonymous lambda
deviceManager.Update(DeviceManager.UpdatePolicy.ScanEnvironmentForProducerLibraries,
(string msg) => { Console.WriteLine("DeviceManager.Update() Error callback: {0}", msg); });
// Exit program if no device was found
if (deviceManager.Devices().Count <= 0)
{
Console.WriteLine("No Devices");
return;
}
// Open the first device
using var device = deviceManager.Devices()[0].OpenDevice(DeviceAccessType.Control);
// Nodemap for accessing GenICam nodes
using var remoteNodemap = device.RemoteDevice().NodeMaps()[0];
// Load default camera settings
remoteNodemap.FindNode<EnumerationNode>("UserSetSelector").SetCurrentEntry("Default");
remoteNodemap.FindNode<CommandNode>("UserSetLoad").Execute();
remoteNodemap.FindNode<CommandNode>("UserSetLoad").WaitUntilDone();
// Open first data stream
using var dataStream = device.DataStreams()[0].OpenDataStream();
// Buffer size
var payloadSize = remoteNodemap.FindNode<IntegerNode>("PayloadSize").Value();
// Minimum number of required buffers
var minBufferCountRequired = dataStream.NumBuffersAnnouncedMinRequired();
// Allocate buffers and add them to the pool
for (var i = 0; i < minBufferCountRequired; ++i)
{
var buff = dataStream.AllocAndAnnounceBuffer((uint)payloadSize, IntPtr.Zero);
dataStream.QueueBuffer(buff);
}
// Lock writeable nodes during acquisition
remoteNodemap.FindNode<IntegerNode>("TLParamsLocked").SetValue(1);
Console.WriteLine("Starting acquisition...");
dataStream.StartAcquisition();
remoteNodemap.FindNode<CommandNode>("AcquisitionStart").Execute();
remoteNodemap.FindNode<CommandNode>("AcquisitionStart").WaitUntilDone();
Console.WriteLine("Getting 100 images...");
// Process 100 images
for (var i = 0; i < 100; ++i)
{
try
{
// Wait for finished/filled buffer event
using var buffer = dataStream.WaitForFinishedBuffer(1000);
// Convert the buffer to an image using the ids_peak_ipl extension module
// Note: when uncommenting the following line you also need IDSImaging.Peak.IPL.
// using var img = IDSImaging.Peak.API.IPLExtension.BufferToImage(buffer);
// Do something with `img` here ...
// Put the buffer back in the pool, so it can be filled again
// NOTE: If you want to use `img` beyond this point, you have
// to make a copy, since `img` still uses the underlying
// buffer's memory.
dataStream.QueueBuffer(buffer);
}
catch (System.ApplicationException e)
{
Console.WriteLine("Exception: " + e.Message);
}
}
Console.WriteLine("Stopping acquisition...");
remoteNodemap.FindNode<CommandNode>("AcquisitionStop").Execute();
remoteNodemap.FindNode<CommandNode>("AcquisitionStop").WaitUntilDone();
dataStream.StopAcquisition(AcquisitionStopMode.Default);
// In case another thread is waiting on WaitForFinishedBuffer
// you can interrupt it using:
// dataStream.KillWait()
// Remove buffers from any associated queue
dataStream.Flush(DataStreamFlushMode.DiscardAll);
foreach (var buffer in dataStream.AnnouncedBuffers())
{
// Remove buffer from the transport layer
dataStream.RevokeBuffer(buffer);
}
// Unlock writeable nodes again
remoteNodemap.FindNode<IntegerNode>("TLParamsLocked").SetValue(0);
}
catch (System.SystemException e)
{
Console.WriteLine("Exception: " + e.Message);
}
finally
{
Library.Close();
}
Migration guide
Please note the following breaking namespace changes in the NuGet version of the IDSImaging.Peak.API bindings:
| Old | New |
|---|---|
| peak | IDSImaging.Peak.API |
| peak.core | IDSImaging.Peak.API.Core |
| peak.core.file | IDSImaging.Peak.API.Core.File |
| peak.core.nodes | IDSImaging.Peak.API.Core.Nodes |
| peak.ids_peak_ipl_extension | IDSImaging.Peak.API.IPLExtension |
| std | IDSImaging.Peak.API.Std |
The .NET assembly and library names were also updated to reflect this:
| Old | New |
|---|---|
| ids_peak_dotnet.dll | IDSImaging.Peak.API.dll |
| ids_peak_dotnet_interface.dll | IDSImaging.Peak.API.Native.dll (Windows) |
| ids_peak_dotnet_interface.so | libIDSImaging.Peak.API.Native.so (Linux) |
| ids_peak_dotnet_ids_peak_ipl_extension.dll | IDSImaging.Peak.API.IPLExtension.dll |
| ids_peak_dotnet_ids_peak_ipl_extension_interface.dll | IDSImaging.Peak.API.IPLExtension.Native.dll (Windows) |
| ids_peak_dotnet_ids_peak_ipl_extension_interface.so | libIDSImaging.Peak.API.IPLExtension.Native.so (Linux) |
Important notes
- The NuGet package name, DLL name, and root namespace now match.
- Native interop libraries are named *.Native.*.
Documentation
Documentation is available here
Support
For technical support and inquiries, please contact support@ids-imaging.com or visit https://en.ids-imaging.com/support.html.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on IDSImaging.Peak.API:
| Package | Downloads |
|---|---|
|
IDSImaging.Peak.AFL
A library for auto features on the computer (host-based). With the IDS peak AFL, you can e.g. use the autofocus feature of compatible cameras. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.13.0.1 | 1,349 | 1/21/2026 |