Fraxinus  16.5.0-fx-rc9
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cx::TransferFunctionAlphaWidget Class Reference

#include <cxTransferFunctionAlphaWidget.h>

Inheritance diagram for cx::TransferFunctionAlphaWidget:
cx::BaseWidget cx::OptimizedUpdateWidget

Classes

struct  AlphaPoint
 Internal placeholder for a function point. More...
 

Public Slots

void activeImageTransferFunctionsChangedSlot ()
 Acts when the image's transfer function is changed. More...
 
- Public Slots inherited from cx::BaseWidget
void adjustSizeSlot ()
 
- Public Slots inherited from cx::OptimizedUpdateWidget
virtual void setModified ()
 

Public Member Functions

 TransferFunctionAlphaWidget (ActiveDataPtr activeData, QWidget *parent)
 
virtual ~TransferFunctionAlphaWidget ()
 
void setData (ImagePtr image, ImageTFDataPtr tfData)
 
void setReadOnly (bool readOnly)
 Set class readonly: Disable mouse interaction. More...
 
- Public Member Functions inherited from cx::BaseWidget
 BaseWidget (QWidget *parent, QString objectName, QString windowTitle)
 
virtual ~BaseWidget ()
 
QWidget * createMethodWidget (QWidget *inputWidget, QWidget *outputWidget, QString methodname, bool inputChecked=false, bool outputVisible=true)
 Create a specialized widget for filters, with input/ouput, enable and options. More...
 
QGroupBox * createGroupbox (QWidget *widget, QString boxname)
 Create a group box with a given name. More...
 
QGroupBox * wrapInGroupBox (QWidget *base, QString name)
 
CXFramewrapInFrame (QWidget *base)
 
QAction * createAction2 (QObject *parent, QIcon iconName, QString text, QString tip, QLayout *layout=NULL, QToolButton *button=new QToolButton())
 
template<class T >
QAction * createAction (QObject *parent, QIcon iconName, QString text, QString tip, T slot, QLayout *layout=NULL, QToolButton *button=new QToolButton())
 
- Public Member Functions inherited from cx::OptimizedUpdateWidget
 OptimizedUpdateWidget (QWidget *parent=NULL)
 
virtual ~OptimizedUpdateWidget ()
 
void forcePrePaint ()
 

Protected Member Functions

virtual void enterEvent (QEvent *event)
 Reimplemented from superclass. More...
 
virtual void leaveEvent (QEvent *event)
 Reimplemented from superclass. More...
 
virtual void mousePressEvent (QMouseEvent *event)
 Reimplemented from superclass. More...
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 Reimplemented from superclass. More...
 
virtual void mouseMoveEvent (QMouseEvent *event)
 Reimplemented from superclass. More...
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void paintEvent (QPaintEvent *event)
 Reimplemented from superclass. Paints the transferfunction GUI. More...
 
virtual void resizeEvent (QResizeEvent *evt)
 Reimplemented from superclass. More...
 
AlphaPoint selectPoint (QPoint pos)
 
AlphaPoint getCurrentAlphaPoint (QPoint pos)
 Get aplha point based on mCurrentClickX and mCurrentClickY. More...
 
void toggleSelectedPoint (QPoint pos)
 Turn a transfer function point on or off (depending on it is on or not) More...
 
void moveCurrentAlphaPoint (AlphaPoint newAlphaPoint)
 
QPoint alpha2screen (AlphaPoint pt) const
 
void updateTooltip (QPoint pos)
 
void updateTooltip (AlphaPoint point)
 
bool isEndpoint (int intensity) const
 
void paintHistogram (QPainter &painter)
 
void paintOpacityGraph (QPainter &painter)
 
std::pair< int, int > findAllowedMoveRangeAroundAlphaPoint (int selectedPointIntensity)
 
virtual QSize sizeHint () const
 
- Protected Member Functions inherited from cx::BaseWidget
virtual void showEvent (QShowEvent *event)
 
- Protected Member Functions inherited from cx::OptimizedUpdateWidget
virtual void prePaintEvent ()
 

Protected Attributes

QRect mFullArea
 The full widget area. More...
 
QRect mPlotArea
 The plot area. More...
 
int mBorder
 The size of the border around the transferfunction. The size of the rectangles are mBorder * 2. More...
 
bool mReadOnly
 Is class readOnly? Eg no mouse interaction possible. More...
 
std::map< int, QRect > mPointRects
 Cache with all point rectangles. More...
 
AlphaPoint mSelectedAlphaPoint
 The current alpha point. More...
 
ImagePtr mImage
 
ImageTFDataPtr mImageTF
 
ActiveImageProxyPtr mActiveImageProxy
 

Additional Inherited Members

- Static Public Member Functions inherited from cx::BaseWidget
static QFrame * createHorizontalLine ()
 Creates a horizontal line which can be inserted into widgets. More...
 

Detailed Description

Date
Mar 23, 2009 \author Janne Beate Bakeng, SINTEF \author Ole Vegard Solberg, SINTEF

Definition at line 59 of file cxTransferFunctionAlphaWidget.h.

Constructor & Destructor Documentation

cx::TransferFunctionAlphaWidget::TransferFunctionAlphaWidget ( ActiveDataPtr  activeData,
QWidget *  parent 
)

Definition at line 56 of file cxTransferFunctionAlphaWidget.cpp.

cx::TransferFunctionAlphaWidget::~TransferFunctionAlphaWidget ( )
virtual

Definition at line 69 of file cxTransferFunctionAlphaWidget.cpp.

Member Function Documentation

void cx::TransferFunctionAlphaWidget::activeImageTransferFunctionsChangedSlot ( )
slot

Acts when the image's transfer function is changed.

Definition at line 87 of file cxTransferFunctionAlphaWidget.cpp.

QPoint cx::TransferFunctionAlphaWidget::alpha2screen ( AlphaPoint  pt) const
protected

Definition at line 272 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::enterEvent ( QEvent *  event)
protectedvirtual

Reimplemented from superclass.

Definition at line 92 of file cxTransferFunctionAlphaWidget.cpp.

std::pair< int, int > cx::TransferFunctionAlphaWidget::findAllowedMoveRangeAroundAlphaPoint ( int  selectedPointIntensity)
protected

Definition at line 404 of file cxTransferFunctionAlphaWidget.cpp.

TransferFunctionAlphaWidget::AlphaPoint cx::TransferFunctionAlphaWidget::getCurrentAlphaPoint ( QPoint  pos)
protected

Get aplha point based on mCurrentClickX and mCurrentClickY.

Definition at line 350 of file cxTransferFunctionAlphaWidget.cpp.

bool cx::TransferFunctionAlphaWidget::isEndpoint ( int  intensity) const
protected

Definition at line 341 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::keyPressEvent ( QKeyEvent *  event)
protectedvirtual

Definition at line 146 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::leaveEvent ( QEvent *  event)
protectedvirtual

Reimplemented from superclass.

Definition at line 97 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::mouseMoveEvent ( QMouseEvent *  event)
protectedvirtual

Reimplemented from superclass.

Definition at line 128 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::mousePressEvent ( QMouseEvent *  event)
protectedvirtual

Reimplemented from superclass.

Definition at line 102 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::mouseReleaseEvent ( QMouseEvent *  event)
protectedvirtual

Reimplemented from superclass.

Definition at line 120 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::moveCurrentAlphaPoint ( AlphaPoint  newAlphaPoint)
protected

Definition at line 388 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::paintEvent ( QPaintEvent *  event)
protectedvirtual

Reimplemented from superclass. Paints the transferfunction GUI.

Reimplemented from cx::OptimizedUpdateWidget.

Definition at line 193 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::paintHistogram ( QPainter &  painter)
protected

Definition at line 284 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::paintOpacityGraph ( QPainter &  painter)
protected

Definition at line 216 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::resizeEvent ( QResizeEvent *  evt)
protectedvirtual

Reimplemented from superclass.

Definition at line 312 of file cxTransferFunctionAlphaWidget.cpp.

TransferFunctionAlphaWidget::AlphaPoint cx::TransferFunctionAlphaWidget::selectPoint ( QPoint  pos)
protected

Definition at line 322 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::setData ( ImagePtr  image,
ImageTFDataPtr  tfData 
)

Definition at line 72 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::setReadOnly ( bool  readOnly)

Set class readonly: Disable mouse interaction.

Definition at line 82 of file cxTransferFunctionAlphaWidget.cpp.

virtual QSize cx::TransferFunctionAlphaWidget::sizeHint ( ) const
inlineprotectedvirtual

Definition at line 136 of file cxTransferFunctionAlphaWidget.h.

void cx::TransferFunctionAlphaWidget::toggleSelectedPoint ( QPoint  pos)
protected

Turn a transfer function point on or off (depending on it is on or not)

Definition at line 365 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::updateTooltip ( QPoint  pos)
protected

Definition at line 176 of file cxTransferFunctionAlphaWidget.cpp.

void cx::TransferFunctionAlphaWidget::updateTooltip ( AlphaPoint  point)
protected

Definition at line 185 of file cxTransferFunctionAlphaWidget.cpp.

Member Data Documentation

ActiveImageProxyPtr cx::TransferFunctionAlphaWidget::mActiveImageProxy
protected

Definition at line 134 of file cxTransferFunctionAlphaWidget.h.

int cx::TransferFunctionAlphaWidget::mBorder
protected

The size of the border around the transferfunction. The size of the rectangles are mBorder * 2.

Definition at line 125 of file cxTransferFunctionAlphaWidget.h.

QRect cx::TransferFunctionAlphaWidget::mFullArea
protected

The full widget area.

Definition at line 123 of file cxTransferFunctionAlphaWidget.h.

ImagePtr cx::TransferFunctionAlphaWidget::mImage
protected

Definition at line 132 of file cxTransferFunctionAlphaWidget.h.

ImageTFDataPtr cx::TransferFunctionAlphaWidget::mImageTF
protected

Definition at line 133 of file cxTransferFunctionAlphaWidget.h.

QRect cx::TransferFunctionAlphaWidget::mPlotArea
protected

The plot area.

Definition at line 124 of file cxTransferFunctionAlphaWidget.h.

std::map<int, QRect> cx::TransferFunctionAlphaWidget::mPointRects
protected

Cache with all point rectangles.

Definition at line 128 of file cxTransferFunctionAlphaWidget.h.

bool cx::TransferFunctionAlphaWidget::mReadOnly
protected

Is class readOnly? Eg no mouse interaction possible.

Definition at line 126 of file cxTransferFunctionAlphaWidget.h.

AlphaPoint cx::TransferFunctionAlphaWidget::mSelectedAlphaPoint
protected

The current alpha point.

Definition at line 129 of file cxTransferFunctionAlphaWidget.h.


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