CTL  0.6.1
Computed Tomography Library
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
CTL::DynamicProjectorExtension Class Reference

The DynamicProjectorExtension class is an extension for forward projectors that enables processing dynamic volume data (i.e. changing from view to view). More...

#include <dynamicprojectorextension.h>

Inheritance diagram for CTL::DynamicProjectorExtension:
Inheritance graph
[legend]
Collaboration diagram for CTL::DynamicProjectorExtension:
Collaboration graph
[legend]

Public Types

enum  { Type = 105 }
 
- Public Types inherited from CTL::ProjectorExtension
enum  { Type = 100 }
 
- Public Types inherited from CTL::AbstractProjector
enum  { Type = 0 }
 
- Public Types inherited from CTL::SerializationInterface
enum  { Type = -1, UserType = 65536 }
 

Public Member Functions

int type () const override
 
void configure (const AcquisitionSetup &setup) override
 Configures the projector. More...
 
ProjectionData project (const VolumeData &volume) override
 
ProjectionData projectComposite (const CompositeVolume &volume) override
 Provides the functionality to forward project CompositeVolume data. More...
 
ProjectionData projectSparse (const SparseVoxelVolume &volume) override
 Provides the functionality to forward project SparseVoxelVolume data. More...
 
QVariant toVariant () const override
 Stores the contents of this instance in a QVariant. More...
 
 ProjectorExtension (AbstractProjector *projector=nullptr)
 
 ProjectorExtension (std::unique_ptr< AbstractProjector > projector)
 
- Public Member Functions inherited from CTL::ProjectorExtension
int type () const override
 
void configure (const AcquisitionSetup &setup) override
 
ProjectionData project (const VolumeData &volume) override
 
 ProjectorExtension (AbstractProjector *projector=nullptr)
 
 ProjectorExtension (std::unique_ptr< AbstractProjector > projector)
 
ProjectionData projectComposite (const CompositeVolume &volume) override
 Provides the functionality to forward project CompositeVolume data. More...
 
ProjectionData projectSparse (const SparseVoxelVolume &volume) override
 Provides the functionality to forward project SparseVoxelVolume data. More...
 
bool isLinear () const override
 Returns true if the projection operation is linear. More...
 
virtual void use (AbstractProjector *other)
 
void use (std::unique_ptr< AbstractProjector > other)
 
void fromVariant (const QVariant &variant) override
 Sets the contents of the object based on the QVariant variant. More...
 
QVariant toVariant () const override
 Stores the contents of this instance in a QVariant. More...
 
AbstractProjectorrelease ()
 
void reset ()
 
- Public Member Functions inherited from CTL::AbstractProjector
 AbstractProjector (const AbstractProjector &)=delete
 
 AbstractProjector (AbstractProjector &&)=default
 
AbstractProjectoroperator= (const AbstractProjector &)=delete
 
AbstractProjectoroperator= (AbstractProjector &&)=default
 
 ~AbstractProjector () override=default
 
ProjectionData configureAndProject (const AcquisitionSetup &setup, const VolumeData &volume)
 Performs a forward projection with a precedent configuration of the projector. More...
 
ProjectionData configureAndProject (const AcquisitionSetup &setup, const CompositeVolume &volume)
 Performs a forward projection with a precedent configuration of the projector. More...
 
ProjectionData configureAndProject (const AcquisitionSetup &setup, const SparseVoxelVolume &volume)
 Performs a forward projection with a precedent configuration of the projector. More...
 
virtual QVariant parameter () const
 Returns the parameters of this instance as QVariant. More...
 
virtual void setParameter (const QVariant &parameter)
 Sets the parameters of this instance based on the passed QVariant parameter. Parameters need to follow the naming convention as described in parameter(). More...
 
virtual ProjectorNotifiernotifier ()
 Returns a pointer to the notifier of the projector. More...
 
void connectNotifierToMessageHandler (bool includeProgress=false)
 Connects the notifier to the CTL's MessageHandler. More...
 
- Public Member Functions inherited from CTL::SerializationInterface
virtual ~SerializationInterface ()=default
 

Private Attributes

AcquisitionSetup _setup
 used acquisition setup
 

Friends

template<class >
struct SerializationHelper::RegisterWithSerializationHelper
 

Additional Inherited Members

- Protected Member Functions inherited from CTL::ProjectorExtension
virtual ProjectionData extendedProject (const MetaProjector &nestedProjector)
 
- Protected Member Functions inherited from CTL::SerializationInterface
 SerializationInterface ()=default
 
 SerializationInterface (const SerializationInterface &)=default
 
 SerializationInterface (SerializationInterface &&)=default
 
SerializationInterfaceoperator= (const SerializationInterface &)=default
 
SerializationInterfaceoperator= (SerializationInterface &&)=default
 

Detailed Description

The DynamicProjectorExtension class is an extension for forward projectors that enables processing dynamic volume data (i.e. changing from view to view).

This extension enables support for volume data that change over time (i.e. from view to view). Projections for each view are computed separately with volume data being updated to the next time step in advance of each view.

If used in combination with a static volume (i.e. not a sub-class of AbstractDynamicVolumeData), this extension is skipped and the projection operation is delegated to the nested projector instead.

Member Function Documentation

◆ configure()

void CTL::DynamicProjectorExtension::configure ( const AcquisitionSetup setup)
overridevirtual

Configures the projector.

This method should be used to gather all necessary information to prepare the actual forward projection. This usually contains all geometry and system information, which can be retrieved from setup.

If you intend to call configure() and project() (or projectComposite()) directly after each other, you should use configureAndProject() instead.

Implements CTL::AbstractProjector.

◆ project()

ProjectionData CTL::DynamicProjectorExtension::project ( const VolumeData volume)
overridevirtual

Computes the projections of volume using the acquisition setup set previously with configure().

This extension enables support for volume data that change over time (i.e. from view to view). To be more specific, volume data in volume is updated to the next time step in advance of processing each view. Supposing the passed volume data (i.e. volume) is a dynamic volume, the internal workflow is as follows:

For each view in the setup:

  1. Set the time for volume to the time stamp encoded in the setup for the current view. This updates the volume's contents (see AbstractDynamicVolumeData::setTime()).
  2. Prepare the current view.
  3. Configure the nested projector with an AcquisitionSetup containing the current system for one view (the current one).
  4. Compute the projection and append the result to the full set of projections.

If volume is not a dynamic volume (see AbstractDynamicVolumeData), this extension is skipped and the projection operation is delegated to the nested projector instead.

Implements CTL::AbstractProjector.

◆ projectComposite()

ProjectionData CTL::DynamicProjectorExtension::projectComposite ( const CompositeVolume volume)
overridevirtual

Provides the functionality to forward project CompositeVolume data.

This method takes a composite dataset volume and returns the full set of forward projections according to the AcquisitionSetup set in the configure() step.

By default, this method performs separate calls to project() for each individual voxel volume stored in the composite volume. The final projection result is the sum of all these individual projections (extinction domain). Change this behavior in sub-classes, if this is not suitable for your desired purpose. This is typically the case for non-linear operations.

If you intend to call configure() and projectComposite() directly after each other, you should use configureAndProject() instead.

Reimplemented from CTL::AbstractProjector.

◆ ProjectorExtension() [1/2]

CTL::ProjectorExtension::ProjectorExtension
explicit

Constructs a ProjectorExtension object and sets the nested projector to projector. A good practice to create a ProjectorExtension on the heap is to use the make function makeExtension(std::unique_ptr<AbstractProjector> projector) which will interally use this constructor.

◆ ProjectorExtension() [2/2]

CTL::ProjectorExtension::ProjectorExtension
explicit

Constructs a ProjectorExtension object and sets the nested projector to projector. The nested projector is internally used as a basis for computing forward projections. Note that the constructed object takes over the ownership of projector.

◆ projectSparse()

ProjectionData CTL::DynamicProjectorExtension::projectSparse ( const SparseVoxelVolume volume)
overridevirtual

Provides the functionality to forward project SparseVoxelVolume data.

This method takes a sparse dataset volume and returns the full set of forward projections according to the AcquisitionSetup set in the configure() step.

By default, this method performs converts volume to a regular VoxelVolume<float> and calls project() with it. Re-implement this method in sub-classes if you can provide more efficient ways of forward projecting sparse data.

If you intend to call configure() and projectSparse() directly after each other, you should use configureAndProject() instead.

Reimplemented from CTL::AbstractProjector.

◆ toVariant()

QVariant CTL::DynamicProjectorExtension::toVariant ( ) const
overridevirtual

Stores the contents of this instance in a QVariant.

Implementation of the serialization interface. Stores the object's type-id (from SerializationInterface::toVariant()).

This method uses parameter() to serialize class members.

Reimplemented from CTL::AbstractProjector.

◆ type()

int CTL::DynamicProjectorExtension::type ( ) const
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::AbstractProjector.


The documentation for this class was generated from the following files: