Commit dc759ca2 authored by johannes.maul's avatar johannes.maul
Browse files


parent 59f33bfa
# RaytracingX-RayProjectionSimulator
# RaytracingX-RayProjectionSimulator
Simulation for X-Ray Porjection with raytracing.
Usable for Matlab
\ No newline at end of file
Simulation for x-ray projection with raytracing<br/>
Usable for Matlab using mex-interface
The x-ray projection simulator offers hardware accelerated projections for triangle meshed surface data. It features the usage for Matlab via mex-interfaces.
Please report bugs and requests for features in the gitlab issue tracker!
Written and maintained by J. Maul
Institute for Data Processing and Electronics (IPE)
Karlsruhe Institute of Technology (KIT)
e-mail: [](
nv_ray_tracing_basic: mex-interface for kernel call.
- Input: detectorPositionCoordinates: x,y,z coordinates of the detector as row vector. Format (n,3) where 1 = x, 2, = y, 3 = z and n diffrent detector positions
faces: IDs of the vertices from triangle. IDs refer to nodes which have the proper coordinates. Both together create the surfaces. Faces also save the region. The region safes the material information. Format: (n,4)
nodes: Coordinates for triangle vertices. Format (n,3) where 1 = x, 2, = y, 3 = z
source: Coordinates of the source. Format: (1,3) where 1 = x, 2, = y, 3 = z
detectorSizeUint: real size of detector. It defines the size of the outputpicture. Format (1,2) where 1 = numberOfPixelX, 1 = numberOfPixelY. Important: uint32 conversion
attenuationCoefficentValues: Attenuation coefficents for region. The first value will be mapped to region 1 of faces, second value will be mapped with region 2. etc. Format (1,n) n >= number of regions (every attenuation coefficient above number of regions has no effect)
- Output: attenuationValues: the result in format of detectorSizeUint(1)*detectorSizeUint(2). Wrapper will reformat to picture. See: attenuationCalculationWrapper
profiling: internal time measurement. It's not necessary for calculation but it does not effect the calculation time much, espacially for big problems.
//debugMiss would be possible
attenuationCalculationWrapper: should be called for proper Beer-Lambert-calculation, because kernel does not execute exponantiell function, because it just offers single precision.
- Input: detectorPositionCoordinates: equal to kernel nv_ray_tracing_basic
faces: equal to kernel nv_ray_tracing_basic
nodes: equal to kernel nv_ray_tracing_basic
source: equal to kernel nv_ray_tracing_basic
detectorSizeUint: equal to kernel nv_ray_tracing_basic
attenuationCoefficentValues: equal to kernel nv_ray_tracing_basic
photons: initial photon number. Photon = 1 => result = attenuation value Photon != 1 => result = x-ray strength on detector
- Output: attenuationValues: equal to kernel
attenuationPicture: attenuation values in format of picutre. Picture has the same size as defined with detectorSizeUint
easyExample: small example with projection image as result. It shows the process from voxel data to image.
- Input: exampleType: string which example should be shown. "test", "easy", "real"
buildDefault: is a build needed before? 0 = no build, 1 = build with default settings, see raytracingBuilderWrapper.
- Output: figure with projection pops up
raytracingBuilder: build for raytracing functions and shader. If vulkan is installed and the files has same relativ position, the build works from alone and raytracingBuilderWrapper can be used.
- Input: cSourceFilesPath
- Output: generated files in the expected folder
raytracingBuilderWrapper: starts raytracingBuilder with default settings. If vulkan is installed and the files has same relativ position, the build works from alone, else use raytracingBuilder and set parameters manually
- Input: none
- Output: generated files in the expected folder (equal to raytracingBuilder)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment