|
| | QmitkColorTransferFunctionCanvas (QWidget *parent=nullptr, Qt::WindowFlags f={}) |
| | Construct the color transfer function canvas. More...
|
| |
| void | paintEvent (QPaintEvent *e) override |
| | Paint the color gradient, handles, title, and min/max labels. More...
|
| |
| int | GetNearHandle (int x, int y, unsigned int maxSquaredDistance=100) override |
| | Find a handle near the given canvas position. More...
|
| |
| void | SetTitle (const QString &title) |
| | Set the title text displayed on the canvas. More...
|
| |
| void | SetColorTransferFunction (vtkColorTransferFunction *colorTransferFunction) |
| | Set the vtkColorTransferFunction to edit. More...
|
| |
| int | AddFunctionPoint (double x, double val) override |
| | Add a color function point at position x, preserving the existing color at x. More...
|
| |
| void | RemoveFunctionPoint (double x) override |
| | Remove the color function point at position x. More...
|
| |
| double | GetFunctionX (int index) override |
| | Get the x (scalar) value of a function point by index. More...
|
| |
| int | GetFunctionSize () override |
| | Get the number of points in the color transfer function. More...
|
| |
| void | DoubleClickOnHandle (int handle) override |
| | Open a QColorDialog to change the color at the given handle. More...
|
| |
| void | MoveFunctionPoint (int index, std::pair< double, double > pos) override |
| | Move a function point to a new position, preserving its color. More...
|
| |
| void | AddRGB (double x, double r, double g, double b) |
| | Add an RGB color point to the transfer function. More...
|
| |
| double | GetFunctionMax () |
| | Get the maximum scalar value of the function range. More...
|
| |
| double | GetFunctionMin () |
| | Get the minimum scalar value of the function range. More...
|
| |
| double | GetFunctionRange () |
| | Get the span of the function range (max - min). More...
|
| |
| void | RemoveAllFunctionPoints () |
| | Reset the function to a default red-to-yellow gradient. More...
|
| |
| double | GetFunctionY (int) override |
| | Always returns 0.0 since color transfer functions have no y component. More...
|
| |
| | QmitkTransferFunctionCanvas (QWidget *parent=nullptr, Qt::WindowFlags f={}) |
| | Construct the transfer function canvas. More...
|
| |
| mitk::SimpleHistogram * | GetHistogram () |
| | Get the associated histogram. More...
|
| |
| void | SetHistogram (mitk::SimpleHistogram *histogram) |
| | Set the histogram to display as background. More...
|
| |
| double | GetMin () |
| | Get the minimum scalar value of the data range. More...
|
| |
| void | SetMin (double min) |
| | Set the minimum scalar value and update the lower display bound. More...
|
| |
| double | GetMax () |
| | Get the maximum scalar value of the data range. More...
|
| |
| void | SetMax (double max) |
| | Set the maximum scalar value and update the upper display bound. More...
|
| |
| double | GetLower () |
| | Get the lower display bound. More...
|
| |
| void | SetLower (double lower) |
| | Set the lower display bound (visible range start). More...
|
| |
| double | GetUpper () |
| | Get the upper display bound. More...
|
| |
| void | SetUpper (double upper) |
| | Set the upper display bound (visible range end). More...
|
| |
| void | mousePressEvent (QMouseEvent *mouseEvent) override |
| | Handle mouse press: add or remove function points, select handles. More...
|
| |
| void | paintEvent (QPaintEvent *e) override |
| | Default paint event handler. More...
|
| |
| void | mouseMoveEvent (QMouseEvent *mouseEvent) override |
| | Handle mouse move: drag the grabbed handle. More...
|
| |
| void | mouseReleaseEvent (QMouseEvent *mouseEvent) override |
| | Handle mouse release: trigger repaint. More...
|
| |
| void | mouseDoubleClickEvent (QMouseEvent *mouseEvent) override |
| | Handle double-click on a handle. More...
|
| |
| void | PaintHistogram (QPainter &p) |
| | Paint the histogram as a background overlay. More...
|
| |
| std::pair< int, int > | FunctionToCanvas (std::pair< double, double > functionPoint) |
| | Convert function coordinates to canvas pixel coordinates. More...
|
| |
| std::pair< double, double > | CanvasToFunction (std::pair< int, int > canvasPoint) |
| | Convert canvas pixel coordinates to function coordinates. More...
|
| |
| void | keyPressEvent (QKeyEvent *e) override |
| | Handle keyboard input for point manipulation (Delete, arrow keys). More...
|
| |
| void | SetImmediateUpdate (bool state) |
| | Enable or disable immediate rendering updates during interaction. More...
|
| |
| std::pair< double, double > | ValidateCoord (std::pair< double, double > x) |
| | Clamp coordinates to valid histogram range and [0, 1] for y. More...
|
| |
| void | SetX (float x) |
| | Set the x coordinate of the currently grabbed handle. More...
|
| |
| void | SetY (float y) |
| | Set the y coordinate of the currently grabbed handle. More...
|
| |
| void | SetQLineEdits (QLineEdit *xEdit, QLineEdit *yEdit) |
| | Connect QLineEdit widgets for displaying/editing the selected handle coordinates. More...
|
| |
Canvas widget for editing a vtkColorTransferFunction.
Renders a color gradient based on the underlying vtkColorTransferFunction and provides interactive handle manipulation. Users can add, move, remove, and double-click handles to change colors via a QColorDialog.
- See also
- QmitkTransferFunctionCanvas, QmitkPiecewiseFunctionCanvas, QmitkTransferFunctionWidget
Definition at line 30 of file QmitkColorTransferFunctionCanvas.h.