Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <QmlMitkTransferFunctionCanvas.h>
Public Member Functions | |
QmlMitkTransferFunctionCanvas (QQuickPaintedItem *parent=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) |
virtual void | paint (QPainter *painter)=0 |
void | mousePressEvent (QMouseEvent *mouseEvent) override |
virtual void | DoubleClickOnHandle (int handle)=0 |
void | mouseMoveEvent (QMouseEvent *mouseEvent) override |
void | mouseReleaseEvent (QMouseEvent *mouseEvent) override |
void | mouseDoubleClickEvent (QMouseEvent *mouseEvent) override |
void | keyPressEvent (QKeyEvent *event) override |
void | PaintHistogram (QPainter *painter) |
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 | SetImmediateUpdate (bool state) |
std::pair< double, double > | ValidateCoord (std::pair< double, double > x) |
void | SetX (float x) |
void | SetY (float y) |
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 |
double | m_GreyValue |
double | m_Opacity |
bool | m_LineEditAvailable |
Definition at line 27 of file QmlMitkTransferFunctionCanvas.h.
QmlMitkTransferFunctionCanvas::QmlMitkTransferFunctionCanvas | ( | QQuickPaintedItem * | parent = nullptr | ) |
Definition at line 22 of file QmlMitkTransferFunctionCanvas.cpp.
|
pure virtual |
Implemented in QmlMitkPiecewiseFunctionCanvas, and QmlMitkColorTransferFunctionCanvas.
Referenced by mousePressEvent().
std::pair< double, double > QmlMitkTransferFunctionCanvas::CanvasToFunction | ( | std::pair< int, int > | canvasPoint | ) |
Definition at line 47 of file QmlMitkTransferFunctionCanvas.cpp.
References m_Lower, and m_Upper.
Referenced by mouseMoveEvent(), and mousePressEvent().
|
pure virtual |
Implemented in QmlMitkPiecewiseFunctionCanvas, and QmlMitkColorTransferFunctionCanvas.
Referenced by mouseDoubleClickEvent().
std::pair< int, int > QmlMitkTransferFunctionCanvas::FunctionToCanvas | ( | std::pair< double, double > | functionPoint | ) |
Definition at line 40 of file QmlMitkTransferFunctionCanvas.cpp.
References m_Lower, and m_Upper.
Referenced by QmlMitkColorTransferFunctionCanvas::GetNearHandle(), QmlMitkPiecewiseFunctionCanvas::GetNearHandle(), QmlMitkColorTransferFunctionCanvas::paint(), and QmlMitkPiecewiseFunctionCanvas::paint().
|
pure virtual |
|
pure virtual |
Implemented in QmlMitkPiecewiseFunctionCanvas, and QmlMitkColorTransferFunctionCanvas.
Referenced by keyPressEvent().
|
pure virtual |
Implemented in QmlMitkColorTransferFunctionCanvas, and QmlMitkPiecewiseFunctionCanvas.
Referenced by keyPressEvent().
|
inline |
Definition at line 36 of file QmlMitkTransferFunctionCanvas.h.
|
inline |
Definition at line 68 of file QmlMitkTransferFunctionCanvas.h.
|
inline |
Definition at line 57 of file QmlMitkTransferFunctionCanvas.h.
|
inline |
Definition at line 46 of file QmlMitkTransferFunctionCanvas.h.
|
pure virtual |
returns index of a near handle or -1 if none is near
Implemented in QmlMitkPiecewiseFunctionCanvas, and QmlMitkColorTransferFunctionCanvas.
Definition at line 65 of file QmlMitkTransferFunctionCanvas.cpp.
Referenced by mouseDoubleClickEvent(), and mousePressEvent().
|
inline |
Definition at line 78 of file QmlMitkTransferFunctionCanvas.h.
|
override |
Definition at line 176 of file QmlMitkTransferFunctionCanvas.cpp.
References GetFunctionSize(), GetFunctionX(), GetFunctionY(), mitk::RenderingManager::GetInstance(), mitk::Key_Backspace, mitk::Key_Down, mitk::Key_Left, mitk::Key_Right, mitk::Key_Up, m_GrabbedHandle, MoveFunctionPoint(), RemoveFunctionPoint(), mitk::RenderingManager::RequestUpdateAll(), and ValidateCoord().
Referenced by QmlMitkPiecewiseFunctionCanvas::keyPressEvent().
|
override |
Definition at line 54 of file QmlMitkTransferFunctionCanvas.cpp.
References DoubleClickOnHandle(), and GetNearHandle().
Referenced by QmlMitkPiecewiseFunctionCanvas::mouseDoubleClickEvent().
|
override |
Definition at line 94 of file QmlMitkTransferFunctionCanvas.cpp.
References CanvasToFunction(), GetFunctionSize(), mitk::RenderingManager::GetInstance(), m_GrabbedHandle, m_Max, m_Min, MoveFunctionPoint(), and mitk::RenderingManager::RequestUpdateAll().
Referenced by QmlMitkPiecewiseFunctionCanvas::mouseMoveEvent().
|
override |
Definition at line 71 of file QmlMitkTransferFunctionCanvas.cpp.
References AddFunctionPoint(), CanvasToFunction(), mitk::RenderingManager::GetInstance(), GetNearHandle(), m_GrabbedHandle, and mitk::RenderingManager::RequestUpdateAll().
Referenced by QmlMitkPiecewiseFunctionCanvas::mousePressEvent().
|
override |
Definition at line 134 of file QmlMitkTransferFunctionCanvas.cpp.
References mitk::RenderingManager::GetInstance(), and mitk::RenderingManager::RequestUpdateAll().
Referenced by QmlMitkPiecewiseFunctionCanvas::mouseReleaseEvent().
|
pure virtual |
Implemented in QmlMitkPiecewiseFunctionCanvas, and QmlMitkColorTransferFunctionCanvas.
Referenced by keyPressEvent(), and mouseMoveEvent().
|
pure virtual |
Implemented in QmlMitkPiecewiseFunctionCanvas, and QmlMitkColorTransferFunctionCanvas.
void QmlMitkTransferFunctionCanvas::PaintHistogram | ( | QPainter * | painter | ) |
Definition at line 140 of file QmlMitkTransferFunctionCanvas.cpp.
References mitk::SimpleHistogram::GetRelativeBin(), m_Histogram, m_Lower, and m_Upper.
Referenced by QmlMitkPiecewiseFunctionCanvas::paint().
|
pure virtual |
Implemented in QmlMitkPiecewiseFunctionCanvas, and QmlMitkColorTransferFunctionCanvas.
Referenced by keyPressEvent().
|
inline |
Definition at line 41 of file QmlMitkTransferFunctionCanvas.h.
Referenced by QmlMitkTransferFunctionItem::SetDataNode().
void QmlMitkTransferFunctionCanvas::SetImmediateUpdate | ( | bool | state | ) |
Definition at line 213 of file QmlMitkTransferFunctionCanvas.cpp.
References m_ImmediateUpdate.
|
inline |
Definition at line 73 of file QmlMitkTransferFunctionCanvas.h.
|
inline |
Definition at line 62 of file QmlMitkTransferFunctionCanvas.h.
References max().
Referenced by QmlMitkColorTransferFunctionCanvas::SetColorTransferFunction(), QmlMitkPiecewiseFunctionCanvas::SetPiecewiseFunction(), and QmlMitkTransferFunctionItem::UpdateRanges().
|
inline |
Definition at line 51 of file QmlMitkTransferFunctionCanvas.h.
References min().
Referenced by QmlMitkColorTransferFunctionCanvas::SetColorTransferFunction(), QmlMitkPiecewiseFunctionCanvas::SetPiecewiseFunction(), and QmlMitkTransferFunctionItem::UpdateRanges().
|
inline |
Definition at line 83 of file QmlMitkTransferFunctionCanvas.h.
|
inline |
Definition at line 128 of file QmlMitkTransferFunctionCanvas.h.
References mitk::RenderingManager::GetInstance(), and mitk::RenderingManager::RequestUpdateAll().
Referenced by QmlMitkColorTransferFunctionCanvas::setGreyValue(), and QmlMitkPiecewiseFunctionCanvas::setGreyValue().
|
inline |
Definition at line 138 of file QmlMitkTransferFunctionCanvas.h.
References mitk::RenderingManager::GetInstance(), and mitk::RenderingManager::RequestUpdateAll().
Referenced by QmlMitkPiecewiseFunctionCanvas::setOpacity().
|
inline |
Definition at line 117 of file QmlMitkTransferFunctionCanvas.h.
References mitk::SimpleHistogram::GetMax(), mitk::SimpleHistogram::GetMin(), max(), and min().
Referenced by keyPressEvent().
int QmlMitkTransferFunctionCanvas::m_GrabbedHandle |
Definition at line 106 of file QmlMitkTransferFunctionCanvas.h.
Referenced by keyPressEvent(), mouseMoveEvent(), mousePressEvent(), QmlMitkPiecewiseFunctionCanvas::MoveFunctionPoint(), QmlMitkColorTransferFunctionCanvas::paint(), and QmlMitkPiecewiseFunctionCanvas::paint().
|
protected |
Definition at line 152 of file QmlMitkTransferFunctionCanvas.h.
mitk::SimpleHistogram* QmlMitkTransferFunctionCanvas::m_Histogram |
Definition at line 113 of file QmlMitkTransferFunctionCanvas.h.
Referenced by PaintHistogram().
|
protected |
Definition at line 149 of file QmlMitkTransferFunctionCanvas.h.
Referenced by SetImmediateUpdate().
|
protected |
Definition at line 155 of file QmlMitkTransferFunctionCanvas.h.
double QmlMitkTransferFunctionCanvas::m_Lower |
Definition at line 108 of file QmlMitkTransferFunctionCanvas.h.
Referenced by CanvasToFunction(), FunctionToCanvas(), and PaintHistogram().
double QmlMitkTransferFunctionCanvas::m_Max |
Definition at line 108 of file QmlMitkTransferFunctionCanvas.h.
Referenced by mouseMoveEvent(), QmlMitkColorTransferFunctionCanvas::paint(), and QmlMitkPiecewiseFunctionCanvas::paint().
double QmlMitkTransferFunctionCanvas::m_Min |
Definition at line 108 of file QmlMitkTransferFunctionCanvas.h.
Referenced by mouseMoveEvent(), QmlMitkColorTransferFunctionCanvas::paint(), and QmlMitkPiecewiseFunctionCanvas::paint().
|
protected |
Definition at line 153 of file QmlMitkTransferFunctionCanvas.h.
|
protected |
Definition at line 150 of file QmlMitkTransferFunctionCanvas.h.
double QmlMitkTransferFunctionCanvas::m_Upper |
Definition at line 108 of file QmlMitkTransferFunctionCanvas.h.
Referenced by CanvasToFunction(), FunctionToCanvas(), and PaintHistogram().