OpenWalnut  1.5.0dev
WMFiberResampling.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 WMFIBERRESAMPLING_H
26 #define WMFIBERRESAMPLING_H
27 
28 #include <memory>
29 #include <string>
30 
31 #include <core/dataHandler/WDataSetFibers.h>
32 #include <core/kernel/WModule.h>
33 #include <core/kernel/WModuleInputData.h>
34 #include <core/kernel/WModuleOutputData.h>
35 
36 #include "WResampling_I.h"
37 
38 /**
39  * This modules takes a fiber dataset and samples it in regular steps. This is useful when importing fiber datasets from other tools sampled at
40  * different steps sizes.
41  *
42  * \ingroup modules
43  */
45 {
46 public:
47  /**
48  * Default constructor.
49  */
51 
52  /**
53  * Destructor.
54  */
55  virtual ~WMFiberResampling();
56 
57  /**
58  * Gives back the name of this module.
59  * \return the module's name.
60  */
61  virtual const std::string getName() const;
62 
63  /**
64  * Gives back a description of this module.
65  * \return description to module.
66  */
67  virtual const std::string getDescription() const;
68 
69  /**
70  * Due to the prototype design pattern used to build modules, this method returns a new instance of this method. NOTE: it
71  * should never be initialized or modified in some other way. A simple new instance is required.
72  *
73  * \return the prototype used to create every module in OpenWalnut.
74  */
75  virtual std::shared_ptr< WModule > factory() const;
76 
77  /**
78  * Get the icon for this module in XPM format.
79  * \return the icon.
80  */
81  virtual const char** getXPMIcon() const;
82 
83 protected:
84  /**
85  * Entry point after loading the module. Runs in separate thread.
86  */
87  virtual void moduleMain();
88 
89  /**
90  * Initialize the connectors this module is using.
91  */
92  virtual void connectors();
93 
94  /**
95  * Initialize the properties for this module.
96  */
97  virtual void properties();
98 
99 private:
100  /**
101  * The fiber dataset which is going to be filtered.
102  */
103  std::shared_ptr< WModuleInputData< WDataSetFibers > > m_fiberIC;
104 
105  /**
106  * The output connector used to provide the calculated data to other modules.
107  */
108  std::shared_ptr< WModuleOutputData< WDataSetFibers > > m_fiberOC;
109 
110  /**
111  * Strategies for coloring fibers.
112  */
114 };
115 
116 #endif // WMFIBERRESAMPLING_H
This modules takes a fiber dataset and samples it in regular steps.
std::shared_ptr< WModuleOutputData< WDataSetFibers > > m_fiberOC
The output connector used to provide the calculated data to other modules.
WStrategyHelper< WObjectNDIP< WResampling_I > > m_strategy
Strategies for coloring fibers.
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...
WMFiberResampling()
Default constructor.
virtual ~WMFiberResampling()
Destructor.
std::shared_ptr< WModuleInputData< WDataSetFibers > > m_fiberIC
The fiber dataset which is going to be filtered.
virtual const std::string getName() const
Gives back the name of this module.
virtual void connectors()
Initialize the connectors this module is using.
virtual const std::string getDescription() const
Gives back a description of this module.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
virtual void moduleMain()
Entry point after loading the module.
virtual void properties()
Initialize the properties for this module.
Class representing a single module of OpenWalnut.
Definition: WModule.h:72
This class allows for an easy strategy pattern-based switching between properties and strategy instan...