Example #1
0
/** Return the handle to a collection of identified markers by the most recent processed frame. ?? */
int Markers::identifiedMarkers(MCamera *cam)
{
	int identifiedHandle = Collection_New();
	int camHandle;
	if (cam == NULL) {
		camHandle = NULL;
	} else {
		camHandle = cam->Handle();
	}
	Markers_IdentifiedMarkersGet(camHandle, identifiedHandle );
	return identifiedHandle;
}
Example #2
0
std::vector<mitk::claronToolHandle> mitk::ClaronInterface::GetAllActiveTools()
{
  //Set returnvalue
  std::vector<claronToolHandle> returnValue;

  //Here, MTC internally maintains the measurement results.
  //Those results can be accessed until the next call to Markers_ProcessFrame, when they
  //are updated to reflect the next frame's content.
  //First, we will obtain the collection of the markers that were identified.
  MTC( Markers_IdentifiedMarkersGet(NULL, IdentifiedMarkers) );

  //Now we iterate on the identified markers and add them to the returnvalue
  for (int j=1; j<=Collection_Count(IdentifiedMarkers); j++)
  {
    // Obtain the marker's handle, and use it to obtain the pose in the current camera's space
    // using our Xform3D object, PoseXf.
    mtHandle Marker = Collection_Int(IdentifiedMarkers, j);
    returnValue.push_back(Marker);
  }
  return returnValue;
}