#include <TFWidget.h>
Signals | |
| void | functionChanged (float *data) |
Public Member Functions | |
| TFWidget (QWidget *parent=0) | |
| Initializes TFWidget. | |
| int | angle () const |
| void | addMode () |
| Sets mode to true so that vertex-add-mode is activated. | |
| void | delMode () |
| Sets mode to false so that vertex-delete-mode is activated. | |
| void | resetTF () |
| Resets all parameters in TFWidget to initial values. | |
| void | save (QFile *file) |
| Saves the current transfer function to a file. | |
| void | load (QFile *file) |
| Loads a transfer function file. | |
Public Attributes | |
| QPoint | posi |
Protected Member Functions | |
| void | paintEvent (QPaintEvent *event) |
| Paints a visualization of interpolated vertex colors. | |
| void | mousePressEvent (QMouseEvent *event) |
| Checks if the click area contains an existing vertex and stores the index of this vertex in poly. | |
| void | mouseReleaseEvent (QMouseEvent *event) |
| Draws or deletes vertices according to mode. Edits vertex colors in case of right click. | |
| void | createClickArea (int x, int y) |
| Creates polygon around click position with specified size (areaSize). | |
| void | prepareTF () |
| Transforms the transfer function into a float array that can be directly used for generating the transfer function texture. | |
Private Attributes | |
| int | currentAngle |
| int | currentAngley |
| QPolygon | poly |
| QPolygon | tempPoly |
| QSize | size |
| bool | drawn |
| bool | vertexSelected |
| QPoint | selectedVertex |
| QPolygon | clickArea |
| int | selectedIndex |
| int | areaSize |
| int | areaHeight |
| int | areaWidth |
| int | xcoord |
| int | ycoord |
| bool | mode |
| bool | dataSet |
| QVector< QColor > | vertexColors |
| QVector< QLine > | histoLines |
| float | data [4096 *3] |
| QMap< int, QVector< int > > | tf |
| TFWidget::TFWidget | ( | QWidget * | parent = 0 |
) |
Initializes TFWidget.
Sets initial polyline at left and right border with black and white as vertex colors.
| void TFWidget::addMode | ( | ) |
Sets mode to true so that vertex-add-mode is activated.
| int TFWidget::angle | ( | ) | const [inline] |
| void TFWidget::createClickArea | ( | int | x, | |
| int | y | |||
| ) | [protected] |
Creates polygon around click position with specified size (areaSize).
| x | x-pos around which area is created. | |
| y | y-pos around which area is created. |
| void TFWidget::delMode | ( | ) |
Sets mode to false so that vertex-delete-mode is activated.
| void TFWidget::functionChanged | ( | float * | data | ) | [signal] |
| void TFWidget::load | ( | QFile * | file | ) |
Loads a transfer function file.
| file | Receives a pointer to a QFile. |
| void TFWidget::mousePressEvent | ( | QMouseEvent * | event | ) | [protected] |
Checks if the click area contains an existing vertex and stores the index of this vertex in poly.
| event | contains information about mousePressEvent. |
| void TFWidget::mouseReleaseEvent | ( | QMouseEvent * | event | ) | [protected] |
Draws or deletes vertices according to mode. Edits vertex colors in case of right click.
| event | contains information about mouseReleaseEvent. |
| void TFWidget::paintEvent | ( | QPaintEvent * | event | ) | [protected] |
Paints a visualization of interpolated vertex colors.
| void TFWidget::prepareTF | ( | ) | [protected] |
Transforms the transfer function into a float array that can be directly used for generating the transfer function texture.
The values between vertices are interpolated and saved to an array that is returned to volGLWidget.
| void TFWidget::resetTF | ( | ) |
Resets all parameters in TFWidget to initial values.
| void TFWidget::save | ( | QFile * | file | ) |
Saves the current transfer function to a file.
| file | points to a QFile object |
int TFWidget::areaHeight [private] |
int TFWidget::areaSize [private] |
int TFWidget::areaWidth [private] |
QPolygon TFWidget::clickArea [private] |
int TFWidget::currentAngle [private] |
int TFWidget::currentAngley [private] |
float TFWidget::data[4096 *3] [private] |
bool TFWidget::dataSet [private] |
bool TFWidget::drawn [private] |
QVector<QLine> TFWidget::histoLines [private] |
bool TFWidget::mode [private] |
QPolygon TFWidget::poly [private] |
| QPoint TFWidget::posi |
int TFWidget::selectedIndex [private] |
QPoint TFWidget::selectedVertex [private] |
QSize TFWidget::size [private] |
QPolygon TFWidget::tempPoly [private] |
QMap<int, QVector <int> > TFWidget::tf [private] |
QVector<QColor> TFWidget::vertexColors [private] |
bool TFWidget::vertexSelected [private] |
int TFWidget::xcoord [private] |
int TFWidget::ycoord [private] |
1.5.7.1