OpenWalnut  1.5.0dev
WMFunctionalMRIViewer.h
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
10 // OpenWalnut is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // OpenWalnut is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 #ifndef WMFUNCTIONALMRIVIEWER_H
26 #define WMFUNCTIONALMRIVIEWER_H
27 
28 #include <memory>
29 #include <string>
30 
31 #include "core/dataHandler/WDataSetTimeSeries.h"
32 #include "core/kernel/WModule.h"
33 #include "core/kernel/WModuleInputData.h"
34 #include "core/kernel/WModuleOutputData.h"
35 
36 /**
37  * Views a time series at different points in time.
38  *
39  * \class WMFunctionalMRIViewer
40  * \ingroup modules
41  */
43 {
44 public:
45  /**
46  * Standard constructor.
47  */
49 
50  /**
51  * Standard destructor.
52  */
53  virtual ~WMFunctionalMRIViewer();
54 
55  /**
56  * Gives back the name of this module.
57  * \return the module's name.
58  */
59  virtual const std::string getName() const;
60 
61  /**
62  * Gives back a description of this module.
63  * \return description to module.
64  */
65  virtual const std::string getDescription() const;
66 
67  /**
68  * Due to the prototype design pattern used to build modules, this method returns a new instance of this method. NOTE: it
69  * should never be initialized or modified in some other way. A simple new instance is required.
70  *
71  * \return the prototype used to create every module in OpenWalnut.
72  */
73  virtual std::shared_ptr< WModule > factory() const;
74 
75  /**
76  * Get the icon for this module in XPM format.
77  * \return The icon.
78  */
79  virtual const char** getXPMIcon() const;
80 
81 protected:
82  /**
83  * Entry point after loading the module. Runs in separate thread.
84  */
85  virtual void moduleMain();
86 
87  /**
88  * Initialize the connectors this module is using.
89  */
90  virtual void connectors();
91 
92  /**
93  * Initialize the properties for this module.
94  */
95  virtual void properties();
96 
97 private:
98  //! The current input.
99  std::shared_ptr< WDataSetTimeSeries > m_dataSet;
100 
101  //! The dataset at the current time.
102  std::shared_ptr< WDataSetScalar > m_dataSetAtTime;
103 
104  //! The input connector for the time series.
105  std::shared_ptr< WModuleInputData< WDataSetTimeSeries > > m_input;
106 
107  //! The output connector for the currently selected time slice.
108  std::shared_ptr< WModuleOutputData< WDataSetScalar > > m_output;
109 
110  //! The current time.
111  WPropDouble m_time;
112 
113  //! True, iff all textures should be scaled to the same intervall.
115 
116  //! A condition for property changes.
117  std::shared_ptr< WCondition > m_propCondition;
118 };
119 
120 #endif // WMFUNCTIONALMRIVIEWER_H
Views a time series at different points in time.
std::shared_ptr< WDataSetTimeSeries > m_dataSet
The current input.
std::shared_ptr< WDataSetScalar > m_dataSetAtTime
The dataset at the current time.
virtual std::shared_ptr< WModule > factory() const
Due to the prototype design pattern used to build modules, this method returns a new instance of this...
virtual void moduleMain()
Entry point after loading the module.
WPropBool m_texScaleNormalized
True, iff all textures should be scaled to the same intervall.
virtual ~WMFunctionalMRIViewer()
Standard destructor.
virtual const std::string getDescription() const
Gives back a description of this module.
WPropDouble m_time
The current time.
virtual void connectors()
Initialize the connectors this module is using.
std::shared_ptr< WModuleInputData< WDataSetTimeSeries > > m_input
The input connector for the time series.
std::shared_ptr< WModuleOutputData< WDataSetScalar > > m_output
The output connector for the currently selected time slice.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
std::shared_ptr< WCondition > m_propCondition
A condition for property changes.
virtual void properties()
Initialize the properties for this module.
virtual const std::string getName() const
Gives back the name of this module.
WMFunctionalMRIViewer()
Standard constructor.
Class representing a single module of OpenWalnut.
Definition: WModule.h:72