CTL
0.6.1
Computed Tomography Library
|
The ApodizationFilter class is an OpenCL implementation of several apodization functions. More...
#include <oclprojectionfilters.h>
Public Types | |
enum | { Type = 3103 } |
enum | FilterType { RamLak, SheppLogan, Cosine, Hann } |
![]() | |
enum | { Type = 3100 } |
![]() | |
enum | { Type = 3000 } |
![]() | |
enum | { Type = -1, UserType = 65536 } |
Public Member Functions | |
int | type () const override |
void | filter (ProjectionData &projections) override |
Applies the apodization filter operation to projections. | |
ApodizationFilter (FilterType filterType, float frequencyScaling=1.0f) | |
Constructs an ApodizationFilter object. More... | |
QVariant | parameter () const override |
Returns the parameters of this instance as a QVariant. More... | |
void | setParameter (const QVariant ¶meter) override |
Sets the parameters of this instance based on the passed QVariant parameter. More... | |
![]() | |
GenericOCLProjectionFilter (const std::string &clFileName, const std::vector< float > &arguments={}) | |
Creates a GenericOCLProjectionFilter instance that is capable of executing the OpenCL kernel (filter ) of the file clFileName. More... | |
void | setAdditionalKernelArg (float argument) |
Convenience method for simpler setting of a single additional argument. More... | |
void | setAdditionalKernelArgs (const std::vector< float > &arguments) |
Sets the additional kernel arguments to arguments. More... | |
![]() | |
void | fromVariant (const QVariant &variant) override |
QVariant | toVariant () const override |
![]() | |
virtual | ~SerializationInterface ()=default |
Private Member Functions | |
ApodizationFilter () | |
Default ctor; private. Used for purpose of deserialization only. | |
std::vector< float > | generateCoefficients (unsigned filterSize) const |
Generates the coefficients for a filter of size filterSize. | |
Static Private Member Functions | |
static QMetaEnum | metaEnum () |
QMetaEnum object used to decode/encode subset order enum values. | |
Private Attributes | |
FilterType | _filterType |
float | _frequencyScaling = 1.0f |
std::vector< float > | _filter |
Friends | |
template<class > | |
struct | SerializationHelper::RegisterWithSerializationHelper |
Additional Inherited Members | |
![]() | |
GenericOCLProjectionFilter () | |
Creates a GenericOCLProjectionFilter without any OpenCL kernel associated to it. More... | |
GenericOCLProjectionFilter (cl::Kernel *kernel, const std::vector< float > &arguments={}) | |
Creates a GenericOCLProjectionFilter that executes the OpenCL kernel kernel. More... | |
virtual cl::NDRange | globalWorksize (const ProjectionData &projections) const |
Returns the global worksize for the kernel call. More... | |
virtual cl::NDRange | localWorksize (const ProjectionData &projections) const |
Returns the local worksize for the kernel call. More... | |
virtual bool | autoCombine () const |
Returns true if projections will be automatically combined before being processed by the kernel. More... | |
![]() | |
AbstractProjectionFilter (const AbstractProjectionFilter &)=default | |
AbstractProjectionFilter (AbstractProjectionFilter &&)=default | |
AbstractProjectionFilter & | operator= (const AbstractProjectionFilter &)=default |
AbstractProjectionFilter & | operator= (AbstractProjectionFilter &&)=default |
![]() | |
SerializationInterface ()=default | |
SerializationInterface (const SerializationInterface &)=default | |
SerializationInterface (SerializationInterface &&)=default | |
SerializationInterface & | operator= (const SerializationInterface &)=default |
SerializationInterface & | operator= (SerializationInterface &&)=default |
![]() | |
std::string | _clFileName |
std::vector< float > | _additionalArgs |
cl::Kernel * | _kernel |
cl::CommandQueue | _queue |
The ApodizationFilter class is an OpenCL implementation of several apodization functions.
For direct reconstructions of volumes from X-ray projections, e.g. using FDKReconstructor, the Ram-Lak filter is applied on the projections in frequency domain. Due to the discrete nature of detector pixels, the Ram-Lak filter is band-limited and sampled at discrete positions, which leads to spectral leakage. Moreover, in case of a low signal-to-noise ratio of the projections, it is sensible to attenuate high frequency content to reduce noise in the reconstructions. Apodization functions, also known as window functions, are used to handle these two problems. They are (usually) symmetric functions that are zero-valued outside a certain interval. For CT reconstruction, they are multiplied with the Ram-Lak filter in frequency domain.
|
explicit |
Constructs an ApodizationFilter object.
filterType | Type of the apodization filter |
frequencyScaling | Scaling of the apodization function along frequency axis. Can take values in \((0, 1]\). Frequencies above/below the cutoff frequency calculated from this scaling factor are set to zero. |
|
overridevirtual |
Returns the parameters of this instance as a QVariant.
Returns a QVariantMap including the following (key, value)-pairs:
Reimplemented from CTL::OCL::GenericOCLProjectionFilter.
|
overridevirtual |
Sets the parameters of this instance based on the passed QVariant parameter.
The passed parameter must be a QVariantMap containing one or more of the following (key, value)-pairs:
Note that changing parameters of the base class this way (esp. changing the OpenCL kernel file) leads to undefined behavior.
Reimplemented from CTL::OCL::GenericOCLProjectionFilter.
|
inlineoverridevirtual |
Returns the type-id of the serializable object. Used in deserialization to determine the proper object type.
Add derived classes to the enumeration using the CTL_TYPE_ID macro.
Reimplemented from CTL::OCL::GenericOCLProjectionFilter.