Using Parameter Presets

With Parameter Presets the NxLib provides a simple way of pre-defining and loading parameter sets. The following example shows how to get a preset with a known name and how to apply the result to a camera.

Code Examples

	NxLibItem root;                              // References the tree's root item at path "/"
	NxLibItem camera = root[itmCameras]["1234"]; // References the camera's item at path "/Cameras/BySerialNo/1234"

	NxLibCommand open(cmdOpen);
	open.parameters()[itmCameras] = camera[itmSerialNumber].asString();
	open.execute();

	// Load a camera parameter preset with a known name
	NxLibCommand getPresets(cmdGetPresets);
	getPresets.parameters()[itmName] = "PatchMatchSingleShotOneIteration";
	getPresets.execute();

	// Apply the preset to the camera
	camera << getPresets.result()[itmPresets][0][itmData];