#include <cxVNNclAlgorithm.h>
|
| VNNclAlgorithm () |
|
| ~VNNclAlgorithm () |
|
virtual bool | initCL (QString kernelFile, int nMaxPlanes, int nPlanes, int method, int planeMethod, int nStarts, float brightnessWeight, float newnessWeight) |
|
virtual cl::Program | buildCLProgram (std::string program_src, std::string kernelPath, int nMaxPlanes, int nPlanes, int method, int planeMethod, int nStarts, float brightnessWeight, float newnessWeight) |
|
virtual bool | reconstruct (ProcessedUSInputDataPtr input, vtkImageDataPtr outputData, float radius, int nClosePlanes) |
|
virtual bool | initializeFrameBlocks (frameBlock_t *framePointers, int numBlocks, ProcessedUSInputDataPtr inputFrames) |
|
virtual void | freeFrameBlocks (frameBlock_t *framePointers, int numBlocks) |
|
virtual void | fillPlaneMatrices (float *planeMatrices, ProcessedUSInputDataPtr input) |
|
void | setProfiling (bool on) |
|
double | getTotalExecutionTime () |
|
double | getKernelExecutionTime () |
|
Original author Tord Øygard
Definition at line 48 of file cxVNNclAlgorithm.h.
A representation of a Frame block in CPU memory. Since OpenCL has an upper limit on how big memory objects can be, we need to partition the input US images into several blocks. This struct represents one such block
cx::VNNclAlgorithm::VNNclAlgorithm |
( |
| ) |
|
cx::VNNclAlgorithm::~VNNclAlgorithm |
( |
| ) |
|
cl::Program cx::VNNclAlgorithm::buildCLProgram |
( |
std::string |
program_src, |
|
|
std::string |
kernelPath, |
|
|
int |
nMaxPlanes, |
|
|
int |
nPlanes, |
|
|
int |
method, |
|
|
int |
planeMethod, |
|
|
int |
nStarts, |
|
|
float |
brightnessWeight, |
|
|
float |
newnessWeight |
|
) |
| |
|
virtual |
Build the OpenCL kernel
- Parameters
-
program_src | The kernel source code |
kernelPath | path to kernel source |
nMaxPlanes | The MAX_PLANES parameter of the kernel, i.e. max value of how many planes to include in the reconstruction of one voxel |
nPlanes | Number of image planes in the input data set |
method | The method ID. See kernels.cl for more information |
planeMethod | the plane method ID. See kernels.cl for more information |
nStarts | number of starts for multistart search for close planes |
brightnessWeight | The extra weight to give pixels brighter than mean |
newnessWeight | The extra weight to give pixels newer than mean |
- Returns
- True on suc
Definition at line 78 of file cxVNNclAlgorithm.cpp.
Fill the supplied array of floats with the values from the transformation matrices in input. The data is stored like this: [ a b c d e f g h -> [ a b c d e f g h i j k l m n o p ] i j k l m n o p ] I.e: 16 floats per image plane, row major.
- Parameters
-
planeMatrices | Pointer to array of 16*number of image planes floats where the matrices will be stored |
input | The US data - which also has position data |
Definition at line 258 of file cxVNNclAlgorithm.cpp.
void cx::VNNclAlgorithm::freeFrameBlocks |
( |
frameBlock_t * |
framePointers, |
|
|
int |
numBlocks |
|
) |
| |
|
virtual |
Free a set of frame blocks allocated by initializeFrameBlocks Does not free the actual frameBlock_t structure, but the data pointer is free'd. You still have to free the frameBlocks!
- Parameters
-
framePointers | Pointer to first element in array of frame blocks |
numBlocks | number of blocks in the array |
Definition at line 309 of file cxVNNclAlgorithm.cpp.
double cx::VNNclAlgorithm::getKernelExecutionTime |
( |
| ) |
|
double cx::VNNclAlgorithm::getTotalExecutionTime |
( |
| ) |
|
bool cx::VNNclAlgorithm::initCL |
( |
QString |
kernelFile, |
|
|
int |
nMaxPlanes, |
|
|
int |
nPlanes, |
|
|
int |
method, |
|
|
int |
planeMethod, |
|
|
int |
nStarts, |
|
|
float |
brightnessWeight, |
|
|
float |
newnessWeight |
|
) |
| |
|
virtual |
Initialize OpenCL. This function initializes OpenCL and builds the kernel with the given parameters. Note that these parameters are set at compile time and not kernel run time. Uses buildCLProgram() to build the kernel.
- Parameters
-
kernelFile | Path to the OpenCL kernel source |
nMaxPlanes | The MAX_PLANES parameter of the kernel, i.e. max value of how many planes to include in the reconstruction of one voxel |
nPlanes | Number of image planes in the input data set |
method | The method ID. See kernels.cl for more information |
planeMethod | the plane method ID. See kernels.cl for more information |
nStarts | number of starts for multistart search for close planes |
brightnessWeight | The extra weight to give pixels brighter than mean |
newnessWeight | The extra weight to give pixels newer than mean |
- Returns
- True on success
- See Also
- buildCLProgram
Definition at line 60 of file cxVNNclAlgorithm.cpp.
Split the US input into numBlock blocks of whole frames and store them in framePointers.
- Parameters
-
[out] | framePointers | Pre-allocated array of numBlocks unsigned char* pointers Data will be returned here |
[in] | numBlocks | Number of blocks to split US input into |
[in] | inputFrames | The input US B-scans |
- Returns
- true on success, false otherwise
Definition at line 99 of file cxVNNclAlgorithm.cpp.
Perform GPU Reconstruction. This function initializes the CL memory objects, calls the kernel and reads back the result, which is stored in outputData.
- Parameters
-
input | The input US data |
outputData | The output volume is stored here |
radius | The radius of the kernel - i.e. how far away to look for image planes to use |
nClosePlanes | The number of close planes to search for |
- Returns
- true on success
Definition at line 144 of file cxVNNclAlgorithm.cpp.
void cx::VNNclAlgorithm::setProfiling |
( |
bool |
on | ) |
|
The documentation for this class was generated from the following files:
- /media/dev/bamboodrive/b/xml-data/build-dir/CX-RE-JOB1/CX/CX/source/plugins/org.custusx.usreconstruction.vnncl/cxVNNclAlgorithm.h
- /media/dev/bamboodrive/b/xml-data/build-dir/CX-RE-JOB1/CX/CX/source/plugins/org.custusx.usreconstruction.vnncl/cxVNNclAlgorithm.cpp