Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkTransferFunctionCanvas Class Referenceabstract

#include <QmitkTransferFunctionCanvas.h>

Inheritance diagram for QmitkTransferFunctionCanvas:
Collaboration diagram for QmitkTransferFunctionCanvas:

Public Member Functions

 QmitkTransferFunctionCanvas (QWidget *parent=nullptr, Qt::WindowFlags f=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)
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

Protected Attributes

bool m_ImmediateUpdate
float m_Range
bool m_LineEditAvailable
QLineEdit * m_XEdit
QLineEdit * m_YEdit

Detailed Description

Definition at line 28 of file QmitkTransferFunctionCanvas.h.

Constructor & Destructor Documentation

QmitkTransferFunctionCanvas::QmitkTransferFunctionCanvas ( QWidget *  parent = nullptr,
Qt::WindowFlags  f = nullptr 

Definition at line 25 of file QmitkTransferFunctionCanvas.cpp.

Member Function Documentation

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

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

Definition at line 35 of file QmitkTransferFunctionCanvas.h.

double QmitkTransferFunctionCanvas::GetLower ( )

Definition at line 51 of file QmitkTransferFunctionCanvas.h.

double QmitkTransferFunctionCanvas::GetMax ( )

Definition at line 44 of file QmitkTransferFunctionCanvas.h.

double QmitkTransferFunctionCanvas::GetMin ( )

Definition at line 37 of file QmitkTransferFunctionCanvas.h.

int QmitkTransferFunctionCanvas::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 QmitkPiecewiseFunctionCanvas, and QmitkColorTransferFunctionCanvas.

Definition at line 73 of file QmitkTransferFunctionCanvas.cpp.

Referenced by mouseDoubleClickEvent(), and mousePressEvent().

double QmitkTransferFunctionCanvas::GetUpper ( )

Definition at line 53 of file QmitkTransferFunctionCanvas.h.

void QmitkTransferFunctionCanvas::mouseDoubleClickEvent ( QMouseEvent *  mouseEvent)

Definition at line 62 of file QmitkTransferFunctionCanvas.cpp.

References DoubleClickOnHandle(), and GetNearHandle().

void QmitkTransferFunctionCanvas::mouseMoveEvent ( QMouseEvent *  mouseEvent)
void QmitkTransferFunctionCanvas::mouseReleaseEvent ( QMouseEvent *  mouseEvent)
virtual void QmitkTransferFunctionCanvas::MoveFunctionPoint ( int  index,
std::pair< double, double >  pos 
pure virtual
void QmitkTransferFunctionCanvas::paintEvent ( QPaintEvent *  e)
void QmitkTransferFunctionCanvas::PaintHistogram ( QPainter &  p)
virtual void QmitkTransferFunctionCanvas::RemoveFunctionPoint ( double  x)
pure virtual
void QmitkTransferFunctionCanvas::SetHistogram ( mitk::SimpleHistogram histogram)

Definition at line 36 of file QmitkTransferFunctionCanvas.h.

void QmitkTransferFunctionCanvas::SetImmediateUpdate ( bool  state)

Definition at line 233 of file QmitkTransferFunctionCanvas.cpp.

References m_ImmediateUpdate.

void QmitkTransferFunctionCanvas::SetLower ( double  lower)

Definition at line 52 of file QmitkTransferFunctionCanvas.h.

void QmitkTransferFunctionCanvas::SetMax ( double  max)
void QmitkTransferFunctionCanvas::SetMin ( double  min)
void QmitkTransferFunctionCanvas::SetQLineEdits ( QLineEdit *  xEdit,
QLineEdit *  yEdit 

Definition at line 119 of file QmitkTransferFunctionCanvas.h.

void QmitkTransferFunctionCanvas::SetUpper ( double  upper)

Definition at line 54 of file QmitkTransferFunctionCanvas.h.

void QmitkTransferFunctionCanvas::SetX ( float  x)
void QmitkTransferFunctionCanvas::SetY ( float  y)
std::pair<double, double> QmitkTransferFunctionCanvas::ValidateCoord ( std::pair< double, double >  x)

Member Data Documentation

mitk::SimpleHistogram* QmitkTransferFunctionCanvas::m_Histogram

Definition at line 78 of file QmitkTransferFunctionCanvas.h.

Referenced by PaintHistogram().

bool QmitkTransferFunctionCanvas::m_ImmediateUpdate

Definition at line 127 of file QmitkTransferFunctionCanvas.h.

Referenced by SetImmediateUpdate().

bool QmitkTransferFunctionCanvas::m_LineEditAvailable
double QmitkTransferFunctionCanvas::m_Lower
double QmitkTransferFunctionCanvas::m_Max
double QmitkTransferFunctionCanvas::m_Min
float QmitkTransferFunctionCanvas::m_Range

Definition at line 128 of file QmitkTransferFunctionCanvas.h.

double QmitkTransferFunctionCanvas::m_Upper
QLineEdit* QmitkTransferFunctionCanvas::m_XEdit
QLineEdit* QmitkTransferFunctionCanvas::m_YEdit

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