1 #ifndef CTL_PROJECTOREXTENSION_H 2 #define CTL_PROJECTOREXTENSION_H 159 void fromVariant(const QVariant &variant) override;
181 bool isComposite()
const;
182 bool isSparse()
const;
193 template<
class ProjectorExtensionType>
194 auto operator|(std::unique_ptr<AbstractProjector> lhs,
195 std::unique_ptr<ProjectorExtensionType> rhs) ->
196 typename std::enable_if<std::is_convertible<ProjectorExtensionType*, ProjectorExtension*>::value,
197 std::unique_ptr<ProjectorExtensionType>>
::type 199 rhs->use(std::move(lhs));
204 template<
class ProjectorExtensionType>
205 auto operator|(std::unique_ptr<AbstractProjector> lhs,
206 ProjectorExtensionType* rhs) ->
207 typename std::enable_if<std::is_convertible<ProjectorExtensionType*, ProjectorExtension*>::value,
208 std::unique_ptr<ProjectorExtensionType>>
::type 210 rhs->use(std::move(lhs));
211 return std::unique_ptr<ProjectorExtensionType>{ rhs };
215 template<
class ProjectorExtensionType>
216 auto operator|(AbstractProjector* lhs,
217 std::unique_ptr<ProjectorExtensionType> rhs) ->
218 typename std::enable_if<std::is_convertible<ProjectorExtensionType*, ProjectorExtension*>::value,
219 std::unique_ptr<ProjectorExtensionType>>
::type 226 std::unique_ptr<AbstractProjector>& operator|=(std::unique_ptr<AbstractProjector>& lhs,
227 std::unique_ptr<ProjectorExtension> rhs);
228 std::unique_ptr<ProjectorExtension>& operator|=(std::unique_ptr<ProjectorExtension>& lhs,
229 std::unique_ptr<ProjectorExtension> rhs);
231 std::unique_ptr<AbstractProjector>& operator|=(std::unique_ptr<AbstractProjector>& lhs,
233 std::unique_ptr<ProjectorExtension>& operator|=(std::unique_ptr<ProjectorExtension>& lhs,
236 AbstractProjector*& operator|=(AbstractProjector*& lhs,
237 std::unique_ptr<ProjectorExtension> rhs);
239 std::unique_ptr<ProjectorExtension> rhs);
246 template <
typename ProjectorExtensionType>
248 typename std::enable_if<std::is_convertible<ProjectorExtensionType*, ProjectorExtension*>::value,
249 std::unique_ptr<ProjectorExtensionType>>
::type 251 return std::unique_ptr<ProjectorExtensionType>(
new ProjectorExtensionType(projector));
254 template <
typename ProjectorExtensionType>
256 typename std::enable_if<std::is_convertible<ProjectorExtensionType*, ProjectorExtension*>::value,
257 std::unique_ptr<ProjectorExtensionType>>
::type 259 return std::unique_ptr<ProjectorExtensionType>(
260 new ProjectorExtensionType(std::move(projector)));
286 #endif // CTL_PROJECTOREXTENSION_H void configure(const AcquisitionSetup &setup) override
Definition: projectorextension.cpp:114
void fromVariant(const QVariant &variant) override
Sets the contents of the object based on the QVariant variant.
Definition: projectorextension.cpp:172
int type() const override
Definition: projectorextension.h:138
virtual ProjectionData extendedProject(const MetaProjector &nestedProjector)
Definition: projectorextension.cpp:67
ProjectorExtension(AbstractProjector *projector=nullptr)
Definition: projectorextension.cpp:78
Holds a CTSystem together with the information about the system settings for all views from which pro...
Definition: acquisitionsetup.h:175
bool isLinear() const override
Returns true if the projection operation is linear.
Definition: projectorextension.cpp:163
The ProjectionData class is the container class used to store all projections from all views.
Definition: projectiondata.h:19
Definition: sparsevoxelvolume.h:14
The AbstractProjector class is the abstract base class defining the interfaces for forward projectors...
Definition: abstractprojector.h:68
AbstractProjector * release()
Definition: projectorextension.cpp:199
ProjectionData projectComposite(const CompositeVolume &volume) override
Provides the functionality to forward project CompositeVolume data.
Definition: projectorextension.cpp:143
The CompositeVolume class is a container to hold multiple volume datasets of any type from the CTL.
Definition: compositevolume.h:108
QVariant toVariant() const override
Stores the contents of this instance in a QVariant.
Definition: projectorextension.cpp:183
void reset()
Definition: projectorextension.cpp:211
#define CTL_TYPE_ID(newIndex)
Definition: serializationinterface.h:189
The SpectralVolumeData class holds voxelized data (for a single material) along with information on i...
Definition: spectralvolumedata.h:40
std::unique_ptr< AbstractProjector > _projector
The nested projector object.
Definition: projectorextension.h:170
ProjectionData project(const VolumeData &volume) override
Definition: projectorextension.cpp:131
virtual void use(AbstractProjector *other)
Definition: projectorextension.cpp:223
The ProjectorExtension class provides the interface to extend projectors with additional functionalit...
Definition: projectorextension.h:136
ProjectionData projectSparse(const SparseVoxelVolume &volume) override
Provides the functionality to forward project SparseVoxelVolume data.
Definition: projectorextension.cpp:153
std::unique_ptr< ProjectorExtensionType > makeExtension(AbstractProjector *projector=nullptr)
Definition: projectorextension.h:247