BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
OutputDataReadStrategy.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Device/InputOutput/OutputDataReadStrategy.h
6 //! @brief Defines IOutputDataReadStrategy and related classes.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************** //
14 
15 #ifndef BORNAGAIN_CORE_INPUTOUTPUT_OUTPUTDATAREADSTRATEGY_H
16 #define BORNAGAIN_CORE_INPUTOUTPUT_OUTPUTDATAREADSTRATEGY_H
17 
18 #include <istream>
19 
20 template <class T> class OutputData;
21 
22 //! Interface for reading strategy of OutputData from file.
23 //! @ingroup input_output_internal
24 
26 {
27 public:
29  virtual OutputData<double>* readOutputData(std::istream& input_stream) = 0;
30 };
31 
32 //! Strategy to read BornAgain native IntensityData from ASCII file.
33 //! @ingroup input_output_internal
34 
36 {
37 public:
38  OutputData<double>* readOutputData(std::istream& input_stream);
39 };
40 
41 //! Strategy to read Reflectometry data from ASCII file.
42 //! @ingroup input_output_internal
43 
45 {
46 public:
47  OutputData<double>* readOutputData(std::istream& input_stream);
48 };
49 
50 //! Strategy to read OutputData from simple ASCII file with the layout as in numpy.savetxt.
51 //! @ingroup input_output_internal
52 
54 {
55 public:
56  OutputData<double>* readOutputData(std::istream& input_stream);
57 };
58 
59 #ifdef BORNAGAIN_TIFF_SUPPORT
60 
61 class TiffHandler;
62 
63 //! Strategy to read a TIFF file.
64 //! @ingroup input_output_internal
65 
66 class OutputDataReadTiffStrategy : public IOutputDataReadStrategy
67 {
68 public:
69  OutputDataReadTiffStrategy();
70  virtual ~OutputDataReadTiffStrategy();
71  virtual OutputData<double>* readOutputData(std::istream& input_stream);
72 
73 private:
74  TiffHandler* m_d;
75 };
76 #endif // BORNAGAIN_TIFF_SUPPORT
77 
78 #endif // BORNAGAIN_CORE_INPUTOUTPUT_OUTPUTDATAREADSTRATEGY_H
Interface for reading strategy of OutputData from file.
virtual OutputData< double > * readOutputData(std::istream &input_stream)=0
Strategy to read BornAgain native IntensityData from ASCII file.
OutputData< double > * readOutputData(std::istream &input_stream)
Strategy to read OutputData from simple ASCII file with the layout as in numpy.savetxt.
OutputData< double > * readOutputData(std::istream &input_stream)
Strategy to read Reflectometry data from ASCII file.
OutputData< double > * readOutputData(std::istream &input_stream)
Template class to store data of any type in multi-dimensional space.
Definition: OutputData.h:33