39 std::ostream* out = GetOutputStream();
42 out =
new std::ofstream(GetOutputLocation().c_str());
44 mitk::NavigationDataSet::ConstPointer data =
dynamic_cast<const NavigationDataSet*
> (this->GetInput());
47 mitk::LocaleSwitch localeSwitch(
"C");
50 unsigned int numberOfTools = data->GetNumberOfTools();
51 for (
unsigned int index = 0; index < numberOfTools; index++){ *out <<
"TimeStamp_Tool" << index <<
52 ";Valid_Tool" << index <<
56 ";QX_Tool" << index <<
57 ";QY_Tool" << index <<
58 ";QZ_Tool" << index <<
59 ";QR_Tool" << index <<
";";}
65 MITK_INFO <<
"Number of timesteps: " << data->Size();
66 for (
unsigned int i=0; i<data->Size(); i++)
68 std::vector< mitk::NavigationData::Pointer > NavigationDatasOfCurrentStep = data->GetTimeStep(i);
69 for (
unsigned int toolIndex = 0; toolIndex < numberOfTools; toolIndex++)
71 mitk::NavigationData::Pointer nd = NavigationDatasOfCurrentStep.at(toolIndex);
72 *out << nd->GetIGTTimeStamp() <<
";"
73 << nd->IsDataValid() <<
";"
74 << nd->GetPosition()[0] <<
";"
75 << nd->GetPosition()[1] <<
";"
76 << nd->GetPosition()[2] <<
";"
77 << nd->GetOrientation()[0] <<
";"
78 << nd->GetOrientation()[1] <<
";"
79 << nd->GetOrientation()[2] <<
";"
80 << nd->GetOrientation()[3] <<
";";