20 "MITK NavigationDataSet Reader (CSV)")
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] <<
";";
DataCollection - Class to facilitate loading/accessing structured data.
NavigationDataSetWriterCSV()
Convenience class to temporarily change the current locale.
~NavigationDataSetWriterCSV() override
const BaseData * GetInput() const override
Get the input data set via SetInput().
mitk::NavigationDataSetWriterCSV * Clone() const override
Data structure which stores streams of mitk::NavigationData for multiple tools.
std::ostream * GetOutputStream() const override
Get the output stream.
us::ServiceRegistration< IFileWriter > RegisterService(us::ModuleContext *context=us::GetModuleContext())
std::string GetOutputLocation() const override
Get the current output location.
void Write() override
Write the base data to the specified location or output stream.
Base class for writing mitk::BaseData objects to files or streams.