OpenWalnut  1.5.0dev
WManipulatorNormalize.h
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2017 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 WMANIPULATORNORMALIZE_H
26 #define WMANIPULATORNORMALIZE_H
27 
28 #include <memory>
29 
30 #include "WManipulatorInterface.h"
31 #include "core/common/WObjectNDIP.h"
32 
33 class WDataSet;
34 
35 /**
36  * A manipulator to scale datasets to form a unit cube.
37  */
38 class WManipulatorNormalize : public WObjectNDIP< WManipulatorInterface >
39 {
40 public:
41  /**
42  * Constructor.
43  * \param dataSet The data set to be transformed
44  */
45  explicit WManipulatorNormalize( std::shared_ptr< WDataSet >* dataSet );
46 
47  /**
48  * Destructor.
49  */
50  virtual ~WManipulatorNormalize();
51 
52  /**
53  * Get the transformation matrix from this manipulator.
54  *
55  * \return The current transform.
56  */
58 
59  /**
60  * Check if the transform has changed, for example because of a change to properties.
61  *
62  * \return true, iff the transformation has changed.
63  */
64  virtual bool transformationChanged() const;
65 
66  /**
67  * Reset the transform.
68  */
69  virtual void reset();
70 
71 private:
72  //! The normalize parameters as a vector.
73  WPropPosition m_normalize;
74 
75  //! Pointer to the dataset to be normalized
76  std::shared_ptr< WDataSet >* m_dataSet;
77 };
78 
79 #endif // WMANIPULATORNORMALIZE_H
Base class for all data set types.
Definition: WDataSet.h:50
A manipulator to scale datasets to form a unit cube.
WPropPosition m_normalize
The normalize parameters as a vector.
virtual void reset()
Reset the transform.
WManipulatorNormalize(std::shared_ptr< WDataSet > *dataSet)
Constructor.
virtual ~WManipulatorNormalize()
Destructor.
virtual bool transformationChanged() const
Check if the transform has changed, for example because of a change to properties.
virtual WMatrixFixed< double, 4, 4 > getTransformationMatrix() const
Get the transformation matrix from this manipulator.
std::shared_ptr< WDataSet > * m_dataSet
Pointer to the dataset to be normalized.
This is a base class for everything which has a Name,Description,Icon and Properties (=NDIP).
Definition: WObjectNDIP.h:42