Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmlMitkColorTransferFunctionCanvas Class Reference

#include <QmlMitkColorTransferFunctionCanvas.h>

Inheritance diagram for QmlMitkColorTransferFunctionCanvas:
Collaboration diagram for QmlMitkColorTransferFunctionCanvas:

Signals

void sync ()
 

Public Member Functions

 QmlMitkColorTransferFunctionCanvas (QQuickPaintedItem *parent=nullptr)
 
virtual void paint (QPainter *painter) override
 
int GetNearHandle (int x, int y, unsigned int maxSquaredDistance=32) override
 
void SetTitle (const QString &title)
 
void setGreyValue (double value)
 
double getGreyValue ()
 
void SetColorTransferFunction (vtkColorTransferFunction *colorTransferFunction)
 
int AddFunctionPoint (double x, double) override
 
void RemoveFunctionPoint (double x) override
 
double GetFunctionX (int index) override
 
int GetFunctionSize () override
 
void DoubleClickOnHandle (int handle) override
 
void MoveFunctionPoint (int index, std::pair< double, double > pos) override
 
void AddRGB (double x, double r, double g, double b)
 
double GetFunctionMax ()
 
double GetFunctionMin ()
 
double GetFunctionRange ()
 
void RemoveAllFunctionPoints ()
 
double GetFunctionY (int) 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 ()
 

Protected Attributes

vtkColorTransferFunction * m_ColorTransferFunction
 
QString m_Title
 
double m_GreyValue
 
- Protected Attributes inherited from QmlMitkTransferFunctionCanvas
bool m_ImmediateUpdate
 
float m_Range
 
double m_GreyValue
 
double m_Opacity
 
bool m_LineEditAvailable
 

Properties

double greyValue
 

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 25 of file QmlMitkColorTransferFunctionCanvas.h.

Constructor & Destructor Documentation

QmlMitkColorTransferFunctionCanvas::QmlMitkColorTransferFunctionCanvas ( QQuickPaintedItem *  parent = nullptr)

Definition at line 22 of file QmlMitkColorTransferFunctionCanvas.cpp.

Member Function Documentation

int QmlMitkColorTransferFunctionCanvas::AddFunctionPoint ( double  x,
double   
)
inlineoverridevirtual
void QmlMitkColorTransferFunctionCanvas::AddRGB ( double  x,
double  r,
double  g,
double  b 
)

Definition at line 164 of file QmlMitkColorTransferFunctionCanvas.cpp.

References m_ColorTransferFunction.

void QmlMitkColorTransferFunctionCanvas::create ( )
static
void QmlMitkColorTransferFunctionCanvas::DoubleClickOnHandle ( int  handle)
overridevirtual
double QmlMitkColorTransferFunctionCanvas::GetFunctionMax ( )
inline

Definition at line 80 of file QmlMitkColorTransferFunctionCanvas.h.

double QmlMitkColorTransferFunctionCanvas::GetFunctionMin ( )
inline

Definition at line 85 of file QmlMitkColorTransferFunctionCanvas.h.

double QmlMitkColorTransferFunctionCanvas::GetFunctionRange ( )
inline

Definition at line 90 of file QmlMitkColorTransferFunctionCanvas.h.

int QmlMitkColorTransferFunctionCanvas::GetFunctionSize ( )
inlineoverridevirtual

Implements QmlMitkTransferFunctionCanvas.

Definition at line 70 of file QmlMitkColorTransferFunctionCanvas.h.

Referenced by GetNearHandle(), and paint().

double QmlMitkColorTransferFunctionCanvas::GetFunctionX ( int  index)
inlineoverridevirtual
double QmlMitkColorTransferFunctionCanvas::GetFunctionY ( int  )
inlineoverridevirtual
double QmlMitkColorTransferFunctionCanvas::getGreyValue ( )

Definition at line 39 of file QmlMitkColorTransferFunctionCanvas.cpp.

References m_GreyValue.

int QmlMitkColorTransferFunctionCanvas::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 123 of file QmlMitkColorTransferFunctionCanvas.cpp.

References QmlMitkTransferFunctionCanvas::FunctionToCanvas(), GetFunctionSize(), and GetFunctionX().

void QmlMitkColorTransferFunctionCanvas::MoveFunctionPoint ( int  index,
std::pair< double, double >  pos 
)
overridevirtual
void QmlMitkColorTransferFunctionCanvas::RemoveAllFunctionPoints ( )
inline

Definition at line 105 of file QmlMitkColorTransferFunctionCanvas.h.

void QmlMitkColorTransferFunctionCanvas::RemoveFunctionPoint ( double  x)
inlineoverridevirtual
void QmlMitkColorTransferFunctionCanvas::SetColorTransferFunction ( vtkColorTransferFunction *  colorTransferFunction)
inline
void QmlMitkColorTransferFunctionCanvas::setGreyValue ( double  value)
void QmlMitkColorTransferFunctionCanvas::SetTitle ( const QString &  title)

Definition at line 27 of file QmlMitkColorTransferFunctionCanvas.cpp.

References m_Title.

void QmlMitkColorTransferFunctionCanvas::sync ( )
signal

Referenced by paint().

Member Data Documentation

vtkColorTransferFunction* QmlMitkColorTransferFunctionCanvas::m_ColorTransferFunction
protected
double QmlMitkColorTransferFunctionCanvas::m_GreyValue
protected

Definition at line 121 of file QmlMitkColorTransferFunctionCanvas.h.

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

QString QmlMitkColorTransferFunctionCanvas::m_Title
protected

Definition at line 119 of file QmlMitkColorTransferFunctionCanvas.h.

Referenced by paint(), and SetTitle().

Property Documentation

double QmlMitkColorTransferFunctionCanvas::greyValue
readwrite

Definition at line 28 of file QmlMitkColorTransferFunctionCanvas.h.


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