Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmlMitkTransferFunctionCanvas Class Referenceabstract

#include <QmlMitkTransferFunctionCanvas.h>

Inheritance diagram for QmlMitkTransferFunctionCanvas:
Collaboration diagram for QmlMitkTransferFunctionCanvas:

Public Member Functions

 QmlMitkTransferFunctionCanvas (QQuickPaintedItem *parent=nullptr)
 
mitk::SimpleHistogramGetHistogram ()
 
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::SimpleHistogramm_Histogram
 

Protected Attributes

bool m_ImmediateUpdate
 
float m_Range
 
double m_GreyValue
 
double m_Opacity
 
bool m_LineEditAvailable
 

Detailed Description

Definition at line 27 of file QmlMitkTransferFunctionCanvas.h.

Constructor & Destructor Documentation

QmlMitkTransferFunctionCanvas::QmlMitkTransferFunctionCanvas ( QQuickPaintedItem *  parent = nullptr)

Definition at line 22 of file QmlMitkTransferFunctionCanvas.cpp.

Member Function Documentation

virtual int QmlMitkTransferFunctionCanvas::AddFunctionPoint ( double  x,
double  val 
)
pure virtual
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().

virtual void QmlMitkTransferFunctionCanvas::DoubleClickOnHandle ( int  handle)
pure virtual
std::pair< int, int > QmlMitkTransferFunctionCanvas::FunctionToCanvas ( std::pair< double, double >  functionPoint)
virtual double QmlMitkTransferFunctionCanvas::GetFunctionX ( int  index)
pure virtual
virtual double QmlMitkTransferFunctionCanvas::GetFunctionY ( int  index)
pure virtual
mitk::SimpleHistogram* QmlMitkTransferFunctionCanvas::GetHistogram ( )
inline

Definition at line 36 of file QmlMitkTransferFunctionCanvas.h.

double QmlMitkTransferFunctionCanvas::GetLower ( )
inline

Definition at line 68 of file QmlMitkTransferFunctionCanvas.h.

double QmlMitkTransferFunctionCanvas::GetMax ( )
inline

Definition at line 57 of file QmlMitkTransferFunctionCanvas.h.

double QmlMitkTransferFunctionCanvas::GetMin ( )
inline

Definition at line 46 of file QmlMitkTransferFunctionCanvas.h.

int QmlMitkTransferFunctionCanvas::GetNearHandle ( int  x,
int  y,
unsigned int  maxSquaredDistance = 32 
)
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().

double QmlMitkTransferFunctionCanvas::GetUpper ( )
inline

Definition at line 78 of file QmlMitkTransferFunctionCanvas.h.

void QmlMitkTransferFunctionCanvas::mouseDoubleClickEvent ( QMouseEvent *  mouseEvent)
override
void QmlMitkTransferFunctionCanvas::mouseMoveEvent ( QMouseEvent *  mouseEvent)
override
void QmlMitkTransferFunctionCanvas::mousePressEvent ( QMouseEvent *  mouseEvent)
override
void QmlMitkTransferFunctionCanvas::mouseReleaseEvent ( QMouseEvent *  mouseEvent)
override
virtual void QmlMitkTransferFunctionCanvas::MoveFunctionPoint ( int  index,
std::pair< double, double >  pos 
)
pure virtual
virtual void QmlMitkTransferFunctionCanvas::paint ( QPainter *  painter)
pure virtual
void QmlMitkTransferFunctionCanvas::PaintHistogram ( QPainter *  painter)
virtual void QmlMitkTransferFunctionCanvas::RemoveFunctionPoint ( double  x)
pure virtual
void QmlMitkTransferFunctionCanvas::SetHistogram ( mitk::SimpleHistogram histogram)
inline
void QmlMitkTransferFunctionCanvas::SetImmediateUpdate ( bool  state)

Definition at line 213 of file QmlMitkTransferFunctionCanvas.cpp.

References m_ImmediateUpdate.

void QmlMitkTransferFunctionCanvas::SetLower ( double  lower)
inline

Definition at line 73 of file QmlMitkTransferFunctionCanvas.h.

void QmlMitkTransferFunctionCanvas::SetMax ( double  max)
inline
void QmlMitkTransferFunctionCanvas::SetMin ( double  min)
inline
void QmlMitkTransferFunctionCanvas::SetUpper ( double  upper)
inline

Definition at line 83 of file QmlMitkTransferFunctionCanvas.h.

void QmlMitkTransferFunctionCanvas::SetY ( float  y)
inline
std::pair<double,double> QmlMitkTransferFunctionCanvas::ValidateCoord ( std::pair< double, double >  x)
inline

Member Data Documentation

double QmlMitkTransferFunctionCanvas::m_GreyValue
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().

bool QmlMitkTransferFunctionCanvas::m_ImmediateUpdate
protected

Definition at line 149 of file QmlMitkTransferFunctionCanvas.h.

Referenced by SetImmediateUpdate().

bool QmlMitkTransferFunctionCanvas::m_LineEditAvailable
protected

Definition at line 155 of file QmlMitkTransferFunctionCanvas.h.

double QmlMitkTransferFunctionCanvas::m_Lower
double QmlMitkTransferFunctionCanvas::m_Max
double QmlMitkTransferFunctionCanvas::m_Min
double QmlMitkTransferFunctionCanvas::m_Opacity
protected

Definition at line 153 of file QmlMitkTransferFunctionCanvas.h.

float QmlMitkTransferFunctionCanvas::m_Range
protected

Definition at line 150 of file QmlMitkTransferFunctionCanvas.h.

double QmlMitkTransferFunctionCanvas::m_Upper

The documentation for this class was generated from the following files: