Medical Imaging Interaction Toolkit  2018.4.99-b20efe7f
Medical Imaging Interaction Toolkit
mitkNavigationDataReaderCSV.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef MITKNavigationDataReaderCSV_H_HEADER_INCLUDED_
14 #define MITKNavigationDataReaderCSV_H_HEADER_INCLUDED_
15 
16 #include <MitkIGTIOExports.h>
17 
18 #include <mitkAbstractFileReader.h>
19 #include <mitkNavigationDataSet.h>
20 
21 namespace mitk {
29  {
30  public:
31 
33  ~NavigationDataReaderCSV() override;
34 
39 
40  protected:
41  std::vector<itk::SmartPointer<BaseData>> DoRead() override;
42 
46  mitk::NavigationData::Pointer CreateNd(std::string timestamp, std::string valid, std::string X, std::string Y, std::string Z, std::string QX, std::string QY, std::string QZ, std::string QR);
47 
51  std::vector<std::string> GetFileContentLineByLine(std::string filename);
52 
56  int getNumberOfToolsInLine(std::string line);
57 
61  std::vector<mitk::NavigationData::Pointer> parseLine(std::string line, int NumOfTools);
62 
66  double StringToDouble( const std::string& s );
67 
71  std::vector<std::string> splitLine(std::string line);
72 
74 
75  mitk::NavigationDataReaderCSV* Clone() const override;
76 
77  };
78 }
79 
80 #endif // MITKNavigationDataReaderCSV_H_HEADER_INCLUDED_
static char * line
Definition: svm.cpp:2870
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKIGTIO_EXPORT
std::vector< itk::SmartPointer< BaseData > > Read() override
Reads a path or stream and creates a list of BaseData objects.
Base class for creating mitk::BaseData objects from files or streams.