~ubuntu-branches/ubuntu/vivid/openwalnut/vivid-proposed

« back to all changes in this revision

Viewing changes to src/modules/gaussProcesses/WDataSetGP.h

  • Committer: Package Import Robot
  • Author(s): Sebastian Eichelbaum
  • Date: 2014-03-19 17:46:12 UTC
  • mfrom: (3.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140319174612-e4mgtr1avbq3f7ph
Tags: 1.4.0~rc1+hg3a3147463ee2-1
* Major functionality and stability improvements.
* Several bug fixes
* Changed ttf-liberation dependency to fonts-liberation (Closes: #722405)
* OpenWalnut now works properly with OpenSceneGraph 3.2 (Closes: #718381)
* See http://www.openwalnut.org/versions/2

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 WDATASETGP_H
26
 
#define WDATASETGP_H
27
 
 
28
 
#include <string>
29
 
 
30
 
#include <boost/shared_ptr.hpp>
31
 
 
32
 
#include "core/common/WCondition.h"
33
 
#include "core/common/WFlag.h"
34
 
#include "core/common/WMixinVector.h"
35
 
#include "core/common/WProgress.h"
36
 
#include "core/dataHandler/WDataSet.h"
37
 
#include "core/dataHandler/WDataSetDTI.h"
38
 
#include "core/dataHandler/WDataSetFibers.h"
39
 
#include "WGaussProcess.h"
40
 
 
41
 
/**
42
 
 * Stores many Gaussian processes.
43
 
 */
44
 
class WDataSetGP : public WMixinVector< WGaussProcess >, public WDataSet
45
 
{
46
 
public:
47
 
    /**
48
 
     * Default constructor for WPrototype.
49
 
     */
50
 
    WDataSetGP();
51
 
 
52
 
    /**
53
 
     * Assembles a dataset of Gaussian processes out of the deterministic tracts as well the
54
 
     * underlying tensor field.
55
 
     *
56
 
     * \param tracts The dataset containing the deterministic tracts
57
 
     * \param tensors The underlying tensor field
58
 
     * \param shutdownFlag In case the constructor should abort this flag can be used to transport
59
 
     * the condition when to stop.  The object is left in an empty state then.
60
 
     * \param progress You may use this to indicate progress of dataset creation in terms of
61
 
     * processed tracts
62
 
     */
63
 
    WDataSetGP( boost::shared_ptr< const WDataSetFibers > tracts,
64
 
                boost::shared_ptr< const WDataSetDTI > tensors,
65
 
                const WBoolFlag& shutdownFlag,
66
 
                boost::shared_ptr< WProgress > progress );
67
 
 
68
 
    /**
69
 
     * Destructs this dataset.
70
 
     */
71
 
    virtual ~WDataSetGP();
72
 
 
73
 
    /**
74
 
     * Defines a new mean function over the mean functions of all Gaussian processes.
75
 
     *
76
 
     * \param p The position where to evaluate all mean functions
77
 
     *
78
 
     * \return The value of the new mean function.
79
 
     */
80
 
    double mean( const WPosition& p ) const;
81
 
 
82
 
    /**
83
 
     * Determines whether this dataset can be used as a texture.
84
 
     *
85
 
     * \return true if usable as texture.
86
 
     */
87
 
    virtual bool isTexture() const;
88
 
 
89
 
    /**
90
 
     * Gets the name of this prototype.
91
 
     *
92
 
     * \return the name.
93
 
     */
94
 
    virtual const std::string getName() const;
95
 
 
96
 
    /**
97
 
     * Gets the description for this prototype.
98
 
     *
99
 
     * \return the description
100
 
     */
101
 
    virtual const std::string getDescription() const;
102
 
 
103
 
    /**
104
 
     * Returns a prototype instantiated with the true type of the deriving class.
105
 
     *
106
 
     * \return the prototype.
107
 
     */
108
 
    static boost::shared_ptr< WPrototyped > getPrototype();
109
 
 
110
 
protected:
111
 
    static boost::shared_ptr< WPrototyped > m_prototype; //!< The prototype as singleton.
112
 
 
113
 
private:
114
 
    /**
115
 
     * Inits members to the specified values.
116
 
     *
117
 
     * \param tracts Reference to the deterministic tracts
118
 
     * \param tensors Reference to the tensor dataset
119
 
     * \param shutdownFlag In case of shutdown/abort construction should be stopped too!
120
 
     * \param progress Reference to the progress bar since initialization is a long running task.
121
 
     */
122
 
    void init( boost::shared_ptr< const WDataSetFibers > tracts,
123
 
               boost::shared_ptr< const WDataSetDTI > tensors,
124
 
               const WBoolFlag& shutdownFlag,
125
 
               boost::shared_ptr< WProgress > progress );
126
 
};
127
 
 
128
 
inline bool WDataSetGP::isTexture() const
129
 
{
130
 
    return false;
131
 
}
132
 
 
133
 
#endif  // WDATASETGP_H