Vespucci  1.0.0
textimport.h
Go to the documentation of this file.
1 /*******************************************************************************
2  Copyright (C) 2014-2016 Wright State University - All Rights Reserved
3  Daniel P. Foose - Maintainer/Lead Developer
4 
5  This file is part of Vespucci.
6 
7  Vespucci is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  Vespucci is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with Vespucci. If not, see <http://www.gnu.org/licenses/>.
19 *******************************************************************************/
20 #ifndef TEXTIMPORT_H
21 #define TEXTIMPORT_H
22 
23 #if !defined( SWIG )
24  // SWIG should not see #inlcude<armadillo> as it can not handle it
25  #include <mlpack/core.hpp>
26  #include "Global/libvespucci.h"
27 #endif
28 #include <map>
29 
30 namespace TextImport
31 {
32 
33  VESPUCCI_EXPORT bool ImportWideText(std::string filename,
34  arma::mat &spectra,
35  arma::vec &abscissa,
36  arma::vec &x, arma::vec &y,
37  bool swap_spatial);
38 
39  VESPUCCI_EXPORT bool ImportLongText(std::string filename,
40  arma::mat &spectra,
41  arma::mat &abscissa,
42  arma::vec &x, arma::vec &y,
43  bool swap_spatial);
44 
45  VESPUCCI_EXPORT bool ImportMultiplePoints(std::map<std::pair<int,int>, std::string> filenames,
46  int rows,
47  int cols,
48  arma::mat &spectra,
49  arma::vec &abscissa,
50  arma::vec &x, arma::vec &y);
51 
52  VESPUCCI_EXPORT bool ImportWitec(std::string filename,
53  double x_start,
54  double y_start,
55  double x_end,
56  double y_end,
57  arma::uword x_count, arma::uword y_count,
58  arma::mat &spectra,
59  arma::vec &abscissa,
60  arma::vec &x, arma::vec &y);
61 
62  VESPUCCI_EXPORT bool CheckFileValidity(QString filename, bool &comma_decimals);
63 
64  VESPUCCI_EXPORT void GenerateSpatialData(double x_start,
65  double y_start,
66  double x_end,
67  double y_end,
68  arma::uword x_count,
69  arma::uword y_count,
70  arma::vec &x,
71  arma::vec &y);
72 }
73 
74 #endif // TEXTIMPORT_H
VESPUCCI_EXPORT bool CheckFileValidity(QString filename, bool &comma_decimals)
TextImport::CheckFileValidity.
Definition: textimport.cpp:37
VESPUCCI_EXPORT bool ImportWitec(std::string filename, double x_start, double y_start, double x_end, double y_end, arma::uword x_count, arma::uword y_count, arma::mat &spectra, arma::vec &abscissa, arma::vec &x, arma::vec &y)
TextImport::ImportWitec.
Definition: textimport.cpp:242
VESPUCCI_EXPORT void GenerateSpatialData(double x_start, double y_start, double x_end, double y_end, arma::uword x_count, arma::uword y_count, arma::vec &x, arma::vec &y)
TextImport::GenerateSpatialData.
Definition: textimport.cpp:286
VESPUCCI_EXPORT bool ImportWideText(std::string filename, arma::mat &spectra, arma::vec &abscissa, arma::vec &x, arma::vec &y, bool swap_spatial)
TextImport::ImportWideText.
Definition: textimport.cpp:97
VESPUCCI_EXPORT bool ImportMultiplePoints(std::map< std::pair< int, int >, std::string > filenames, int rows, int cols, arma::mat &spectra, arma::vec &abscissa, arma::vec &x, arma::vec &y)
TextImport::ImportMultiplePoints.
Definition: textimport.cpp:152
#define VESPUCCI_EXPORT
Definition: libvespucci.h:7
VESPUCCI_EXPORT bool ImportLongText(std::string filename, arma::mat &spectra, arma::mat &abscissa, arma::vec &x, arma::vec &y, bool swap_spatial)
TextImport::ImportLongText.
Definition: textimport.cpp:311