CTL
0.6.1
Computed Tomography Library
|
The AcquisitionSetupView class provides a tool for visualization of an AcquisitionSetup. More...
#include <acquisitionsetupview.h>
Public Slots | |
void | addViewVisualization (int view) |
void | animateAcquisition (int msPerView, uint leaveOut=0) |
void | setAnimationStacking (bool enabled) |
void | setSourceOnly (bool enabled) |
void | showFullAcquisition (uint leaveOut=0) |
void | showSourceTrajectory () |
void | showView (int view) |
![]() | |
void | clearScene () |
void | resetCamera () |
void | resetView () |
Public Member Functions | |
AcquisitionSetupView (QWidget *parent=nullptr, float visualScale=50.0f) | |
void | setAcquisitionSetup (AcquisitionSetup acqSetup) |
void | setData (AcquisitionSetup acqSetup) |
![]() | |
CTSystemView (QWidget *parent=nullptr, float visualScale=50.0f) | |
void | setCTSystem (const SimpleCTSystem &system) |
void | setData (const SimpleCTSystem &system) |
void | addSystemVisualization (const SimpleCTSystem &system) |
void | addVolume (const VoxelVolume< uchar > &volume) |
Static Public Member Functions | |
static void | plot (AcquisitionSetup setup, uint maxNbViews=100, bool sourceOnly=false, float visualScale=50.0f) |
![]() | |
static void | plot (const SimpleCTSystem &system, float visualScale=50.0f) |
Private Slots | |
void | updateAnimation () |
Private Attributes | |
AcquisitionSetup | _setup |
QTimer * | _animTimer |
uint | _animCurrentView |
uint | _animLeaveOut |
bool | _stackAnimation = false |
bool | _sourceOnly = false |
Additional Inherited Members | |
![]() | |
void | addBoxObject (const QVector3D &dimensions, const QVector3D &translation, const QQuaternion &rotation, Qt3DRender::QMaterial *material=nullptr) |
void | addBallObject (float radius, const QVector3D &translation, Qt3DRender::QMaterial *material=nullptr) |
void | addDetectorComponent (AbstractGantry *gantry, AbstractDetector *detector) |
void | addSourceComponent (AbstractGantry *gantry, AbstractSource *source) |
![]() | |
QGridLayout * | _mainLayout |
details::CTL3DWindow * | _view |
Qt3DCore::QEntity * | _rootEntity |
The AcquisitionSetupView class provides a tool for visualization of an AcquisitionSetup.
This class enhances the capabilities of CTSystemView, such that it can be used to visualize an AcquisitionSetup. For convenience, the plot() method can be used to achieve a one-line solution, creating a widget that will be destroyed once it is closed by the user.
The following IO operations are supported by this widget:
The setup to be visualized is set via setAcquisitionSetup(). Visualization can be done in two conceptually different ways: static or animated. As a static visualization, the system configuration (ie. source and detector component) can be shown simultaneously for all views in the setup (or with leaving out some views in between) using showFullAcquisition(). It is also possible to visualize only the source component with showSourceTrajectory(). The setup can also be visualized by an animation. Calling animateAcquisition() with a certain time interval will show the system configuration for a single view and proceed to the next view after the specified time interval has passed. You can enable animation stacking using setAnimationStacking() to keep all previous system configurations in the scene during animation. When setSourceOnly() is enabled, only the source component will be shown during animation of the setup.
Example:
|
explicit |
Creates an AcquisitionSetupView and sets its parent to parent.
If specified, sets the scaling for the visual appearance of components within the scene to visualScale.
|
slot |
Adds the visualization of the setup in its configuration for the view index view to the scene. If "Source only" (see setSourceOnly()) mode has been enabled, only the source component will be drawn.
Example: create a visualization of two views from a short scan trajectory with a C-arm system
|
slot |
Shows an animation of the current acquisition setup of this instance. This will draw a visualization of one view from the setup every msPerView milliseconds. If required, views can be skipped by passing to leaveOut the desired number of views to be skipped in between two visualized configurations.
The total animation time will be \( t = \left \lfloor{(N / (1 + leaveOut))}\right \rfloor\cdot msPerView \), where \(N\) denotes the total number of views in the setup.
All settings made for this instance apply to this command. In particular, that means if "Source only" mode has been enabled, only the source component will appear in the animation; and in case "Animation stacking" has been enabled, all system configurations are superimposed in the scene.
Note that you still need to show() the widget.
Example: create an animation of a wobble scan trajectory with a C-arm system
|
static |
Creates an AcquisitionSetupView for visualization of setup and shows the window.
The visualization will show a superposition of all views in setup. The total number of views shown in the scene can be limited by maxNbViews. If desired, only the source positions can be drawn by passing true
to sourceOnly. The scaling for the visual appearance of components within the scene can be changed with visualScale (see CTSystemView::plot() for an example).
The widget will be deleted automatically if the window is closed.
Example: create visualizations of a (100 view) short scan trajectory with a C-arm system
void CTL::gui::AcquisitionSetupView::setAcquisitionSetup | ( | AcquisitionSetup | acqSetup | ) |
Sets the AcquisitionSetup visualized by this instance to acqSetup; the passed setup is copied. This replaces any previously set system.
By default, this shows the visualization of the setup's configuration prepared for the first view in acqSetup. To change the visualization of the system, use one of the following methods: showView(), addViewVisualization(), showFullAcquisition(), showSourceTrajectory(), or animateAcquisition().
|
slot |
Sets the "Animation stacking" mode to enabled. When enabled before calling animateAcquisition(), this mode causes all system configurations to be superimposed in the animation's scene.
void CTL::gui::AcquisitionSetupView::setData | ( | AcquisitionSetup | acqSetup | ) |
Convenience overload. Same as setAcquisitionSetup(acqSetup).
|
slot |
Sets the "Source only" mode to enabled. In "Source only" mode, all visualization commands will only show the source component of the system. This might be useful to prevent cluttered scenes.
Example: helical trajectory with and without "Source only" mode
Source only" mode ((a)-(d) window size and zoom adjusted; (c) and (d) camera moved)." Source only" mode ((a)-(d) window size and zoom adjusted; (c) and (d) camera moved)." Source only" mode ((a)-(d) window size and zoom adjusted; (c) and (d) camera moved)." Source only" mode ((a)-(d) window size and zoom adjusted; (c) and (d) camera moved)."
|
slot |
Visualizes the current acquisition setup of this instance as a superposition of all views from the setup. If required, views can be left out by passing to leaveOut the desired number of views to be skipped in between two visualized configurations.
The total number of configurations shown in the scene will be \( \left \lfloor{(N / (1 + leaveOut))}\right \rfloor \), where \(N\) denotes the total number of views in the setup.
"Source only" mode applies to this command. See setSourceOnly() for details.
Note that you still need to show() the widget.
Example: visualize a wobble scan trajectory of a C-arm system
|
slot |
Visualizes the current acquisition setup of this instance in "Source only" mode.
Example: See setSourceOnly().
|
slot |
Visualizes the system configuration prepared for view index view. This replaces all previous visualizations in the scene.
"Source only" mode applies to this command. See setSourceOnly() for details.
|
privateslot |
Connected to the animation timer. Everytime the timer times out, this prepares the next view (increment depending on _animLeaveOut
) and initiates the appropriate visualization; this considers all settings such as "Source only" mode and "Animation stacking".