17 #ifndef _SPHEREINTERPOLATOR
18 #define _SPHEREINTERPOLATOR
20 #include <MitkFiberTrackingExports.h>
22 #include <vnl/vnl_vector_fixed.h>
47 vnl_vector_fixed< int, 3 >
idx;
67 int x = float2int(nx);
68 int y = float2int(ny);
69 int i = 3*6*(x+y*size);
71 idx[1] = indices[i+1];
72 idx[2] = indices[i+2];
73 interpw[0] = barycoords[i];
74 interpw[1] = barycoords[i+1];
75 interpw[2] = barycoords[i+2];
80 int x = float2int(nx);
81 int y = float2int(ny);
82 int i = 3*(1+6*(x+y*size));
84 idx[1] = indices[i+1];
85 idx[2] = indices[i+2];
86 interpw[0] = barycoords[i];
87 interpw[1] = barycoords[i+1];
88 interpw[2] = barycoords[i+2];
93 int z = float2int(nz);
94 int y = float2int(ny);
95 int i = 3*(2+6*(z+y*size));
97 idx[1] = indices[i+1];
98 idx[2] = indices[i+2];
99 interpw[0] = barycoords[i];
100 interpw[1] = barycoords[i+1];
101 interpw[2] = barycoords[i+2];
106 int z = float2int(nz);
107 int y = float2int(ny);
108 int i = 3*(3+6*(z+y*size));
110 idx[1] = indices[i+1];
111 idx[2] = indices[i+2];
112 interpw[0] = barycoords[i];
113 interpw[1] = barycoords[i+1];
114 interpw[2] = barycoords[i+2];
119 int x = float2int(nx);
120 int z = float2int(nz);
121 int i = 3*(4+6*(x+z*size));
123 idx[1] = indices[i+1];
124 idx[2] = indices[i+2];
125 interpw[0] = barycoords[i];
126 interpw[1] = barycoords[i+1];
127 interpw[2] = barycoords[i+2];
132 int x = float2int(nx);
133 int z = float2int(nz);
134 int i = 3*(5+6*(x+z*size));
136 idx[1] = indices[i+1];
137 idx[2] = indices[i+2];
138 interpw[0] = barycoords[i];
139 interpw[1] = barycoords[i+1];
140 interpw[2] = barycoords[i+2];
147 bool LoadLookuptables(
const string& lutPath);
149 bool LoadLookuptables();
151 bool LoadLookuptables(std::istream& BaryCoordsStream, std::istream& IndicesStream);
155 float x = (fabs(f)-b)*inva;
164 return int((invrescale(x)+1)*sN-0.5);
vnl_vector_fixed< float, 3 > interpw
int float2int(float x) const
vector< float > barycoords
vnl_vector_fixed< int, 3 > idx
Lookuptable based trilinear interpolation of spherically arranged scalar values.
void getInterpolation(const vnl_vector_fixed< float, 3 > &N)
float invrescale(float f) const
bool IsInValidState() const