Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKNavigationDataReaderCSV_H_HEADER_INCLUDED_
18 #define MITKNavigationDataReaderCSV_H_HEADER_INCLUDED_
19 
20 #include <mitkAbstractFileReader.h>
21 #include <mitkNavigationDataSet.h>
22 
23 namespace mitk {
31  {
32  public:
33 
35  virtual ~NavigationDataReaderCSV();
36 
41  virtual std::vector<itk::SmartPointer<BaseData>> Read() override;
42 
43  protected:
44 
48  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);
49 
53  std::vector<std::string> GetFileContentLineByLine(std::string filename);
54 
58  int getNumberOfToolsInLine(std::string line);
59 
63  std::vector<mitk::NavigationData::Pointer> parseLine(std::string line, int NumOfTools);
64 
68  double StringToDouble( const std::string& s );
69 
73  std::vector<std::string> splitLine(std::string line);
74 
76 
77  virtual mitk::NavigationDataReaderCSV* Clone() const override;
78 
79  };
80 }
81 
82 #endif // MITKNavigationDataReaderCSV_H_HEADER_INCLUDED_
static char * line
Definition: svm.cpp:2884
itk::SmartPointer< Self > Pointer
virtual mitk::NavigationDataReaderCSV * Clone() const override
std::vector< mitk::NavigationData::Pointer > parseLine(std::string line, int NumOfTools)
DataCollection - Class to facilitate loading/accessing structured data.
double StringToDouble(const std::string &s)
virtual std::vector< itk::SmartPointer< BaseData > > Read() override=0
Reads a path or stream and creates a list of BaseData objects.
std::vector< std::string > splitLine(std::string line)
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)
static const std::string filename
Base class for creating mitk::BaseData objects from files or streams.
virtual std::vector< itk::SmartPointer< BaseData > > Read() override
Reads a path or stream and creates a list of BaseData objects.
std::vector< std::string > GetFileContentLineByLine(std::string filename)