OpenWalnut  1.5.0dev
WMProbTractDisplay.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 WMPROBTRACTDISPLAY_H
26 #define WMPROBTRACTDISPLAY_H
27 
28 #include <memory>
29 #include <string>
30 #include <vector>
31 
32 #include "core/kernel/WModuleContainer.h"
33 
34 // forward declarations
35 class WModule;
36 class WDataSetScalar;
37 template< class T > class WModuleInputForwardData;
38 
39 /**
40  * This module generates a visualization of probabilistic tracts using iso surfaces.
41  * Therefor three iso surfaces are generated and the user may choose isovalue, color and
42  * alpha value for each surface.
43  * \ingroup modules
44  */
46 {
47 public:
48  /**
49  * Default constructor.
50  */
52 
53  /**
54  * Destructor.
55  */
56  virtual ~WMProbTractDisplay();
57 
58  /**
59  * Gives back the name of this module.
60  * \return the module's name.
61  */
62  virtual const std::string getName() const;
63 
64  /**
65  * Gives back a description of this module.
66  * \return description to module.
67  */
68  virtual const std::string getDescription() const;
69 
70  /**
71  * Due to the prototype design pattern used to build modules, this method returns a new instance of this method. NOTE: it
72  * should never be initialized or modified in some other way. A simple new instance is required.
73  *
74  * \return the prototype used to create every module in OpenWalnut.
75  */
76  virtual std::shared_ptr< WModule > factory() const;
77 
78  /**
79  * Get the icon for this module in XPM format.
80  * \return The icon.
81  */
82  virtual const char** getXPMIcon() const;
83 
84 protected:
85  /**
86  * Entry point after loading the module. Runs in separate thread.
87  */
88  virtual void moduleMain();
89 
90  /**
91  * Initialize the connectors this module is using.
92  */
93  virtual void connectors();
94 
95  /**
96  * Initialize the properties for this module.
97  */
98  virtual void properties();
99 
100  /**
101  * In order to use sub modules we need to create, initialize (properties) and wire them.
102  */
103  void initSubModules();
104 
105 private:
106  /**
107  * Scalar dataset representing the probability field either in real numbers in [0,1] or gray values or just simply the connectivity
108  * score (\#visits per voxel).
109  */
110  std::shared_ptr< WModuleInputForwardData< WDataSetScalar > > m_input;
111 
112  /**
113  * Submodules for the iso surface generation.
114  */
115  std::vector< std::shared_ptr< WModule > > m_isoSurfaces;
116 };
117 
118 #endif // WMPROBTRACTDISPLAY_H
This data set type contains scalars as values.
This module generates a visualization of probabilistic tracts using iso surfaces.
WMProbTractDisplay()
Default constructor.
virtual void moduleMain()
Entry point after loading the module.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
virtual const std::string getName() const
Gives back the name of this module.
std::shared_ptr< WModuleInputForwardData< WDataSetScalar > > m_input
Scalar dataset representing the probability field either in real numbers in [0,1] or gray values or j...
virtual void properties()
Initialize the properties for this module.
virtual ~WMProbTractDisplay()
Destructor.
virtual void connectors()
Initialize the connectors this module is using.
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...
std::vector< std::shared_ptr< WModule > > m_isoSurfaces
Submodules for the iso surface generation.
virtual const std::string getDescription() const
Gives back a description of this module.
void initSubModules()
In order to use sub modules we need to create, initialize (properties) and wire them.
Class able to contain other modules.
This is a simple class which forwards input data to input data connectors.
Class representing a single module of OpenWalnut.
Definition: WModule.h:72