Carna Version 3.3.3
Loading...
Searching...
No Matches
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
26namespace Carna
27{
28
29namespace base
30{
31
32namespace math
33{
34
35
36
37// ----------------------------------------------------------------------------------
38// VectorField
39// ----------------------------------------------------------------------------------
40
48template< typename ValueType >
50{
51
52public:
53
58
62 virtual ~VectorField()
63 {
64 }
65
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
81template< 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
Represents an association.
Definition Association.h:45
Abstract definition of an vector field where is ValueType.
Definition VectorField.h:50
ValueType Value
Holds the co-domain type of the vector field.
Definition VectorField.h:57
virtual ~VectorField()
Does nothing.
Definition VectorField.h:62
virtual ValueType operator()(unsigned int x, unsigned int y, unsigned int z) const =0
Returns value of specified voxel.
virtual ValueType operator()(const Vector3ui &at) const
Definition VectorField.h:82
Defines Carna::base::math namespace and CARNA_FOR_VECTOR3UI.
Eigen::Matrix< unsigned int, 3, 1 > Vector3ui
Defines vector.
Definition math.h:199