19 #include <QQuickWindow>
34 this->setEnabled(
false);
36 setAcceptHoverEvents(
true);
37 setAcceptedMouseButtons(Qt::AllButtons);
46 int fact = -
event->delta() * 0.15;
48 if(event->orientation() == Qt::Horizontal)
53 if(lower < this->
m_Min )
57 else if (upper > this->
m_Max)
80 if (! dynamic_cast<mitk::Image*>(node->
GetData()))
82 MITK_WARN <<
"QmlMitkTransferFunctionItem::SetDataNode called with non-image node";
240 qmlRegisterType<QmlMitkTransferFunctionItem>(
"Mitk.Views", 1, 0,
"TransferItem");
The TransferFunctionProperty class Property class for the mitk::TransferFunction. ...
QmlMitkColorTransferFunctionCanvas * m_ColorItem
void setColorItem(QmlMitkColorTransferFunctionCanvas *item)
~QmlMitkTransferFunctionItem()
Base of all data objects.
void setOpactityItem(QmlMitkPiecewiseFunctionCanvas *item)
static QmlMitkTransferFunctionItem * instance
void SetColorTransferFunction(vtkColorTransferFunction *colorTransferFunction)
Organizes the rendering process.
virtual double GetMax() const =0
Returns the maximum value of the histogram.
QmlMitkPiecewiseFunctionCanvas * m_OpacityItem
QmlMitkPiecewiseFunctionCanvas * getOpacityItem()
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
mitk::BaseProperty * GetProperty(const char *propertyKey, const mitk::BaseRenderer *renderer=nullptr) const
Get the property (instance of BaseProperty) with key propertyKey from the PropertyList of the rendere...
virtual double GetMin() const =0
Returns the minimal value of the histogram.
void SetPiecewiseFunction(vtkPiecewiseFunction *piecewiseFunction)
void wheelEvent(QWheelEvent *event) override
mitk::TransferFunctionProperty::Pointer tfpToChange
QmlMitkTransferFunctionItem(QQuickItem *parent=nullptr)
Abstract superclass for histograms with double values. Classes which are deriving from this class can...
void SetHistogram(mitk::SimpleHistogram *histogram)
void setCurrentMin(double currentMin)
void setCurrentMax(double currentMax)
void OnSpanChanged(int lower, int upper)
QmlMitkColorTransferFunctionCanvas * getColorItem()
mitk::SimpleHistogramCache histogramCache
void SetProperty(const char *propertyKey, BaseProperty *property, const mitk::BaseRenderer *renderer=nullptr)
Set the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer ...
void SetDataNode(mitk::DataNode *node, const mitk::BaseRenderer *renderer=nullptr)
Class for nodes of the DataTree.