Carna  Version 3.3.2
VectorField.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 - 2015 Leonid Kostrykin
3  *
4  * Chair of Medical Engineering (mediTEC)
5  * RWTH Aachen University
6  * Pauwelsstr. 20
7  * 52074 Aachen
8  * Germany
9  *
10  */
11 
12 #ifndef VECTORFIELD_H_6014714286
13 #define VECTORFIELD_H_6014714286
14 
23 #include <Carna/base/math.h>
24 #include <Carna/Carna.h>
25 
26 namespace Carna
27 {
28 
29 namespace base
30 {
31 
32 namespace math
33 {
34 
35 
36 
37 // ----------------------------------------------------------------------------------
38 // VectorField
39 // ----------------------------------------------------------------------------------
40 
48 template< typename ValueType >
50 {
51 
52 public:
53 
57  typedef ValueType Value;
58 
62  virtual ~VectorField()
63  {
64  }
65 
69  virtual ValueType operator()
70  ( unsigned int x
71  , unsigned int y
72  , unsigned int z ) const = 0;
73 
76  virtual ValueType operator()( const Vector3ui& at ) const;
77 
78 }; // VectorField
79 
80 
81 template< typename ValueType >
83 {
84  return ( *this )( at.x(), at.y(), at.z() );
85 }
86 
87 
88 
89 } // namespace Carna :: base :: math
90 
91 } // namespace Carna :: base
92 
93 } // namespace Carna
94 
95 #endif // VECTORFIELD_H_6014714286
Defines Carna::base::math namespace and CARNA_FOR_VECTOR3UI.
virtual ValueType operator()(unsigned int x, unsigned int y, unsigned int z) const =0
Returns value of specified voxel.
Eigen::Matrix< unsigned int, 3, 1 > Vector3ui
Defines vector.
Definition: math.h:199
Abstract definition of an vector field where is ValueType.
Definition: VectorField.h:49
virtual ~VectorField()
Does nothing.
Definition: VectorField.h:62
ValueType Value
Holds the co-domain type of the vector field.
Definition: VectorField.h:57