This is a one minute example showing basic reconstruction using a single sensor in C#. It uses defaults everywhere and omits error handling.
using System;
using System.Runtime.InteropServices;
enum reme_sensor_image_t {
};
{
public static void Main()
{
reme_context_create(ref ctx);
reme_context_compile(ctx);
reme_volume_create(ctx, ref v);
reme_sensor_create(ctx, "openni;mskinect;file", true, ref s);
reme_sensor_open(ctx, s);
reme_sensor_set_default_position(ctx, s);
reme_viewer_create_image(ctx, "This is ReconstructMeSDK", ref viewer);
reme_image_create(ctx, ref img_aux);
reme_image_create(ctx, ref img_vol);
reme_viewer_add_image(ctx, viewer, img_aux);
reme_viewer_add_image(ctx, viewer, img_vol);
while (reme_sensor_grab(ctx, s) == 0) {
reme_sensor_prepare_images(ctx, s);
if (reme_sensor_track_position(ctx, s) == 0)
{
reme_sensor_update_volume(ctx, s);
}
reme_sensor_get_image(ctx, s, reme_sensor_image_t.REME_IMAGE_AUX, img_aux);
reme_sensor_get_image(ctx, s, reme_sensor_image_t.REME_IMAGE_VOLUME, img_vol);
reme_viewer_update(ctx, viewer);
}
reme_context_destroy(ref ctx);
}
const string REME_SDK_DLL = "LibReconstructMeSDK.dll";
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention = CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
[DllImport(REME_SDK_DLL, CallingConvention=CallingConvention.Cdecl)]
}