#include <QVolRendCanvas.h>
Definition at line 39 of file QVolRendCanvas.h.
QVolRendCanvas::QVolRendCanvas | ( | QWidget * | parent = 0 |
) |
constructor with given parent Widget
parent | Widget |
Definition at line 6 of file QVolRendCanvas.cpp.
References apply_tf_in_sv, apply_tf_in_vv, data_loaded, VVector::getCross(), getSphereProjection(), lside, lup, lview, m_Distance, m_fAngle, m_LookAt, m_MouseState, m_PanOffset, m_Position, m_Rotation, m_vecPosition, m_VolumeRenderer, NO_DRAGGING, VVector::normalize(), VVolumeRenderer::setLightDir(), side, sliceview_active, up, and view.
QVolRendCanvas::~QVolRendCanvas | ( | ) | [virtual] |
standard destructor
Definition at line 54 of file QVolRendCanvas.cpp.
References m_BackgroundColor, m_FramebufferObject, and m_TransferFunction.
void QVolRendCanvas::setObjectName | ( | const QString & | name | ) |
sets the name of the current Object
name | QString containing the widgets name |
Definition at line 68 of file QVolRendCanvas.cpp.
Referenced by Ui_QMain::setupUi().
void QVolRendCanvas::resizeGL | ( | int | w, | |
int | h | |||
) | [virtual] |
method called when resizing
w | width of window | |
h | height of window |
Definition at line 87 of file QVolRendCanvas.cpp.
References VFramebufferObject::init(), m_FramebufferObject, m_SliceRenderer, m_VolumeRenderer, VVolumeRenderer::resize(), VRenderer::setHeight(), VRenderer::setWidth(), and sliceview_active.
Referenced by QMain::watch().
void QVolRendCanvas::paintEvent | ( | QPaintEvent * | e | ) | [virtual] |
method handling the paintEvent
e | Pointer to QPaintEvent |
Definition at line 234 of file QVolRendCanvas.cpp.
void QVolRendCanvas::mousePressEvent | ( | QMouseEvent * | e | ) | [virtual] |
method handling the mousePressEvent
e | Pointer to QMouseEvent |
Definition at line 239 of file QVolRendCanvas.cpp.
References VMouseEvent::getLeftState(), VMouseEvent::getMiddleState(), getMouseEvent(), getPlaneProjection(), VMouseEvent::getPosition(), VVector::getX(), VVector::getY(), VFramebufferObject::init(), m_FramebufferObject, m_MouseState, m_vecPosition, PAN, ROTATE, and ZOOM.
void QVolRendCanvas::mouseReleaseEvent | ( | QMouseEvent * | e | ) | [virtual] |
method handling the mouseReleaseEvent
e | Pointer to QMouseEvent |
Definition at line 274 of file QVolRendCanvas.cpp.
References VFramebufferObject::init(), isfirstframe, m_FramebufferObject, m_MouseState, and NO_DRAGGING.
void QVolRendCanvas::mouseMoveEvent | ( | QMouseEvent * | e | ) | [virtual] |
method handling the mouseMoveEvent
e | Pointer to QMouseEvent |
Definition at line 290 of file QVolRendCanvas.cpp.
References VQuaternion::applyRotationX(), VQuaternion::generateRotationY(), VVolumeRenderer::getCameraSideVector(), VVolumeRenderer::getCameraUpVector(), VVector::getDot(), VQuaternion::getForwardVector(), getMouseEvent(), getPlaneProjection(), VMouseEvent::getPosition(), VQuaternion::getUpVector(), VVector::getX(), VVector::getY(), VVector::getZ(), isfirstframe, lside, lup, lview, m_Distance, m_LookAt, m_modifyLight, m_MouseState, m_PanOffset, m_Rotation, m_vecPosition, m_VolumeRenderer, VVector::normalize(), PAN, VVolumeRenderer::processGuiInput(), ROTATE, VVolumeRenderer::setLightDir(), VVector::setX(), VVector::setY(), VVector::setZ(), side, up, view, and ZOOM.
void QVolRendCanvas::mouseDoubleClickEvent | ( | QMouseEvent * | e | ) | [virtual] |
method handling the mouseDoubleClickEvent
e | Pointer to QMouseEvent |
Definition at line 706 of file QVolRendCanvas.cpp.
References ALL, VQuaternion::applyRotationX(), CORRONAL, VQuaternion::generateRotationY(), VVector::getCross(), VQuaternion::getForwardVector(), getMouseEvent(), VMouseEvent::getPosition(), VSliceRenderer::getSliceMode(), getSphereProjection(), VQuaternion::getUpVector(), VVector::getX(), VVector::getY(), isfirstframe, lside, lup, lview, m_CamDat, m_Distance, m_fAngle, m_LookAt, m_LookAtPoint, m_MouseLastPos, m_PanOffset, m_Position, m_Rotation, m_SliceRenderer, m_vecPosition, m_VolumeRenderer, VVector::normalize(), VVolumeRenderer::processGuiInput(), SAGGITAL, VSliceRenderer::setSliceMode(), side, sliceview_active, TRANSVERSAL, up, and view.
void QVolRendCanvas::keyPressEvent | ( | QKeyEvent * | e | ) | [virtual] |
method handling the keyPressEvent
e | Pointer to QKeyEvent |
Definition at line 789 of file QVolRendCanvas.cpp.
void QVolRendCanvas::keyReleaseEvent | ( | QKeyEvent * | e | ) | [virtual] |
method handling the keyReleaseEvent
e | Pointer to QKeyEvent |
Definition at line 795 of file QVolRendCanvas.cpp.
const VMouseEvent QVolRendCanvas::getMouseEvent | ( | QMouseEvent * | e | ) |
method that converts a QMouseEvent into a VMouseEvent
e | Ptr to QMouseEvent |
Definition at line 801 of file QVolRendCanvas.cpp.
References VMouseEvent::BUTTON_LEFT, VMouseEvent::BUTTON_MIDDLE, VMouseEvent::BUTTON_NONE, VMouseEvent::BUTTON_RIGHT, VKeyboardEvent::MODIFIER_ALT, VKeyboardEvent::MODIFIER_CTRL, VKeyboardEvent::MODIFIER_SHIFT, VMouseEvent::STATE_DOWN, and VMouseEvent::STATE_UP.
Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), and mousePressEvent().
const VKeyboardEvent QVolRendCanvas::getKeyboardEvent | ( | QKeyEvent * | e | ) |
method that converts a QKeyEvent into a VKeybardEvent
e | Ptr to QMouseEvent |
Definition at line 823 of file QVolRendCanvas.cpp.
References VKeyboardEvent::key, VKeyboardEvent::MODIFIER_ALT, VKeyboardEvent::MODIFIER_CTRL, and VKeyboardEvent::MODIFIER_SHIFT.
void QVolRendCanvas::redraw | ( | ) | [virtual] |
void QVolRendCanvas::activate_sliceview | ( | ) | [virtual] |
method called when sliceview is activated
Definition at line 841 of file QVolRendCanvas.cpp.
References sliceview_active.
Referenced by QMain::modetab_switched().
void QVolRendCanvas::activate_volview | ( | ) | [virtual] |
method called when volumeview is activated
Definition at line 846 of file QVolRendCanvas.cpp.
References sliceview_active.
Referenced by QMain::modetab_switched().
void QVolRendCanvas::setActiveSaggitalSlice | ( | int | s | ) |
method setting the current slice
s | current slice |
Definition at line 851 of file QVolRendCanvas.cpp.
References m_SliceRenderer, and VSliceRenderer::setActiveSaggitalSlice().
Referenced by QMain::slicesslider_saggital_valuechanged().
void QVolRendCanvas::setActiveCorronalSlice | ( | int | s | ) |
method setting the current slice
s | current slice |
Definition at line 856 of file QVolRendCanvas.cpp.
References m_SliceRenderer, and VSliceRenderer::setActiveCorronalSlice().
Referenced by QMain::slicesslider_corronal_valuechanged().
void QVolRendCanvas::setActiveTransversalSlice | ( | int | s | ) |
method setting the current slice
s | current slice |
Definition at line 861 of file QVolRendCanvas.cpp.
References m_SliceRenderer, and VSliceRenderer::setActiveTransversalSlice().
Referenced by QMain::slicesslider_transversal_valuechanged().
void QVolRendCanvas::setApplyTFInSV | ( | int | v | ) |
method called when applying tf is called
v | int value if it should be applied |
Definition at line 898 of file QVolRendCanvas.cpp.
References VVolumeRenderer::activate_tf(), VSliceRenderer::activate_tf(), apply_tf_in_sv, apply_tf_in_vv, m_SliceRenderer, and m_VolumeRenderer.
Referenced by QMain::apply_tf_in_slicieviewer(), QMain::tf_menu(), QMain::tf_menu_1d(), QMain::tf_menu_2d(), and QMain::tf_menu_no().
void QVolRendCanvas::setApplyTFInVV | ( | int | v | ) |
method called when applying tf is called
v | int value if it should be applied |
void QVolRendCanvas::setBackColorPtr | ( | VVector * | v | ) |
method that sets a Pointer to the BackgroundColor
v | Ptr to the BackgroundColor |
Definition at line 72 of file QVolRendCanvas.cpp.
References m_BackgroundColor.
Referenced by QMain::QMain().
void QVolRendCanvas::rendermode_changed | ( | int | i | ) |
changes the rendermode
i | index of rendermode |
Definition at line 909 of file QVolRendCanvas.cpp.
References COMB, CURVATURE, DVR_BTF, DVR_FTB, m_RenderMode, m_VolumeRenderer, MIP, and VVolumeRenderer::setRenderMode().
Referenced by QMain::rendermode_changed().
void QVolRendCanvas::lightmode_changed | ( | int | i | ) |
changes the lightmode
i | index of lightmode |
Definition at line 946 of file QVolRendCanvas.cpp.
References m_LightMode, m_VolumeRenderer, METAL, PHONG, VVolumeRenderer::setLightMode(), and TOON.
Referenced by QMain::lightmode_changed().
bool QVolRendCanvas::getLoaded | ( | ) | [inline] |
returns if data is loaded
Definition at line 198 of file QVolRendCanvas.h.
References data_loaded.
Referenced by VTransferFunction::draw1d().
void QVolRendCanvas::setTransferFunctionPtr | ( | VTransferFunction * | transfunc | ) |
sets the pointer to the Transferfunction
transfunc | VTransferFunction Ptr |
Definition at line 990 of file QVolRendCanvas.cpp.
References m_TransferFunction, and VTransferFunction::setMainCanvas().
Referenced by QMain::QMain().
void QVolRendCanvas::setTransferFunction2DPtr | ( | VTransferFunction2D * | transfunc | ) |
sets the pointer to the 2D Transferfunction
transfunc | VTransferFunction2D Ptr |
Definition at line 996 of file QVolRendCanvas.cpp.
References m_TransferFunction2D, and VTransferFunction2D::setMainCanvas().
Referenced by QMain::QMain().
void QVolRendCanvas::flipX | ( | ) |
flips the Volume in X direction
Definition at line 1011 of file QVolRendCanvas.cpp.
References VVolume::flipVolumeX(), and m_Volume.
Referenced by QMain::flipX().
void QVolRendCanvas::flipY | ( | ) |
flips the Volume in Y direction
Definition at line 1017 of file QVolRendCanvas.cpp.
References VVolume::flipVolumeY(), and m_Volume.
Referenced by QMain::flipY().
void QVolRendCanvas::flipZ | ( | ) |
flips the volume in Z direction
Definition at line 1023 of file QVolRendCanvas.cpp.
References VVolume::flipVolumeZ(), and m_Volume.
Referenced by QMain::flipZ().
void QVolRendCanvas::modifyLight | ( | bool | val | ) |
sets if the light should be modified
val | if enabled |
Definition at line 1028 of file QVolRendCanvas.cpp.
References m_modifyLight.
Referenced by QMain::lightModification().
void QVolRendCanvas::setContourMode | ( | bool | val | ) |
sets if the contour mode is enabled
val | if enabled |
Definition at line 1034 of file QVolRendCanvas.cpp.
References m_VolumeRenderer, and VVolumeRenderer::setContours().
Referenced by QMain::setContourMode().
void QVolRendCanvas::setShadowMode | ( | bool | val | ) |
sets if the shadow mode is enabled
val | if enabled |
Definition at line 1039 of file QVolRendCanvas.cpp.
References m_VolumeRenderer, and VVolumeRenderer::setShadows().
Referenced by QMain::setShadowMode().
void QVolRendCanvas::setClipPlane | ( | PlanePosition | plane, | |
float | value | |||
) | [inline] |
sets the current clip planes position
plane | which plane | |
value | value of plane |
Definition at line 250 of file QVolRendCanvas.h.
References m_VolumeRenderer, and VVolumeRenderer::setClipPlane().
Referenced by QMain::clipcb_xneg_clicked(), QMain::clipcb_xpos_clicked(), QMain::clipcb_yneg_clicked(), QMain::clipcb_ypos_clicked(), QMain::clipcb_zneg_clicked(), QMain::clipcb_zpos_clicked(), QMain::clipxneg_valuechanged(), QMain::clipxpos_valuechanged(), QMain::clipyneg_valuechanged(), QMain::clipypos_valuechanged(), QMain::clipzneg_valuechanged(), and QMain::clipzpos_valuechanged().
bool QVolRendCanvas::load_data | ( | QString | filename, | |
int * | volsize | |||
) | [virtual] |
loads the chosen data
filename | filename of data | |
volsize | Ptr to size of Volume |
Definition at line 866 of file QVolRendCanvas.cpp.
References VVolume::clear(), data_loaded, VVolume::loadVolume(), m_SliceRenderer, m_TransferFunction, m_Volume, m_VolumeRenderer, VVolumeRenderer::resetProxyGeometry(), VTransferFunction::setMaxHist(), VVolumeRenderer::setVolume(), and VSliceRenderer::setVolume().
Referenced by QMain::load_data_file().
bool QVolRendCanvas::save_data | ( | std::string | filename | ) |
saves data to the given file
filename | location of file |
Definition at line 893 of file QVolRendCanvas.cpp.
References m_Volume, and VVolume::saveVolume().
Referenced by QMain::save_data_file().
void QVolRendCanvas::saveImage | ( | std::string | filename | ) | [virtual] |
saves the current image to disc
filename | location of file |
Definition at line 1002 of file QVolRendCanvas.cpp.
References m_FramebufferObject, and VFramebufferObject::saveImage().
Referenced by QMain::save_image().
void QVolRendCanvas::setOrthoProjection | ( | bool | m_orth | ) |
enables/disables Orthographical projection
m_orth | if enabled |
Definition at line 975 of file QVolRendCanvas.cpp.
References m_VolumeRenderer, and VVolumeRenderer::setOrthoMode().
Referenced by QMain::projectionMode().
std::vector< int > * QVolRendCanvas::getDataHistogram | ( | ) |
returns a pointer to the Histogram
Definition at line 980 of file QVolRendCanvas.cpp.
References VVolume::getHistogramPtr(), and m_Volume.
Referenced by QMain::load_data_file().
unsigned char * QVolRendCanvas::getData2DHistogram | ( | ) |
returns a pointer to the 2D Histogram
Definition at line 985 of file QVolRendCanvas.cpp.
References VVolume::get2DHistogramPtr(), and m_Volume.
Referenced by QMain::load_data_file().
void QVolRendCanvas::initializeGL | ( | ) | [protected, virtual] |
method to initialise opengl
Definition at line 76 of file QVolRendCanvas.cpp.
void QVolRendCanvas::paintGL | ( | ) | [protected, virtual] |
method called when repainting
Definition at line 133 of file QVolRendCanvas.cpp.
References VFramebufferObject::bind(), data_loaded, VVolumeRenderer::draw(), VSliceRenderer::draw(), VVolumeRenderer::drawBackFaces(), VVolumeRenderer::drawFrontFaces(), VTransferFunction2D::getGLHandle(), VTransferFunction::getGLHandle(), VVolumeRenderer::getProgramLoaded(), VSliceRenderer::getProgramLoaded(), VVector::getX(), VVector::getY(), VVector::getZ(), VFramebufferObject::init(), VVolumeRenderer::loadProgram(), VSliceRenderer::loadProgram(), m_BackgroundColor, m_FramebufferObject, m_SliceRenderer, m_TransferFunction, m_TransferFunction2D, m_VolumeRenderer, VFramebufferObject::renderToFullScreen(), VVolumeRenderer::setClearColor(), VVolumeRenderer::setTransferFunction2DHandle(), VVolumeRenderer::setTransferFunctionHandle(), VSliceRenderer::setTransferFunctionHandle(), sliceview_active, and VFramebufferObject::unbind().
Referenced by redraw().
VVector QVolRendCanvas::getSphereProjection | ( | float | x, | |
float | y | |||
) | [private] |
method that projects a window position onto a sphere
x | dimension of the window | |
y | dimension of the window |
Definition at line 111 of file QVolRendCanvas.cpp.
References VVector::getX(), VVector::getY(), VVector::normalize(), VVector::setX(), VVector::setY(), and VVector::setZ().
Referenced by mouseDoubleClickEvent(), and QVolRendCanvas().
VVector QVolRendCanvas::getPlaneProjection | ( | float | x, | |
float | y | |||
) | [private] |
method that projects a window position onto a plane
x | dimension of the window | |
y | dimension of the window |
Definition at line 123 of file QVolRendCanvas.cpp.
References VVector::setX(), VVector::setY(), and VVector::setZ().
Referenced by mouseMoveEvent(), and mousePressEvent().
loaded Volume.
Definition at line 293 of file QVolRendCanvas.h.
Referenced by flipX(), flipY(), flipZ(), getData2DHistogram(), getDataHistogram(), load_data(), and save_data().
slice renderer.
Definition at line 294 of file QVolRendCanvas.h.
Referenced by load_data(), mouseDoubleClickEvent(), paintGL(), resizeGL(), setActiveCorronalSlice(), setActiveSaggitalSlice(), setActiveTransversalSlice(), and setApplyTFInSV().
volume renderer.
Definition at line 295 of file QVolRendCanvas.h.
Referenced by lightmode_changed(), load_data(), mouseDoubleClickEvent(), mouseMoveEvent(), paintGL(), QVolRendCanvas(), rendermode_changed(), resizeGL(), setApplyTFInSV(), setClipPlane(), setContourMode(), setOrthoProjection(), setShadowMode(), QMain::thresholdvalH_valuechanged(), and QMain::thresholdvalL_valuechanged().
Pointer to the 1D Transferfunction.
Definition at line 296 of file QVolRendCanvas.h.
Referenced by load_data(), paintGL(), setTransferFunctionPtr(), and ~QVolRendCanvas().
Pointer to the 2D Transferfunction.
Definition at line 297 of file QVolRendCanvas.h.
Referenced by paintGL(), and setTransferFunction2DPtr().
float QVolRendCanvas::m_bgColor[4] |
Color of Background.
Definition at line 299 of file QVolRendCanvas.h.
Up Vector of Camera.
Definition at line 301 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), and QVolRendCanvas().
View Vector of Camera.
Definition at line 302 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), and QVolRendCanvas().
Side Vector of Camera.
Definition at line 303 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), and QVolRendCanvas().
Up Vector of Light.
Definition at line 305 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), and QVolRendCanvas().
View Vector of Light.
Definition at line 306 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), and QVolRendCanvas().
Side Vector of Light.
Definition at line 307 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), and QVolRendCanvas().
Direction of Light.
Definition at line 309 of file QVolRendCanvas.h.
if light is modified.
Definition at line 310 of file QVolRendCanvas.h.
Referenced by modifyLight(), and mouseMoveEvent().
Image only for testing.
Definition at line 312 of file QVolRendCanvas.h.
bool QVolRendCanvas::sliceview_active [private] |
if sliceview is active.
Definition at line 344 of file QVolRendCanvas.h.
Referenced by activate_sliceview(), activate_volview(), mouseDoubleClickEvent(), paintGL(), QVolRendCanvas(), and resizeGL().
bool QVolRendCanvas::data_loaded [private] |
if data is loaded.
Definition at line 345 of file QVolRendCanvas.h.
Referenced by getLoaded(), load_data(), paintGL(), and QVolRendCanvas().
int QVolRendCanvas::apply_tf_in_sv [private] |
if tf should be applied in sliceviewer.
Definition at line 346 of file QVolRendCanvas.h.
Referenced by QVolRendCanvas(), and setApplyTFInSV().
int QVolRendCanvas::apply_tf_in_vv [private] |
if tf should be applied in volumeviewer.
Definition at line 347 of file QVolRendCanvas.h.
Referenced by QVolRendCanvas(), and setApplyTFInSV().
Pointer to the main FBO.
Definition at line 348 of file QVolRendCanvas.h.
Referenced by mousePressEvent(), mouseReleaseEvent(), paintGL(), resizeGL(), saveImage(), and ~QVolRendCanvas().
VVector* QVolRendCanvas::m_BackgroundColor [private] |
Pointer to the Backgroundcolor.
Definition at line 349 of file QVolRendCanvas.h.
Referenced by paintGL(), setBackColorPtr(), and ~QVolRendCanvas().
VVector QVolRendCanvas::m_MouseLastPos [private] |
Position of the mouse when it was last sampled.
Definition at line 350 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent().
MouseState QVolRendCanvas::m_MouseState [private] |
Current Mousestate.
Definition at line 352 of file QVolRendCanvas.h.
Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and QVolRendCanvas().
RenderMode QVolRendCanvas::m_RenderMode [private] |
Current Rendermode.
Definition at line 353 of file QVolRendCanvas.h.
Referenced by rendermode_changed().
LightMode QVolRendCanvas::m_LightMode [private] |
VVector QVolRendCanvas::m_CamDat [private] |
< Current LightMode. stores x,y = rotation along x,y axis, z stores the distance.
Definition at line 356 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent().
VVector QVolRendCanvas::m_LookAtPoint [private] |
Lookat Point of the Camera.
Definition at line 357 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent().
VVector QVolRendCanvas::m_Position [private] |
Position of the Camera.
Definition at line 359 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent(), and QVolRendCanvas().
VVector QVolRendCanvas::m_LookAt [private] |
Direction where camera looks at.
Definition at line 360 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), and QVolRendCanvas().
float QVolRendCanvas::m_Distance [private] |
distance of Camera to the origin.
Definition at line 361 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), and QVolRendCanvas().
VVector QVolRendCanvas::m_vecPosition [private] |
Vector containing the position.
Definition at line 362 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), and QVolRendCanvas().
VVector QVolRendCanvas::m_PanOffset [private] |
Vector containing the Panoffset.
Definition at line 363 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), and QVolRendCanvas().
VVector QVolRendCanvas::m_Rotation [private] |
Current Camera Rotation.
Definition at line 365 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), and QVolRendCanvas().
float QVolRendCanvas::m_fAngle [private] |
Current angle of Camera.
Definition at line 366 of file QVolRendCanvas.h.
Referenced by mouseDoubleClickEvent(), and QVolRendCanvas().