Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmlMitkPiecewiseFunctionCanvas Class Reference

#include <QmlMitkPiecewiseFunctionCanvas.h>

Inheritance diagram for QmlMitkPiecewiseFunctionCanvas:
Collaboration diagram for QmlMitkPiecewiseFunctionCanvas:

Signals

void sync ()
 

Public Member Functions

 QmlMitkPiecewiseFunctionCanvas (QQuickPaintedItem *parent=nullptr)
 
void paint (QPainter *painter) override
 
void SetTitle (const QString &title)
 
int GetNearHandle (int x, int y, unsigned int maxSquaredDistance=32) override
 
void setGreyValue (double value)
 
double getGreyValue ()
 
void setOpacity (double opacity)
 
double getOpacity ()
 
void SetPiecewiseFunction (vtkPiecewiseFunction *piecewiseFunction)
 
int AddFunctionPoint (double x, double val) override
 
void RemoveFunctionPoint (double x) override
 
double GetFunctionX (int index) override
 
double GetFunctionY (int index) override
 
int GetFunctionSize () override
 
void DoubleClickOnHandle (int) override
 
void MoveFunctionPoint (int index, std::pair< double, double > pos) override
 
double GetFunctionMax ()
 
double GetFunctionMin ()
 
double GetFunctionRange ()
 
void RemoveAllFunctionPoints ()
 
void ResetGO ()
 
void mousePressEvent (QMouseEvent *mouseEvent) override
 
void mouseMoveEvent (QMouseEvent *mouseEvent) override
 
void mouseReleaseEvent (QMouseEvent *mouseEvent) override
 
void mouseDoubleClickEvent (QMouseEvent *mouseEvent) override
 
void keyPressEvent (QKeyEvent *keyEvent) override
 
- Public Member Functions inherited from QmlMitkTransferFunctionCanvas
 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)
 
void mousePressEvent (QMouseEvent *mouseEvent) override
 
void mouseMoveEvent (QMouseEvent *mouseEvent) override
 
void mouseReleaseEvent (QMouseEvent *mouseEvent) override
 
void mouseDoubleClickEvent (QMouseEvent *mouseEvent) override
 
void keyPressEvent (QKeyEvent *event) override
 
void PaintHistogram (QPainter *painter)
 
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)
 

Static Public Member Functions

static void create ()
 

Static Public Attributes

static QmlMitkPiecewiseFunctionCanvasinstance
 

Protected Attributes

vtkPiecewiseFunction * m_PiecewiseFunction
 
QString m_Title
 
mitk::SimpleHistogramCache histogramCache
 
double m_GreyValue
 
double m_Opacity
 
- Protected Attributes inherited from QmlMitkTransferFunctionCanvas
bool m_ImmediateUpdate
 
float m_Range
 
double m_GreyValue
 
double m_Opacity
 
bool m_LineEditAvailable
 

Properties

double greyValue
 
double opacity
 

Additional Inherited Members

- Public Attributes inherited from QmlMitkTransferFunctionCanvas
int m_GrabbedHandle
 
double m_Lower
 
double m_Upper
 
double m_Min
 
double m_Max
 
mitk::SimpleHistogramm_Histogram
 

Detailed Description

Definition at line 28 of file QmlMitkPiecewiseFunctionCanvas.h.

Constructor & Destructor Documentation

QmlMitkPiecewiseFunctionCanvas::QmlMitkPiecewiseFunctionCanvas ( QQuickPaintedItem *  parent = nullptr)

Definition at line 23 of file QmlMitkPiecewiseFunctionCanvas.cpp.

References instance.

Member Function Documentation

int QmlMitkPiecewiseFunctionCanvas::AddFunctionPoint ( double  x,
double  val 
)
inlineoverridevirtual

Implements QmlMitkTransferFunctionCanvas.

Definition at line 59 of file QmlMitkPiecewiseFunctionCanvas.h.

Referenced by MoveFunctionPoint().

void QmlMitkPiecewiseFunctionCanvas::create ( )
static
void QmlMitkPiecewiseFunctionCanvas::DoubleClickOnHandle ( int  )
inlineoverridevirtual

Implements QmlMitkTransferFunctionCanvas.

Definition at line 90 of file QmlMitkPiecewiseFunctionCanvas.h.

double QmlMitkPiecewiseFunctionCanvas::GetFunctionMax ( )
inline

Definition at line 96 of file QmlMitkPiecewiseFunctionCanvas.h.

double QmlMitkPiecewiseFunctionCanvas::GetFunctionMin ( )
inline

Definition at line 101 of file QmlMitkPiecewiseFunctionCanvas.h.

double QmlMitkPiecewiseFunctionCanvas::GetFunctionRange ( )
inline

Definition at line 106 of file QmlMitkPiecewiseFunctionCanvas.h.

int QmlMitkPiecewiseFunctionCanvas::GetFunctionSize ( )
inlineoverridevirtual

Implements QmlMitkTransferFunctionCanvas.

Definition at line 85 of file QmlMitkPiecewiseFunctionCanvas.h.

double QmlMitkPiecewiseFunctionCanvas::GetFunctionX ( int  index)
inlineoverridevirtual

Implements QmlMitkTransferFunctionCanvas.

Definition at line 75 of file QmlMitkPiecewiseFunctionCanvas.h.

Referenced by MoveFunctionPoint(), and paint().

double QmlMitkPiecewiseFunctionCanvas::GetFunctionY ( int  index)
inlineoverridevirtual

Implements QmlMitkTransferFunctionCanvas.

Definition at line 80 of file QmlMitkPiecewiseFunctionCanvas.h.

Referenced by paint().

double QmlMitkPiecewiseFunctionCanvas::getGreyValue ( )

Definition at line 37 of file QmlMitkPiecewiseFunctionCanvas.cpp.

References m_GreyValue.

int QmlMitkPiecewiseFunctionCanvas::GetNearHandle ( int  x,
int  y,
unsigned int  maxSquaredDistance = 32 
)
overridevirtual

returns index of a near handle or -1 if none is near

Implements QmlMitkTransferFunctionCanvas.

Definition at line 160 of file QmlMitkPiecewiseFunctionCanvas.cpp.

References QmlMitkTransferFunctionCanvas::FunctionToCanvas(), and m_PiecewiseFunction.

double QmlMitkPiecewiseFunctionCanvas::getOpacity ( )

Definition at line 49 of file QmlMitkPiecewiseFunctionCanvas.cpp.

References m_Opacity.

void QmlMitkPiecewiseFunctionCanvas::keyPressEvent ( QKeyEvent *  keyEvent)
override
void QmlMitkPiecewiseFunctionCanvas::mouseDoubleClickEvent ( QMouseEvent *  mouseEvent)
override
void QmlMitkPiecewiseFunctionCanvas::mouseMoveEvent ( QMouseEvent *  mouseEvent)
override
void QmlMitkPiecewiseFunctionCanvas::mousePressEvent ( QMouseEvent *  mouseEvent)
override
void QmlMitkPiecewiseFunctionCanvas::mouseReleaseEvent ( QMouseEvent *  mouseEvent)
override
void QmlMitkPiecewiseFunctionCanvas::MoveFunctionPoint ( int  index,
std::pair< double, double >  pos 
)
overridevirtual
void QmlMitkPiecewiseFunctionCanvas::RemoveAllFunctionPoints ( )
inline

Definition at line 121 of file QmlMitkPiecewiseFunctionCanvas.h.

void QmlMitkPiecewiseFunctionCanvas::RemoveFunctionPoint ( double  x)
inlineoverridevirtual
void QmlMitkPiecewiseFunctionCanvas::ResetGO ( )
inline

Definition at line 127 of file QmlMitkPiecewiseFunctionCanvas.h.

void QmlMitkPiecewiseFunctionCanvas::setGreyValue ( double  value)
void QmlMitkPiecewiseFunctionCanvas::setOpacity ( double  opacity)
void QmlMitkPiecewiseFunctionCanvas::SetPiecewiseFunction ( vtkPiecewiseFunction *  piecewiseFunction)
inline
void QmlMitkPiecewiseFunctionCanvas::SetTitle ( const QString &  title)

Definition at line 54 of file QmlMitkPiecewiseFunctionCanvas.cpp.

References m_Title.

void QmlMitkPiecewiseFunctionCanvas::sync ( )
signal

Referenced by paint().

Member Data Documentation

mitk::SimpleHistogramCache QmlMitkPiecewiseFunctionCanvas::histogramCache
protected

Definition at line 147 of file QmlMitkPiecewiseFunctionCanvas.h.

QmlMitkPiecewiseFunctionCanvas * QmlMitkPiecewiseFunctionCanvas::instance
static

Definition at line 41 of file QmlMitkPiecewiseFunctionCanvas.h.

Referenced by QmlMitkPiecewiseFunctionCanvas().

double QmlMitkPiecewiseFunctionCanvas::m_GreyValue
protected

Definition at line 149 of file QmlMitkPiecewiseFunctionCanvas.h.

Referenced by getGreyValue(), paint(), and setGreyValue().

double QmlMitkPiecewiseFunctionCanvas::m_Opacity
protected

Definition at line 150 of file QmlMitkPiecewiseFunctionCanvas.h.

Referenced by getOpacity(), paint(), and setOpacity().

vtkPiecewiseFunction* QmlMitkPiecewiseFunctionCanvas::m_PiecewiseFunction
protected

Definition at line 145 of file QmlMitkPiecewiseFunctionCanvas.h.

Referenced by GetNearHandle(), and paint().

QString QmlMitkPiecewiseFunctionCanvas::m_Title
protected

Definition at line 146 of file QmlMitkPiecewiseFunctionCanvas.h.

Referenced by paint(), and SetTitle().

Property Documentation

double QmlMitkPiecewiseFunctionCanvas::greyValue
readwrite

Definition at line 31 of file QmlMitkPiecewiseFunctionCanvas.h.

double QmlMitkPiecewiseFunctionCanvas::opacity
readwrite

Definition at line 32 of file QmlMitkPiecewiseFunctionCanvas.h.

Referenced by setOpacity().


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