1
//---------------------------------------------------------------------------
3
// Project: OpenWalnut ( http://www.openwalnut.org )
5
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6
// For more information see http://www.openwalnut.org/copying
8
// This file is part of OpenWalnut.
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.
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.
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/>.
23
//---------------------------------------------------------------------------
30
#include <boost/shared_ptr.hpp>
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"
42
* Stores many Gaussian processes.
44
class WDataSetGP : public WMixinVector< WGaussProcess >, public WDataSet
48
* Default constructor for WPrototype.
53
* Assembles a dataset of Gaussian processes out of the deterministic tracts as well the
54
* underlying tensor field.
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
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 );
69
* Destructs this dataset.
71
virtual ~WDataSetGP();
74
* Defines a new mean function over the mean functions of all Gaussian processes.
76
* \param p The position where to evaluate all mean functions
78
* \return The value of the new mean function.
80
double mean( const WPosition& p ) const;
83
* Determines whether this dataset can be used as a texture.
85
* \return true if usable as texture.
87
virtual bool isTexture() const;
90
* Gets the name of this prototype.
94
virtual const std::string getName() const;
97
* Gets the description for this prototype.
99
* \return the description
101
virtual const std::string getDescription() const;
104
* Returns a prototype instantiated with the true type of the deriving class.
106
* \return the prototype.
108
static boost::shared_ptr< WPrototyped > getPrototype();
111
static boost::shared_ptr< WPrototyped > m_prototype; //!< The prototype as singleton.
115
* Inits members to the specified values.
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.
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 );
128
inline bool WDataSetGP::isTexture() const
133
#endif // WDATASETGP_H