RISA
|
This stage filters the projections in the parallel beam sinogram with a precomputed filter function. More...
#include <Filter.h>
Public Types | |
using | input_type = glados::Image< glados::cuda::DeviceMemoryManager< float, glados::cuda::async_copy_policy >> |
The input data type that needs to fit the output type of the previous stage. More... | |
using | output_type = glados::Image< glados::cuda::DeviceMemoryManager< float, glados::cuda::async_copy_policy >> |
The output data type that needs to fit the input type of the following stage. More... | |
Public Member Functions | |
Filter (const std::string &configFile) | |
Initializes everything, that needs to be done only once. More... | |
~Filter () | |
Destroys everything that is not destroyed automatically. More... | |
auto | process (input_type &&sinogram) -> void |
Pushes the filtered parallel beam sinogram to the processor-threads. More... | |
auto | wait () -> output_type |
Takes one image from the output queue results_ and transfers it to the neighbored stage. More... | |
Private Member Functions | |
auto | processor (const int deviceID) -> void |
main data processing routine executed in its own thread for each CUDA device, that performs the data processing of this stage More... | |
auto | initCuFFT (const int deviceID) -> void |
initializes the cuFFT and creates the forward and inverse plans once for each deviceID More... | |
auto | readConfig (const std::string &configFile) -> bool |
Read configuration values from configuration file. More... | |
auto | designFilter () -> void |
Private Attributes | |
std::map< int, glados::Queue< input_type > > | sinograms_ |
one separate input queue for each available CUDA device More... | |
glados::Queue< output_type > | results_ |
the output queue in which the processed sinograms are stored More... | |
std::map< int, std::thread > | processorThreads_ |
stores the processor()-threads More... | |
int | numberOfProjections_ |
the number of projections in the parallel beam sinogramm over 180 degrees More... | |
int | numberOfDetectors_ |
the number of detectors in the parallel beam sinogramm over 180 degrees More... | |
int | numberOfPixels_ |
the number of pixels in the reconstruction grid in one dimension More... | |
detail::FilterType | filterType_ |
the filter type that shall be used; standarf filter type is the ramp filter. More... | |
float | cutoffFraction_ |
the fraction at which the filter function is cropped and set to zero. More... | |
int | numberOfDevices_ |
the number of available CUDA devices in the system More... | |
int | blockSize2D_ |
the block size of the filter kernel More... | |
std::map< int, cufftHandle > | plansFwd_ |
the forward plans for the cuFFT forward transformation; for each device one; More... | |
std::map< int, cufftHandle > | plansInv_ |
the inverse plans for the cuFFT inverse tranformation; for each device one; More... | |
std::map< int, cudaStream_t > | streams_ |
stores the cudaStreams that are created once More... | |
std::vector< float > | filter_ |
stores the values of the filter function More... | |
This stage filters the projections in the parallel beam sinogram with a precomputed filter function.
risa::cuda::Filter::Filter | ( | const std::string & | configFile | ) |
risa::cuda::Filter::~Filter | ( | ) |
|
private |
auto risa::cuda::Filter::process | ( | input_type && | sinogram | ) | -> void |
|
private |
main data processing routine executed in its own thread for each CUDA device, that performs the data processing of this stage
This method takes one sinogram from the queue. It calls the desired filter CUDA kernel in its own stream. After the computation of the filtered projections the filtered parallel sinogram is pushed into the output queue
[in] | deviceID | specifies on which CUDA device to execute the device functions |
|
private |
Read configuration values from configuration file.
CUDA Kernel that weights all the projections with the filter function.
All values needed for setting up the class are read from the config file in this function. If an invalid filter function is requested, the ramp filter is used.
[in] | configFile | path to config file |
true | configuration options were read successfully |
false | configuration options could not be read successfullyThis function computes the requested filter function once on the host |
auto risa::cuda::Filter::wait | ( | ) | -> output_type |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
stores the processor()-threads
|
private |
|
private |
|
private |