#include <CommandFactory.h>
Public Types | |
enum | CommandType { OPEN_VOLUME_DATA, EXIT, RENDER, RENDER_HIRES, SET_RENDER_MODE_TO_SLICING, SET_RENDER_MODE_TO_MIP, SET_RENDER_MODE_TO_AVERAGING, SET_RENDER_MODE_TO_FIRSTHIT, SET_RENDER_MODE_TO_COMPOSITING, SET_SLICING_AXIS_TO_XY, SET_SLICING_AXIS_TO_YZ, SET_SLICING_AXIS_TO_XZ, OPEN_TRANSFER_FUNCTION, SAVE_TRANSFER_FUNCTION, OPEN_GRADIENT_TRANSFER_FUNCTION, SAVE_GRADIENT_TRANSFER_FUNCTION, UPDATE_SLICING_PARAMETERS, UPDATE_MIP_PARAMETERS, UPDATE_AVERAGING_PARAMETERS, UPDATE_FIRSTHIT_PARAMETERS, UPDATE_COMPOSITING_PARAMETERS, UPDATE_LIGHTING, UPDATE_CLIPPING, RESET_TRANSFORMATIONS, SCREENSHOT, STILL_HIGH_QUALITY_RENDERING, STILL_LOW_QUALITY_RENDERING, MOTION_RENDERING, RESIZE_WINDOW, HIGH_RESOLUTION, DO_NOTHING } |
enum | RenderType { SLICING, MIP, AVERAGING, FIRSTHIT, COMPOSITING } |
Static Public Member Functions | |
static void | bindAveragingParameters (QDoubleSpinBox *stepSize, QCheckBox *tf, QCheckBox *gradientTf) |
static void | bindClippingParameters (QGroupBox *xyBox, QGroupBox *xzBox, QGroupBox *yzBox, QCheckBox *xyNegative, QCheckBox *xzNegative, QCheckBox *yzNegative, QDoubleSpinBox *xyTranslate, QDoubleSpinBox *xzTranslate, QDoubleSpinBox *yzTranslate) |
static void | bindCompositingParameters (QDoubleSpinBox *stepSize, QCheckBox *tf, QCheckBox *gradientTf, QGroupBox *depthCueing, QDoubleSpinBox *k1, QDoubleSpinBox *k2, QCheckBox *usePhong, QDoubleSpinBox *jitter) |
static void | bindFirstHitParameters (QDoubleSpinBox *stepSize, QCheckBox *tf, QCheckBox *gradientTf, QSlider *threshold, QCheckBox *usePhong) |
static void | bindGradientTFWidget (Gui::TFWidget *tf) |
static void | bindHiResParameters (QSpinBox *w, QSpinBox *h) |
static void | bindHistogram2d (Gui::Histogram2d *histogram2d) |
static void | bindLightingParameters (QSlider *ambient, QSlider *diffuse, QSlider *specular, QSlider *shininess, QDoubleSpinBox *xLight, QDoubleSpinBox *yLight, QDoubleSpinBox *zLight) |
static void | bindMainWindow (Gui::MainWindow *window) |
static void | bindMipParameters (QDoubleSpinBox *stepSize, QCheckBox *tf, QCheckBox *gradientTf) |
static void | bindProgressBar (QProgressBar *progress) |
static void | bindRaycasting (VolumeRendering::Raycasting *raycasting) |
static void | bindRendering (RenderType type, VolumeRendering::Rendering *rendering) |
static void | bindRenderWidget (Gui::RenderWidget *widget) |
static void | bindSlicingParameters (QSlider *ratio, QCheckBox *tf, QSlider *angle, QDoubleSpinBox *x, QDoubleSpinBox *y, QDoubleSpinBox *z) |
static void | bindTFWidget (Gui::TFWidget *tf) |
static void | bindVolume (VolumeRendering::VolumeData *data) |
static Command * | createCommand (CommandType t) |
static void | deleteCommands () |
static Command * | getCommand (CommandType t) |
New commands are defined by an item of this enumeration. For each of these command types only one command object will be generated.
This enumeration is e.g. used for binding render modes.
static void VolVis::Commands::CommandFactory::bindAveragingParameters | ( | QDoubleSpinBox * | stepSize, | |
QCheckBox * | tf, | |||
QCheckBox * | gradientTf | |||
) | [static] |
The parameters for editing the render mode averaging
stepSize | size of one raycasting step | |
tf | the checkbox contains the boolean value for enabling or disabling the tranfer function for density values | |
gradientTf | not used for the render mode avering |
static void VolVis::Commands::CommandFactory::bindClippingParameters | ( | QGroupBox * | xyBox, | |
QGroupBox * | xzBox, | |||
QGroupBox * | yzBox, | |||
QCheckBox * | xyNegative, | |||
QCheckBox * | xzNegative, | |||
QCheckBox * | yzNegative, | |||
QDoubleSpinBox * | xyTranslate, | |||
QDoubleSpinBox * | xzTranslate, | |||
QDoubleSpinBox * | yzTranslate | |||
) | [static] |
The parameters for defining clipping planes
xyBox | defines if the xy clipping plane is enabled | |
xzBox | defines if the xz clipping plane is enabled | |
yzBox | defines if the yz clipping plane is enabled | |
xyNegative | defines the direction of clipping of the xy plane | |
xzNegative | defines the direction of clipping of the xz plane | |
yzNegative | defines the direction of clipping of the yz plane | |
xyTranslate | translation of the xy plane | |
xzTranslate | translation of the xz plane | |
yzTranslate | translation of the yz plane |
static void VolVis::Commands::CommandFactory::bindCompositingParameters | ( | QDoubleSpinBox * | stepSize, | |
QCheckBox * | tf, | |||
QCheckBox * | gradientTf, | |||
QGroupBox * | depthCueing, | |||
QDoubleSpinBox * | k1, | |||
QDoubleSpinBox * | k2, | |||
QCheckBox * | usePhong, | |||
QDoubleSpinBox * | jitter | |||
) | [static] |
The parameters for editing the compositing raycasting mode
stepSize | size of one raycasting step | |
tf | the checkbox contains the boolean value for enabling or disabling the tranfer function for density values | |
gradientTf | the checkbox contains the boolean value for enabling or disabling the tranfer function for gradient magnitude values | |
depthCueing | is depth cueing enabled | |
k1 | contains the first value for depth cueing | |
k2 | contains the second value for depth cueing | |
usePhong | is the phong reflection model enabled | |
jitter | defines the multiplier of stochastic jittering offsets |
static void VolVis::Commands::CommandFactory::bindFirstHitParameters | ( | QDoubleSpinBox * | stepSize, | |
QCheckBox * | tf, | |||
QCheckBox * | gradientTf, | |||
QSlider * | threshold, | |||
QCheckBox * | usePhong | |||
) | [static] |
The parameters for editing the first hit raycasting mode
stepSize | size of one raycasting step | |
threshold | minimum intensity threshold | |
tf | the checkbox contains the boolean value for enabling or disabling the tranfer function for density values | |
gradientTf | the checkbox contains the boolean value for enabling or disabling the tranfer function for gradient magnitude values | |
usePhong | is the phong reflection model enabled |
static void VolVis::Commands::CommandFactory::bindGradientTFWidget | ( | Gui::TFWidget * | tf | ) | [static] |
The TransferFunction Widget for the gradient needs to be updated at various events, e.g. when loading a new volume.
tf | TFWidget provides a gui for editing the transfer function for the gradient |
static void VolVis::Commands::CommandFactory::bindHiResParameters | ( | QSpinBox * | w, | |
QSpinBox * | h | |||
) | [static] |
These editing fields are necessary when a high resolution image is rendered.
w | field which defines the width of the high resolution image | |
h | field which defines the height of the high resolution image |
static void VolVis::Commands::CommandFactory::bindHistogram2d | ( | Gui::Histogram2d * | histogram2d | ) | [static] |
The OpenGL widget used for displaying the 2d histogram of a volume needs to be updated when a new volume is loaded.
histogram2d | widget which displays the 2d histogram (intensity and gradient magnitude) |
static void VolVis::Commands::CommandFactory::bindLightingParameters | ( | QSlider * | ambient, | |
QSlider * | diffuse, | |||
QSlider * | specular, | |||
QSlider * | shininess, | |||
QDoubleSpinBox * | xLight, | |||
QDoubleSpinBox * | yLight, | |||
QDoubleSpinBox * | zLight | |||
) | [static] |
The parameters for changing the lighting conditions and the material properties which are used by several render modes
ambient | ambient term of material | |
diffuse | diffuse term of material | |
specular | specular term of material | |
shininess | shininess term of material | |
xLight | x position of light source | |
yLight | y position of light source | |
zLight | z position of light source |
static void VolVis::Commands::CommandFactory::bindMainWindow | ( | Gui::MainWindow * | window | ) | [static] |
The MainWindow is e.g. needed for the ExitCommand.
window | The main window which is bound to the factory and may be needed by new commands. |
static void VolVis::Commands::CommandFactory::bindMipParameters | ( | QDoubleSpinBox * | stepSize, | |
QCheckBox * | tf, | |||
QCheckBox * | gradientTf | |||
) | [static] |
The parameters for editing the render mode maximum intensity projection
stepSize | size of one raycasting step | |
tf | the checkbox contains the boolean value for enabling or disabling the tranfer function for density values | |
gradientTf | the checkbox contains the boolean value for enabling or disabling the tranfer function for gradient magnitude values |
static void VolVis::Commands::CommandFactory::bindProgressBar | ( | QProgressBar * | progress | ) | [static] |
The progress bar is mainly used when a new volume is loaded
progress | the progress bar which should be enabled and updated when long operations are done (e.g. loading volume data) |
static void VolVis::Commands::CommandFactory::bindRaycasting | ( | VolumeRendering::Raycasting * | raycasting | ) | [static] |
This raycasting object is used by all render modes using raycasting.
raycasting | Raycasting object for all raycasting render modes. |
static void VolVis::Commands::CommandFactory::bindRendering | ( | RenderType | type, | |
VolumeRendering::Rendering * | rendering | |||
) | [static] |
The render modes are e.g. needed for the SetRenderModeCommand.
type | render mode of the current render mode | |
rendering | the render mode which is bound to the factory |
static void VolVis::Commands::CommandFactory::bindRenderWidget | ( | Gui::RenderWidget * | widget | ) | [static] |
The RenderWidget is e.g. needed for the SetRenderModeCommand.
widget | The render widget which is bound to the factory and may be needed by new commands. |
static void VolVis::Commands::CommandFactory::bindSlicingParameters | ( | QSlider * | ratio, | |
QCheckBox * | tf, | |||
QSlider * | angle, | |||
QDoubleSpinBox * | x, | |||
QDoubleSpinBox * | y, | |||
QDoubleSpinBox * | z | |||
) | [static] |
The parameters for editing the slicing render mode including e.g. the plane rotation fields and the checkbox for the transfer function.
ratio | slider which sets the ratio of the slicing | |
angle | line edit where the angle is defined | |
x | line edit where the x-value of the rotation axis is defined | |
y | line edit where the y-value of the rotation axis is defined | |
z | line edit where the z-value of the rotation axis is defined | |
tf | the checkbox contains the boolean value for enabling or disabling the tranfer function |
static void VolVis::Commands::CommandFactory::bindTFWidget | ( | Gui::TFWidget * | tf | ) | [static] |
The TransferFunction Widget for the intensity needs to be updated at various events, e.g. when loading a new volume.
tf | TFWidget provides a gui for editing the transfer function for the intensity |
static void VolVis::Commands::CommandFactory::bindVolume | ( | VolumeRendering::VolumeData * | data | ) | [static] |
The VolumeData is e.g. needed for the OpenVolumeDataCommand.
data | The VolumeData which is bound to the factory and may be needed by new commands. |
static Command* VolVis::Commands::CommandFactory::createCommand | ( | CommandType | t | ) | [static] |
A new command of this type is creates. If already one exists, the old one is deleted. This ensures, that the returned command is equipped with the up-to-date objects.
t | The command type defines which command is created |
static void VolVis::Commands::CommandFactory::deleteCommands | ( | ) | [static] |
All previously generated commands are deleted.
static Command* VolVis::Commands::CommandFactory::getCommand | ( | CommandType | t | ) | [static] |
If already a command of this type exists, it is returned. Otherwise a new command of the passed command type is generated. If no appropriate command is found, the factory chooses the DoNothingCommand.
t | enum which defines the type of the new command |