24 "MITK NavigationDataSet Reader (CSV)")
43 std::ostream* out = GetOutputStream();
46 out =
new std::ofstream(GetOutputLocation().c_str());
54 unsigned int numberOfTools = data->GetNumberOfTools();
55 for (
unsigned int index = 0; index < numberOfTools; index++){ *out <<
"TimeStamp_Tool" << index <<
56 ";Valid_Tool" << index <<
60 ";QX_Tool" << index <<
61 ";QY_Tool" << index <<
62 ";QZ_Tool" << index <<
63 ";QR_Tool" << index <<
";";}
69 MITK_INFO <<
"Number of timesteps: " << data->Size();
70 for (
unsigned int i=0; i<data->Size(); i++)
72 std::vector< mitk::NavigationData::Pointer > NavigationDatasOfCurrentStep = data->GetTimeStep(i);
73 for (
unsigned int toolIndex = 0; toolIndex < numberOfTools; toolIndex++)
76 *out << nd->GetTimeStamp() <<
";"
77 << nd->IsDataValid() <<
";"
78 << nd->GetPosition()[0] <<
";"
79 << nd->GetPosition()[1] <<
";"
80 << nd->GetPosition()[2] <<
";"
81 << nd->GetOrientation()[0] <<
";"
82 << nd->GetOrientation()[1] <<
";"
83 << nd->GetOrientation()[2] <<
";"
84 << nd->GetOrientation()[3] <<
";";
itk::SmartPointer< Self > Pointer
DataCollection - Class to facilitate loading/accessing structured data.
NavigationDataSetWriterCSV()
Convenience class to temporarily change the current locale.
static const char * GetStaticNameOfClass()
virtual mitk::NavigationDataSetWriterCSV * Clone() const override
Data structure which stores streams of mitk::NavigationData for multiple tools.
us::ServiceRegistration< IFileWriter > RegisterService(us::ModuleContext *context=us::GetModuleContext())
virtual 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.
virtual ~NavigationDataSetWriterCSV()