OpenWalnut  1.5.0dev
WFiber.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 WFIBER_H
26 #define WFIBER_H
27 
28 #include <vector>
29 
30 #include "../math/WLine.h"
31 #include "../math/linearAlgebra/WPosition.h"
32 
33 
34 class WFiberTest;
35 
36 /**
37  * Represents a neural pathway.
38  */
39 class WFiber : public WLine
40 {
41 friend class WFiberTest; //!< Access for test class.
42 public:
43  /**
44  * Constructs a new fiber out of WPositions.
45  *
46  * \param points Reference to the points which belong to this fiber
47  */
48  explicit WFiber( const std::vector< WPosition > &points );
49 
50  /**
51  * Creates an empty fiber.
52  */
53  WFiber();
54 
55  /**
56  * This is the Smaller thresholded distance as described by Zhang: http://dx.doi.org/10.1109/TVCG.2008.52 .
57  *
58  * \param thresholdSquare Threshold upto which the distances should be ignored given as square for reasons of performance.
59  * \param q First fiber
60  * \param r Second fiber
61  *
62  * \return The minimum of dt(Q,R) and dt(R,Q)
63  */
64  static double distDST( double thresholdSquare, const WFiber &q, const WFiber &r );
65 
66  /**
67  * This is the Larger thresholded distance as described by Zhang: http://dx.doi.org/10.1109/TVCG.2008.52 .
68  *
69  * \param thresholdSquare Threshold upto which the distances should be ignored given as square for reasons of performance.
70  * \param q First fiber
71  * \param r Second fiber
72  *
73  * \return The maximum of dt(Q,R) and dt(R,Q)
74  */
75  static double distDLT( double thresholdSquare, const WFiber &q, const WFiber &r );
76 
77 protected:
78 private:
79 };
80 #endif // WFIBER_H
Unit tests our WFiber class.
Definition: WFiber_test.h:41
Represents a neural pathway.
Definition: WFiber.h:40
WFiber()
Creates an empty fiber.
Definition: WFiber.cpp:93
static double distDLT(double thresholdSquare, const WFiber &q, const WFiber &r)
This is the Larger thresholded distance as described by Zhang: http://dx.doi.org/10....
Definition: WFiber.cpp:104
static double distDST(double thresholdSquare, const WFiber &q, const WFiber &r)
This is the Smaller thresholded distance as described by Zhang: http://dx.doi.org/10....
Definition: WFiber.cpp:98
A line is an ordered sequence of WPositions.
Definition: WLine.h:42