GPU-based ultrasound field simulator with interactive user interface.
Homepage: http://heim.ifi.uio.no/jpaasen/huygens/
Released under the GPL license.
Now there is also a WebGL-implmentation of this simulator. You can find it here.
- Create "build" folder
- Enter build folder and type:
> cmake .. - Then make the project with:
> make - Run program with:
> ./HuygensOnSpeedGlutApp/HuygensOnSpeedApp
Or short: > cmake .. ; make ; ./HuygensOnSpeedGlutApp/HuygensOnSpeedApp
- Generate Visual Studio 20XY solution file using cmake in terminal or GUI.
- Open solution file and build (F5).
Set CMAKE arguments CALC_WITH and DISP_WITH to either "CUDA" or "CPU".
Valid combinations are:
CALC_WITH="CUDA"andDISP_WITH="CUDA"CALC_WITH="CPU"andDISP_WITH="CUDA"CALC_WITH="CPU"andDISP_WITH="CPU"Command line example:
> cmake .. -DCALC_WITH="CPU" -DDISP_WITH="CPU"
Remember to have libGL, libGlew, libGLU and libglut in lib/linker path. To grab glew use: sudo apt-get install libglew1.6-dev To grab glu use: sudo apt-get install libglu1-mesa-dev The other two is usually install together with CUDA. To se if you have a lib installed use: apt-file search
Generate solution file using cmake.
Project dependencies (libs) are found in the CUDA Toolkit and SDK if CALC_WITH="CUDA" or DISP_WITH="CPU" and should be located automatically by cmake. If both CALC_WITH and DISP_WITH are "CPU", the project uses files found in the local include and lib folder.
Same build instructions as for linux: mkdir build; cd build; cmake ..; make
Glew have to be install to make it run.
> brew install glew
If you don't have brew you can get it here
Or just paste the following line in the terminal: ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Have to force close the application (ctrl + z in the terminal and right-klick + force quit on the ui icon)
This includes the simulator code and data structures for point sources, observation points, Paint tools and etc. It includes both a GPU and CPU implementation. For display, a CUDA-OpenGL binding is used. Now there is also a display class for CPU and OpenGL only.
The following build instructions is based on this code beeing build as a static library HuygensOnSpeed(.lib/.a).
- Additional include directories:
"$(CUDA_PATH)\include";"$(NVSDKCOMPUTE_ROOT)\C\common\inc" - Additional lib dependencies:
cudart(.lib) cublas(.lib) - Additional lib dirs:
"$(NVSDKCOMPUTE_ROOT)/C/common/lib/$(PlatformName)"; "$(CUDA_PATH)/lib/$(PlatformName)"
This is the Paint-UI used to draw lines of source points.
- Additional include directories:
"$(CUDA_PATH)\include";"$(NVSDKCOMPUTE_ROOT)\C\common\inc" - Additional lib dependencies:
HuygensOnSpeed(.lib) glew(64.lib) - Additional lib dirs:
"$(NVSDKCOMPUTE_ROOT)/C/common/lib/$(PlatformName)";"$(SolutionDir)$(PlatformName)/$(ConfigurationName)";"$(CUDA_PATH)/lib/$(PlatformName)"
After compilation (on windows, maybe on Linux too?), the glut app will require the following dynamic libraries from the cuda sdk in order to run:
- cudart(64.dll)
- cublas(64.dll)
- freeglut(.dll)
- glew(64.dll)
Functionality for calling HuygensOnSpeed from Matlab.
See own Readme file in sub folder. Building mex-interface has only been tested on windows 7 64bit.
Jon Petter Åsen - jon.p.asen@ntnu.no