Medical Imaging Interaction Toolkit  2018.4.99-9a29ffc6
Medical Imaging Interaction Toolkit
mitkCLResultWritter.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 mitkCLResultWritter_h
14 #define mitkCLResultWritter_h
15 
16 #include "MitkCLUtilitiesExports.h"
17 
18 #include <sstream>
19 #include <fstream>
20 #include <vector>
21 
23 
24 namespace mitk
25 {
26  namespace cl
27  {
29  {
30  public:
31  FeatureResultWritter(std::string, int mode);
33 
34  void SetDecimalPoint(char decimal);
35 
36  void AddSubjectInformation(std::string value);
37  void AddColumn(std::string value);
38  void AddColumn(double value);
39  void NewRow(std::string endName);
40 
41  void AddResult(std::string desc, int slice, mitk::AbstractGlobalImageFeature::FeatureListType stats, bool , bool withDescription);
42  void AddHeader(std::string, int slice, mitk::AbstractGlobalImageFeature::FeatureListType stats, bool withHeader, bool withDescription);
43 
44  private:
45  int m_Mode;
46  std::size_t m_CurrentRow;
47  int m_CurrentElement;
48  std::string m_Separator;
49  std::ofstream m_Output;
50  std::vector<std::string> m_List;
51  std::string m_SubjectInformation;
52  bool m_UsedSubjectInformation;
53  bool m_UseSpecialDecimalPoint;
54  char m_DecimalPoint;
55  };
56  }
57 }
58 
59 #endif //mitkCLResultWritter_h
DataCollection - Class to facilitate loading/accessing structured data.
std::vector< std::pair< std::string, double > > FeatureListType
#define MITKCLUTILITIES_EXPORT