AUTHORS: Won-Ki Jeong(b)
Ross T. Whitaker(a)
This library solves for the Eikional values for voxels within a volume.
Note: For all platforms, you may need to specify your CUDA toolkit location (especially if you have multiple CUDA versions installed):
cmake -DCUDA_TOOLKIT_ROOT_DIR="~/NVIDIA/CUDA-7.5" ../src
(Assuming this is the location).
Note: If you have compile errors such as undefined reference: atomicAdd
, it is likely you need to set your compute capability manually. CMake outputs whether compute capability was determined automatically, or if you need to set it manually. The default minimum compute capability is 2.0.
cmake -DCUDA_COMPUTE_CAPABILITY=20 ../src make
You will need to enable examples in your build to compile and run them.
cmake -DBUILD_EXAMPLES=ON ../src make
You will find the example binaries built in your build directory.
Run the examples in the build directory:
./Example1 -or- Example1.exe ...
Each example has a --help
flag that prints options for that example.
Follow the example source code in src/example1.cu
to learn how to use the library.
Depending on your device architecture, the default volume size may be too large. Make it smaller for Example1 with the option -s 128
or a smaller number if necessary. You can try this if you get a CUDA error when running the example.
A basic usage of the library links to the STRUCTURED_EIKONAL
library during build and includes the headers needed, which are usually no more than:
#include <StructuredEikonal.h>
Then a program would setup the Eikonal parameters using the StructuredEikonal object
object and call object.solveEikonal()
to generate the array of voxel values that represent the solution.
Here is a minimal usage example (in 3D).
#include <StructuredEikonal.h> #include <iostream> int main(int argc, char *argv[]) { StructuredEikonal data(true); //Run the solver data.solveEikonal(); //now use the result data.writeNRRD("myfile.nrrd"); }
The following helper functions are available before running the solver:
void StructuredEikonal::setDims(size_t w, size_t h, size_t d); //set the volume dimensions void StructuredEikonal::setMapType(size_t t); //pre-generated speed functions (sphere or egg-carton) void StructuredEikonal::setItersPerBlock(size_t t); //set the iterations per block void StructuredEikonal::setSpeeds(std::vector<std::vector<std::vector<double> > > speed); //set the voxel speeds void StructuredEikonal::setSeeds(std::vector<std::array<size_t, 3> > seeds); //set list of seed voxels
The following helper functions are available after running the solver:
void StructuredEikonal::writeNRRD(std::string filename); //write the result as a volume NRRD. std::vector< std::vector< std::vector<double> > > getFinalResult(); //get the resulting volume voxel values.
You can also access the results and the mesh directly after running the solver:
std::vector<std::vector<std::vector<double> > > StructuredEikonal::answer_;
class StructuredEikonalEikonal { bool verbose_; //option to set for runtime verbosity [Default false] size_t itersPerBlock_; //# of iters / block [Default 10] size_t width_; [Default 256] size_t height_; [Default 256] size_t depth_; [Default 256] size_t solverType_ ; //auto speed fuctions, 0=sphere, 1=eggcarton [Default 0] };
Testing has not yet been implemented.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4