#include <ImageView.h>
Public Slots | |
virtual void | fitImage () |
virtual void | oneToOneImage () |
Public Member Functions | |
virtual void | clearColorMap () |
virtual void | clearImage () |
virtual int | createColorMap (int numEntriesReq=0, bool Initialise=true) |
virtual int | createImageCopy (void *pSrcPixelData, unsigned long width, unsigned long height, int format, unsigned short numSigBitsPerSample, int displayMode=IV_DISPLAY_RESET) |
virtual void | EnableFitImageAction (bool Enable) |
virtual void | EnableMouseEvents (bool Enable) |
virtual void | EnableOneToOneAction (bool Enable) |
virtual void | EnableStatusBar (bool Enable) |
virtual void | EnableToolBar (bool Enable) |
const char * | getName (void) const |
returns the name of the view (important for messages) | |
virtual int | getNumColorMapEntries () const |
ImageView (QWidget *parent) | |
bool | onHasMsg (const char *pMsg) const |
Message handler test. | |
bool | onMsg (const char *pMsg, const char **ppReturn) |
Message handler. | |
void | onUpdate (void) |
get called when the document is updated | |
virtual int | pointImageTo (void *pSrcPixelData, unsigned long width, unsigned long height, int format, unsigned short numSigBitsPerSample, bool takeOwnership, int displayMode=IV_DISPLAY_RESET) |
virtual int | setColorMapAlphaValue (int index, float value) |
virtual int | setColorMapBlueValue (int index, float value) |
virtual int | setColorMapGreenValue (int index, float value) |
virtual int | setColorMapRedValue (int index, float value) |
virtual int | setColorMapRGBAValue (int index, float red, float green, float blue, float alpha=1.0) |
virtual | ~ImageView () |
Protected Types | |
enum | { nothing = 0, panning, zooming, selection, addselection } |
Protected Slots | |
virtual void | drawGraphics () |
Protected Member Functions | |
virtual void | addSelect (int currX, int currY) |
virtual void | createActions () |
virtual QString | createStatusBarText () |
virtual void | mouseDoubleClickEvent (QMouseEvent *cEvent) |
virtual void | mouseMoveEvent (QMouseEvent *cEvent) |
virtual void | mousePressEvent (QMouseEvent *cEvent) |
virtual void | mouseReleaseEvent (QMouseEvent *cEvent) |
virtual void | select (int currX, int currY) |
virtual void | showEvent (QShowEvent *e) |
virtual void | showOriginalColors () |
virtual void | startDrag () |
virtual void | updateStatusBar () |
virtual void | wheelEvent (QWheelEvent *cEvent) |
virtual void | zoom (int prevX, int prevY, int currX, int currY) |
Protected Attributes | |
enum ImageGui::ImageView:: { ... } | _currMode |
int | _currX |
int | _currY |
bool | _mouseEventsEnabled |
QMenu * | _pContextMenu |
QAction * | _pFitAct |
GLImageBox * | _pGLImageBox |
QAction * | _pOneToOneAct |
QToolBar * | _pStdToolBar |
bool | _statusBarEnabled |
int | dragStartWCx |
int | dragStartWCy |
Definition at line 33 of file ImageView.h.
anonymous enum [protected] |
Definition at line 91 of file ImageView.h.
ImageView::ImageView | ( | QWidget * | parent | ) |
Definition at line 40 of file ImageView.cpp.
References _currMode, _currX, _currY, _mouseEventsEnabled, _pGLImageBox, draftlibs::fcgeo::connect(), createActions(), drawGraphics(), EnableStatusBar(), and nothing.
ImageView::~ImageView | ( | ) | [virtual] |
Definition at line 67 of file ImageView.cpp.
void ImageView::addSelect | ( | int | currX, | |
int | currY | |||
) | [protected, virtual] |
Definition at line 593 of file ImageView.cpp.
Referenced by mouseReleaseEvent().
void ImageView::clearColorMap | ( | ) | [virtual] |
Definition at line 188 of file ImageView.cpp.
References _pGLImageBox, and ImageGui::GLImageBox::clearColorMap().
void ImageView::clearImage | ( | ) | [virtual] |
Definition at line 242 of file ImageView.cpp.
References _pGLImageBox, ImageGui::GLImageBox::clearImage(), ImageGui::GLImageBox::redraw(), and updateStatusBar().
void ImageView::createActions | ( | ) | [protected, virtual] |
Definition at line 73 of file ImageView.cpp.
References _pContextMenu, _pFitAct, _pOneToOneAct, _pStdToolBar, draftlibs::fcgeo::connect(), fitImage(), ImageGui::image_oneToOne, ImageGui::image_stretch, and oneToOneImage().
Referenced by ImageView().
int ImageView::createColorMap | ( | int | numEntriesReq = 0 , |
|
bool | Initialise = true | |||
) | [virtual] |
Definition at line 176 of file ImageView.cpp.
References _pGLImageBox, and ImageGui::GLImageBox::createColorMap().
int ImageView::createImageCopy | ( | void * | pSrcPixelData, | |
unsigned long | width, | |||
unsigned long | height, | |||
int | format, | |||
unsigned short | numSigBitsPerSample, | |||
int | displayMode = IV_DISPLAY_RESET | |||
) | [virtual] |
Definition at line 261 of file ImageView.cpp.
References _pGLImageBox, ImageGui::GLImageBox::createImageCopy(), showOriginalColors(), and updateStatusBar().
QString ImageView::createStatusBarText | ( | ) | [protected, virtual] |
Definition at line 461 of file ImageView.cpp.
References _currX, _currY, _pGLImageBox, ImageGui::GLImageBox::getImageFormat(), ImageGui::GLImageBox::getImageSample(), ImageGui::GLImageBox::getZoomFactor(), IB_CF_BGR24, IB_CF_BGR48, IB_CF_BGRA32, IB_CF_BGRA64, IB_CF_GREY16, IB_CF_GREY32, IB_CF_GREY8, IB_CF_RGB24, IB_CF_RGB48, IB_CF_RGBA32, IB_CF_RGBA64, Py::int, ImageGui::GLImageBox::WCToIC_X(), and ImageGui::GLImageBox::WCToIC_Y().
Referenced by updateStatusBar().
void ImageView::drawGraphics | ( | ) | [protected, virtual, slot] |
Definition at line 602 of file ImageView.cpp.
Referenced by ImageView().
void ImageView::EnableFitImageAction | ( | bool | Enable | ) | [virtual] |
Definition at line 139 of file ImageView.cpp.
References _pFitAct.
void ImageView::EnableMouseEvents | ( | bool | Enable | ) | [virtual] |
Definition at line 125 of file ImageView.cpp.
References _mouseEventsEnabled.
void ImageView::EnableOneToOneAction | ( | bool | Enable | ) | [virtual] |
Definition at line 132 of file ImageView.cpp.
References _pOneToOneAct.
void ImageView::EnableStatusBar | ( | bool | Enable | ) | [virtual] |
Definition at line 100 of file ImageView.cpp.
References _statusBarEnabled.
Referenced by ImageView().
void ImageView::EnableToolBar | ( | bool | Enable | ) | [virtual] |
Definition at line 119 of file ImageView.cpp.
References _pStdToolBar.
void ImageView::fitImage | ( | ) | [virtual, slot] |
Definition at line 145 of file ImageView.cpp.
References _pGLImageBox, and ImageGui::GLImageBox::stretchToFit().
Referenced by createActions().
const char* ImageGui::ImageView::getName | ( | void | ) | const [inline, virtual] |
returns the name of the view (important for messages)
Reimplemented from Gui::BaseView.
Definition at line 41 of file ImageView.h.
int ImageView::getNumColorMapEntries | ( | ) | const [virtual] |
Definition at line 182 of file ImageView.cpp.
References _pGLImageBox, and ImageGui::GLImageBox::getNumColorMapEntries().
void ImageView::mouseDoubleClickEvent | ( | QMouseEvent * | cEvent | ) | [protected, virtual] |
Definition at line 330 of file ImageView.cpp.
References _currX, _currY, _mouseEventsEnabled, _pGLImageBox, ImageGui::GLImageBox::getZoomFactor(), Py::int, offset(), ImageGui::GLImageBox::redraw(), ImageGui::GLImageBox::setZoomFactor(), updateStatusBar(), ImageGui::GLImageBox::WCToIC_X(), and ImageGui::GLImageBox::WCToIC_Y().
void ImageView::mouseMoveEvent | ( | QMouseEvent * | cEvent | ) | [protected, virtual] |
Definition at line 355 of file ImageView.cpp.
References _currMode, _currX, _currY, _mouseEventsEnabled, _pGLImageBox, dragStartWCx, dragStartWCy, nothing, offset(), panning, ImageGui::GLImageBox::relMoveWC(), updateStatusBar(), zoom(), and zooming.
void ImageView::mousePressEvent | ( | QMouseEvent * | cEvent | ) | [protected, virtual] |
Definition at line 294 of file ImageView.cpp.
References _currMode, _currX, _currY, _mouseEventsEnabled, _pContextMenu, _pGLImageBox, addselection, nothing, offset(), panning, selection, and startDrag().
void ImageView::mouseReleaseEvent | ( | QMouseEvent * | cEvent | ) | [protected, virtual] |
Definition at line 388 of file ImageView.cpp.
References _currMode, _mouseEventsEnabled, _pGLImageBox, addSelect(), addselection, nothing, offset(), panning, select(), and selection.
void ImageView::oneToOneImage | ( | ) | [virtual, slot] |
Definition at line 152 of file ImageView.cpp.
References _pGLImageBox, ImageGui::GLImageBox::redraw(), ImageGui::GLImageBox::setNormal(), and updateStatusBar().
Referenced by createActions().
bool ImageGui::ImageView::onHasMsg | ( | const char * | pMsg | ) | const [inline, virtual] |
bool ImageGui::ImageView::onMsg | ( | const char * | pMsg, | |
const char ** | ppReturn | |||
) | [inline, virtual] |
Message handler.
receive a message
Reimplemented from Gui::MDIView.
Definition at line 44 of file ImageView.h.
void ImageGui::ImageView::onUpdate | ( | void | ) | [inline, virtual] |
get called when the document is updated
Reimplemented from Gui::BaseView.
Definition at line 42 of file ImageView.h.
int ImageView::pointImageTo | ( | void * | pSrcPixelData, | |
unsigned long | width, | |||
unsigned long | height, | |||
int | format, | |||
unsigned short | numSigBitsPerSample, | |||
bool | takeOwnership, | |||
int | displayMode = IV_DISPLAY_RESET | |||
) | [virtual] |
Definition at line 285 of file ImageView.cpp.
References _pGLImageBox, ImageGui::GLImageBox::pointImageTo(), showOriginalColors(), and updateStatusBar().
Referenced by open().
void ImageView::select | ( | int | currX, | |
int | currY | |||
) | [protected, virtual] |
Definition at line 586 of file ImageView.cpp.
Referenced by mouseReleaseEvent().
int ImageView::setColorMapAlphaValue | ( | int | index, | |
float | value | |||
) | [virtual] |
Definition at line 236 of file ImageView.cpp.
References _pGLImageBox, and ImageGui::GLImageBox::setColorMapAlphaValue().
int ImageView::setColorMapBlueValue | ( | int | index, | |
float | value | |||
) | [virtual] |
Definition at line 227 of file ImageView.cpp.
References _pGLImageBox, and ImageGui::GLImageBox::setColorMapBlueValue().
int ImageView::setColorMapGreenValue | ( | int | index, | |
float | value | |||
) | [virtual] |
Definition at line 218 of file ImageView.cpp.
References _pGLImageBox, and ImageGui::GLImageBox::setColorMapGreenValue().
int ImageView::setColorMapRedValue | ( | int | index, | |
float | value | |||
) | [virtual] |
Definition at line 209 of file ImageView.cpp.
References _pGLImageBox, and ImageGui::GLImageBox::setColorMapRedValue().
int ImageView::setColorMapRGBAValue | ( | int | index, | |
float | red, | |||
float | green, | |||
float | blue, | |||
float | alpha = 1.0 | |||
) | [virtual] |
Definition at line 200 of file ImageView.cpp.
References _pGLImageBox, and ImageGui::GLImageBox::setColorMapRGBAValue().
void ImageView::showEvent | ( | QShowEvent * | e | ) | [protected, virtual] |
Definition at line 440 of file ImageView.cpp.
References _pGLImageBox.
void ImageView::showOriginalColors | ( | ) | [protected, virtual] |
Definition at line 162 of file ImageView.cpp.
References _pGLImageBox, ImageGui::GLImageBox::clearColorMap(), and ImageGui::GLImageBox::redraw().
Referenced by createImageCopy(), and pointImageTo().
void ImageView::startDrag | ( | ) | [protected, virtual] |
Definition at line 555 of file ImageView.cpp.
References _currX, _currY, _pGLImageBox, dragStartWCx, dragStartWCy, and ImageGui::GLImageBox::fixBasePosCurr().
Referenced by mousePressEvent().
void ImageView::updateStatusBar | ( | ) | [protected, virtual] |
Definition at line 446 of file ImageView.cpp.
References _statusBarEnabled, and createStatusBarText().
Referenced by clearImage(), createImageCopy(), mouseDoubleClickEvent(), mouseMoveEvent(), oneToOneImage(), pointImageTo(), and wheelEvent().
void ImageView::wheelEvent | ( | QWheelEvent * | cEvent | ) | [protected, virtual] |
Definition at line 416 of file ImageView.cpp.
References _currX, _currY, _mouseEventsEnabled, _pGLImageBox, ImageGui::GLImageBox::getCentrePoint(), ImageGui::GLImageBox::getZoomFactor(), offset(), KDL::pow(), ImageGui::GLImageBox::redraw(), ImageGui::GLImageBox::setZoomFactor(), and updateStatusBar().
void ImageView::zoom | ( | int | prevX, | |
int | prevY, | |||
int | currX, | |||
int | currY | |||
) | [protected, virtual] |
Definition at line 563 of file ImageView.cpp.
References _pGLImageBox, Py::abs(), ImageGui::GLImageBox::getCentrePoint(), ImageGui::GLImageBox::getZoomFactor(), ImageGui::GLImageBox::redraw(), and ImageGui::GLImageBox::setZoomFactor().
Referenced by mouseMoveEvent().
enum { ... } ImageGui::ImageView::_currMode [protected] |
Referenced by ImageView(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
int ImageGui::ImageView::_currX [protected] |
Definition at line 101 of file ImageView.h.
Referenced by createStatusBarText(), ImageView(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), startDrag(), and wheelEvent().
int ImageGui::ImageView::_currY [protected] |
Definition at line 102 of file ImageView.h.
Referenced by createStatusBarText(), ImageView(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), startDrag(), and wheelEvent().
bool ImageGui::ImageView::_mouseEventsEnabled [protected] |
Definition at line 118 of file ImageView.h.
Referenced by EnableMouseEvents(), ImageView(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and wheelEvent().
QMenu* ImageGui::ImageView::_pContextMenu [protected] |
Definition at line 111 of file ImageView.h.
Referenced by createActions(), and mousePressEvent().
QAction* ImageGui::ImageView::_pFitAct [protected] |
Definition at line 107 of file ImageView.h.
Referenced by createActions(), and EnableFitImageAction().
GLImageBox* ImageGui::ImageView::_pGLImageBox [protected] |
Definition at line 99 of file ImageView.h.
Referenced by clearColorMap(), clearImage(), createColorMap(), createImageCopy(), createStatusBarText(), fitImage(), getNumColorMapEntries(), ImageView(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), oneToOneImage(), pointImageTo(), setColorMapAlphaValue(), setColorMapBlueValue(), setColorMapGreenValue(), setColorMapRedValue(), setColorMapRGBAValue(), showEvent(), showOriginalColors(), startDrag(), wheelEvent(), and zoom().
QAction* ImageGui::ImageView::_pOneToOneAct [protected] |
Definition at line 108 of file ImageView.h.
Referenced by createActions(), and EnableOneToOneAction().
QToolBar* ImageGui::ImageView::_pStdToolBar [protected] |
Definition at line 114 of file ImageView.h.
Referenced by createActions(), and EnableToolBar().
bool ImageGui::ImageView::_statusBarEnabled [protected] |
Definition at line 117 of file ImageView.h.
Referenced by EnableStatusBar(), and updateStatusBar().
int ImageGui::ImageView::dragStartWCx [protected] |
Definition at line 103 of file ImageView.h.
Referenced by mouseMoveEvent(), and startDrag().
int ImageGui::ImageView::dragStartWCy [protected] |
Definition at line 104 of file ImageView.h.
Referenced by mouseMoveEvent(), and startDrag().