Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <QmitkTransferFunctionCanvas.h>
Public Member Functions | |
QmitkTransferFunctionCanvas (QWidget *parent=nullptr, Qt::WindowFlags f=nullptr) | |
mitk::SimpleHistogram * | GetHistogram () |
void | SetHistogram (mitk::SimpleHistogram *histogram) |
double | GetMin () |
void | SetMin (double min) |
double | GetMax () |
void | SetMax (double max) |
double | GetLower () |
void | SetLower (double lower) |
double | GetUpper () |
void | SetUpper (double upper) |
void | mousePressEvent (QMouseEvent *mouseEvent) override |
virtual void | paintEvent (QPaintEvent *e) override |
virtual void | DoubleClickOnHandle (int handle)=0 |
void | mouseMoveEvent (QMouseEvent *mouseEvent) override |
void | mouseReleaseEvent (QMouseEvent *mouseEvent) override |
void | mouseDoubleClickEvent (QMouseEvent *mouseEvent) override |
void | PaintHistogram (QPainter &p) |
virtual int | GetNearHandle (int x, int y, unsigned int maxSquaredDistance=32)=0 |
virtual int | AddFunctionPoint (double x, double val)=0 |
virtual void | RemoveFunctionPoint (double x)=0 |
virtual void | MoveFunctionPoint (int index, std::pair< double, double > pos)=0 |
virtual double | GetFunctionX (int index)=0 |
virtual double | GetFunctionY (int index)=0 |
virtual int | GetFunctionSize ()=0 |
std::pair< int, int > | FunctionToCanvas (std::pair< double, double >) |
std::pair< double, double > | CanvasToFunction (std::pair< int, int >) |
void | keyPressEvent (QKeyEvent *e) override |
void | SetImmediateUpdate (bool state) |
std::pair< double, double > | ValidateCoord (std::pair< double, double > x) |
void | SetX (float x) |
void | SetY (float y) |
void | SetQLineEdits (QLineEdit *xEdit, QLineEdit *yEdit) |
Public Attributes | |
int | m_GrabbedHandle |
double | m_Lower |
double | m_Upper |
double | m_Min |
double | m_Max |
mitk::SimpleHistogram * | m_Histogram |
Protected Attributes | |
bool | m_ImmediateUpdate |
float | m_Range |
bool | m_LineEditAvailable |
QLineEdit * | m_XEdit |
QLineEdit * | m_YEdit |
Definition at line 28 of file QmitkTransferFunctionCanvas.h.
QmitkTransferFunctionCanvas::QmitkTransferFunctionCanvas | ( | QWidget * | parent = nullptr , |
Qt::WindowFlags | f = nullptr |
||
) |
Definition at line 25 of file QmitkTransferFunctionCanvas.cpp.
|
pure virtual |
Implemented in QmitkPiecewiseFunctionCanvas, and QmitkColorTransferFunctionCanvas.
Referenced by mousePressEvent().
std::pair< double, double > QmitkTransferFunctionCanvas::CanvasToFunction | ( | std::pair< int, int > | canvasPoint | ) |
Definition at line 55 of file QmitkTransferFunctionCanvas.cpp.
References m_Lower, and m_Upper.
Referenced by mouseMoveEvent(), and mousePressEvent().
|
pure virtual |
Implemented in QmitkColorTransferFunctionCanvas, and QmitkPiecewiseFunctionCanvas.
Referenced by mouseDoubleClickEvent().
std::pair< int, int > QmitkTransferFunctionCanvas::FunctionToCanvas | ( | std::pair< double, double > | functionPoint | ) |
Definition at line 48 of file QmitkTransferFunctionCanvas.cpp.
References m_Lower, and m_Upper.
Referenced by QmitkColorTransferFunctionCanvas::GetNearHandle(), QmitkPiecewiseFunctionCanvas::GetNearHandle(), QmitkPiecewiseFunctionCanvas::paintEvent(), and QmitkColorTransferFunctionCanvas::paintEvent().
|
pure virtual |
|
pure virtual |
Implemented in QmitkColorTransferFunctionCanvas, and QmitkPiecewiseFunctionCanvas.
Referenced by keyPressEvent(), and mousePressEvent().
|
pure virtual |
Implemented in QmitkColorTransferFunctionCanvas, and QmitkPiecewiseFunctionCanvas.
Referenced by keyPressEvent().
|
inline |
Definition at line 35 of file QmitkTransferFunctionCanvas.h.
|
inline |
Definition at line 51 of file QmitkTransferFunctionCanvas.h.
|
inline |
Definition at line 44 of file QmitkTransferFunctionCanvas.h.
|
inline |
Definition at line 37 of file QmitkTransferFunctionCanvas.h.
|
pure virtual |
returns index of a near handle or -1 if none is near
Implemented in QmitkPiecewiseFunctionCanvas, and QmitkColorTransferFunctionCanvas.
Definition at line 73 of file QmitkTransferFunctionCanvas.cpp.
Referenced by mouseDoubleClickEvent(), and mousePressEvent().
|
inline |
Definition at line 53 of file QmitkTransferFunctionCanvas.h.
|
override |
Definition at line 188 of file QmitkTransferFunctionCanvas.cpp.
References GetFunctionSize(), GetFunctionX(), GetFunctionY(), mitk::RenderingManager::GetInstance(), mitk::Key_Delete, mitk::Key_Down, mitk::Key_Left, mitk::Key_Right, mitk::Key_Up, m_GrabbedHandle, MoveFunctionPoint(), RemoveFunctionPoint(), mitk::RenderingManager::RequestUpdateAll(), and ValidateCoord().
|
override |
Definition at line 62 of file QmitkTransferFunctionCanvas.cpp.
References DoubleClickOnHandle(), and GetNearHandle().
|
override |
Definition at line 105 of file QmitkTransferFunctionCanvas.cpp.
References CanvasToFunction(), GetFunctionSize(), mitk::RenderingManager::GetInstance(), m_GrabbedHandle, m_Max, m_Min, MoveFunctionPoint(), and mitk::RenderingManager::RequestUpdateAll().
|
override |
Definition at line 78 of file QmitkTransferFunctionCanvas.cpp.
References AddFunctionPoint(), CanvasToFunction(), GetFunctionSize(), GetFunctionX(), mitk::RenderingManager::GetInstance(), GetNearHandle(), m_GrabbedHandle, m_LineEditAvailable, m_XEdit, m_YEdit, RemoveFunctionPoint(), and mitk::RenderingManager::RequestUpdateAll().
|
override |
Definition at line 147 of file QmitkTransferFunctionCanvas.cpp.
References mitk::RenderingManager::GetInstance(), and mitk::RenderingManager::RequestUpdateAll().
|
pure virtual |
Implemented in QmitkColorTransferFunctionCanvas, and QmitkPiecewiseFunctionCanvas.
Referenced by keyPressEvent(), and mouseMoveEvent().
|
overridevirtual |
Reimplemented in QmitkColorTransferFunctionCanvas, and QmitkPiecewiseFunctionCanvas.
Definition at line 43 of file QmitkTransferFunctionCanvas.cpp.
void QmitkTransferFunctionCanvas::PaintHistogram | ( | QPainter & | p | ) |
Definition at line 153 of file QmitkTransferFunctionCanvas.cpp.
References mitk::SimpleHistogram::GetRelativeBin(), m_Histogram, m_Lower, and m_Upper.
Referenced by QmitkPiecewiseFunctionCanvas::paintEvent().
|
pure virtual |
Implemented in QmitkColorTransferFunctionCanvas, and QmitkPiecewiseFunctionCanvas.
Referenced by keyPressEvent(), and mousePressEvent().
|
inline |
Definition at line 36 of file QmitkTransferFunctionCanvas.h.
void QmitkTransferFunctionCanvas::SetImmediateUpdate | ( | bool | state | ) |
Definition at line 233 of file QmitkTransferFunctionCanvas.cpp.
References m_ImmediateUpdate.
|
inline |
Definition at line 52 of file QmitkTransferFunctionCanvas.h.
|
inline |
Definition at line 45 of file QmitkTransferFunctionCanvas.h.
References max().
Referenced by QmitkColorTransferFunctionCanvas::SetColorTransferFunction(), and QmitkPiecewiseFunctionCanvas::SetPiecewiseFunction().
|
inline |
Definition at line 38 of file QmitkTransferFunctionCanvas.h.
References min().
Referenced by QmitkColorTransferFunctionCanvas::SetColorTransferFunction(), and QmitkPiecewiseFunctionCanvas::SetPiecewiseFunction().
|
inline |
Definition at line 119 of file QmitkTransferFunctionCanvas.h.
|
inline |
Definition at line 54 of file QmitkTransferFunctionCanvas.h.
|
inline |
Definition at line 99 of file QmitkTransferFunctionCanvas.h.
References mitk::RenderingManager::GetInstance(), and mitk::RenderingManager::RequestUpdateAll().
|
inline |
Definition at line 109 of file QmitkTransferFunctionCanvas.h.
References mitk::RenderingManager::GetInstance(), and mitk::RenderingManager::RequestUpdateAll().
|
inline |
Definition at line 84 of file QmitkTransferFunctionCanvas.h.
References mitk::SimpleHistogram::GetMax(), mitk::SimpleHistogram::GetMin(), max(), and min().
Referenced by keyPressEvent().
int QmitkTransferFunctionCanvas::m_GrabbedHandle |
Definition at line 71 of file QmitkTransferFunctionCanvas.h.
Referenced by keyPressEvent(), mouseMoveEvent(), mousePressEvent(), QmitkPiecewiseFunctionCanvas::MoveFunctionPoint(), QmitkColorTransferFunctionCanvas::paintEvent(), and QmitkPiecewiseFunctionCanvas::paintEvent().
mitk::SimpleHistogram* QmitkTransferFunctionCanvas::m_Histogram |
Definition at line 78 of file QmitkTransferFunctionCanvas.h.
Referenced by PaintHistogram().
|
protected |
Definition at line 127 of file QmitkTransferFunctionCanvas.h.
Referenced by SetImmediateUpdate().
|
protected |
Definition at line 130 of file QmitkTransferFunctionCanvas.h.
Referenced by mousePressEvent(), QmitkColorTransferFunctionCanvas::paintEvent(), and QmitkPiecewiseFunctionCanvas::paintEvent().
double QmitkTransferFunctionCanvas::m_Lower |
Definition at line 73 of file QmitkTransferFunctionCanvas.h.
Referenced by CanvasToFunction(), FunctionToCanvas(), and PaintHistogram().
double QmitkTransferFunctionCanvas::m_Max |
Definition at line 73 of file QmitkTransferFunctionCanvas.h.
Referenced by mouseMoveEvent(), QmitkColorTransferFunctionCanvas::paintEvent(), and QmitkPiecewiseFunctionCanvas::paintEvent().
double QmitkTransferFunctionCanvas::m_Min |
Definition at line 73 of file QmitkTransferFunctionCanvas.h.
Referenced by mouseMoveEvent(), QmitkColorTransferFunctionCanvas::paintEvent(), and QmitkPiecewiseFunctionCanvas::paintEvent().
|
protected |
Definition at line 128 of file QmitkTransferFunctionCanvas.h.
double QmitkTransferFunctionCanvas::m_Upper |
Definition at line 73 of file QmitkTransferFunctionCanvas.h.
Referenced by CanvasToFunction(), FunctionToCanvas(), and PaintHistogram().
|
protected |
Definition at line 131 of file QmitkTransferFunctionCanvas.h.
Referenced by mousePressEvent(), QmitkColorTransferFunctionCanvas::paintEvent(), and QmitkPiecewiseFunctionCanvas::paintEvent().
|
protected |
Definition at line 132 of file QmitkTransferFunctionCanvas.h.
Referenced by mousePressEvent(), and QmitkPiecewiseFunctionCanvas::paintEvent().