36 if (lutPath.length()==0)
59 b = 1/(1-sqrt(1/
beta + 1));
69 MITK_INFO <<
"SphereInterpolator: loading lookuptables from custom path: " << lutPath;
72 std::ifstream BaryCoordsStream;
73 BaryCoordsStream.open(path.c_str(),
ios::in | ios::binary);
74 MITK_INFO <<
"SphereInterpolator: 1 " << path;
75 if (!BaryCoordsStream.is_open())
77 MITK_INFO <<
"SphereInterpolator: could not load FiberTrackingLUTBaryCoords.bin from " << path;
81 ifstream IndicesStream;
82 path = lutPath; path.append(
"FiberTrackingLUTIndices.bin");
83 IndicesStream.open(path.c_str(),
ios::in | ios::binary);
84 MITK_INFO <<
"SphereInterpolator: 1 " << path;
85 if (!IndicesStream.is_open())
87 MITK_INFO <<
"SphereInterpolator: could not load FiberTrackingLUTIndices.bin from " << path;
93 MITK_INFO <<
"SphereInterpolator: first and second lut loaded successfully";
102 MITK_INFO <<
"SphereInterpolator: loading lookuptables";
126 if (BaryCoordsStream)
131 BaryCoordsStream.seekg (0, ios::beg);
132 while (!BaryCoordsStream.eof())
134 BaryCoordsStream.read((
char *)&tmp,
sizeof(tmp));
138 catch (
const std::exception& e)
145 MITK_INFO <<
"SphereInterpolator: could not load FiberTrackingLUTBaryCoords.bin";
154 IndicesStream.seekg (0, ios::beg);
155 while (!IndicesStream.eof())
157 IndicesStream.read((
char *)&tmp,
sizeof(tmp));
161 catch (
const std::exception& e)
168 MITK_INFO <<
"SphereInterpolator: could not load FiberTrackingLUTIndices.bin";
vector< float > barycoords
SphereInterpolator(const string &lutPath)
Module * GetModule() const
static const std::string BaryCoordsFileName
static const std::string IndicesFileName
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)
ModuleResource GetResource(const std::string &path) const
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.