#include <WdgImage.h>
Inheritance diagram for PSQt::WdgImage:
Public Types | |
typedef GeoImage::image_t | image_t |
Public Slots | |
void | onImageIsUpdated (ndarray< GeoImage::raw_image_t, 2 > &) |
void | onFileNameChanged (const std::string &fname) |
void | onTest () |
void | onZoomResetButton () |
void | onPressOnAxes (QMouseEvent *e, QPointF p) |
void | onHueAnglesUpdated (const float &, const float &) |
void | testSignalZoomIsChanged (int &, int &, int &, int &, float &, float &) |
Signals | |
void | zoomIsChanged (int &, int &, int &, int &, float &, float &) |
void | mouseInPoint (const float &, const float &, const float &) |
Public Member Functions | |
WdgImage (QWidget *parent=0, const std::string &fname=std::string()) | |
WdgImage (QWidget *parent, const QImage *image) | |
virtual | ~WdgImage () |
QPainter * | getPainter () |
QPointF | pointInImage (const QPointF &point_raw) |
QPointF | pointInRaw (const QPointF &point_raw) |
Protected Member Functions | |
void | setFrame () |
void | paintEvent (QPaintEvent *event=0) |
void | closeEvent (QCloseEvent *event=0) |
void | resizeEvent (QResizeEvent *event=0) |
void | mousePressEvent (QMouseEvent *event=0) |
void | mouseReleaseEvent (QMouseEvent *event=0) |
void | mouseMoveEvent (QMouseEvent *event=0) |
void | loadImageFromFile (const std::string &fname=std::string()) |
void | drawRect () |
void | zoomInImage () |
void | setPixmapScailedImage (const QImage *=0) |
void | setCameraImage (const std::string &fname_geo=std::string(), const std::string &fname_img=std::string()) |
void | setColorPixmap () |
void | setColorWhellPixmap () |
void | setColorBar (const unsigned &rows=20, const unsigned &cols=1024, const float &hue1=-120, const float &hue2=60) |
Protected Attributes | |
int | m_xmin_raw |
int | m_xmax_raw |
int | m_ymin_raw |
int | m_ymax_raw |
QPixmap * | m_pixmap_raw |
QPixmap * | m_pixmap_scl |
public slots: void onImageIsUpdated(ndarray<GeoImage::raw_image_t,2>&) ; void onFileNameChanged(const std::string& fname) ; void onTest() ; void onPressOnAxes(QMouseEvent* e, QPointF p); void onHueAnglesUpdated(const float&, const float&); void testSignalZoomIsChanged(int&, int&, int&, int&, float&, float&);
signals : void zoomIsChanged(int&, int&, int&, int&, float&, float&);
This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.
Definition at line 67 of file WdgImage.h.
Definition at line 72 of file WdgImage.h.
PSQt::WdgImage::WdgImage | ( | QWidget * | parent = 0 , |
|
const std::string & | fname = std::string() | |||
) |
Definition at line 26 of file WdgImage.cpp.
References PSQt::DEBUG, CalibFileFinder::fname, loadImageFromFile(), and MsgInLog.
PSQt::WdgImage::WdgImage | ( | QWidget * | parent, | |
const QImage * | image | |||
) |
Definition at line 53 of file WdgImage.cpp.
References PSQt::DEBUG, MsgInLog, and setPixmapScailedImage().
PSQt::WdgImage::~WdgImage | ( | ) | [virtual] |
void PSQt::WdgImage::closeEvent | ( | QCloseEvent * | event = 0 |
) | [protected] |
Reimplemented in PSQt::WdgImageFigs.
Definition at line 336 of file WdgImage.cpp.
References GUIPopupSelectExp::closeEvent(), PSQt::INFO, and MsgInLog.
void PSQt::WdgImage::drawRect | ( | ) | [protected] |
QPainter* PSQt::WdgImage::getPainter | ( | ) | [inline] |
void PSQt::WdgImage::loadImageFromFile | ( | const std::string & | fname = std::string() |
) | [protected] |
Definition at line 461 of file WdgImage.cpp.
References ex_ndarray_from_image::image, PSQt::INFO, MsgInLog, and setPixmapScailedImage().
Referenced by onFileNameChanged(), and WdgImage().
void PSQt::WdgImage::mouseInPoint | ( | const float & | , | |
const float & | , | |||
const float & | ||||
) | [signal] |
Referenced by mousePressEvent().
void PSQt::WdgImage::mouseMoveEvent | ( | QMouseEvent * | event = 0 |
) | [protected] |
Reimplemented in PSQt::WdgImageFigs.
Definition at line 446 of file WdgImage.cpp.
Referenced by PSQt::WdgImageFigs::mouseMoveEvent().
void PSQt::WdgImage::mousePressEvent | ( | QMouseEvent * | event = 0 |
) | [protected] |
Reimplemented in PSQt::WdgImageFigs.
Definition at line 346 of file WdgImage.cpp.
References mouseInPoint(), ex_andor3d::nda, indexCrystals::p, and pointInRaw().
void PSQt::WdgImage::mouseReleaseEvent | ( | QMouseEvent * | event = 0 |
) | [protected] |
Reimplemented in PSQt::WdgImageFigs.
Definition at line 394 of file WdgImage.cpp.
References abs(), xtc2cxi::h, setPixmapScailedImage(), Frame::w, ex_imp::x, Eigen::internal::y, and zoomInImage().
Referenced by PSQt::WdgImageFigs::mouseReleaseEvent().
void PSQt::WdgImage::onFileNameChanged | ( | const std::string & | fname | ) | [slot] |
Definition at line 481 of file WdgImage.cpp.
References PSQt::INFO, loadImageFromFile(), and MsgInLog.
void PSQt::WdgImage::onHueAnglesUpdated | ( | const float & | , | |
const float & | ||||
) | [slot] |
Definition at line 627 of file WdgImage.cpp.
References PSQt::INFO, MsgInLog, and onImageIsUpdated().
void PSQt::WdgImage::onImageIsUpdated | ( | ndarray< GeoImage::raw_image_t, 2 > & | ) | [slot] |
Definition at line 490 of file WdgImage.cpp.
References PSQt::INFO, MsgInLog, and ex_andor3d::nda.
Referenced by onHueAnglesUpdated().
void PSQt::WdgImage::onPressOnAxes | ( | QMouseEvent * | e, | |
QPointF | p | |||
) | [slot] |
void PSQt::WdgImage::onTest | ( | ) | [slot] |
Reimplemented in PSQt::WdgImageFigs.
Definition at line 792 of file WdgImage.cpp.
References PSQt::INFO, MsgInLog, setCameraImage(), setColorBar(), setColorPixmap(), and setColorWhellPixmap().
void PSQt::WdgImage::onZoomResetButton | ( | ) | [slot] |
void PSQt::WdgImage::paintEvent | ( | QPaintEvent * | event = 0 |
) | [protected] |
Reimplemented in PSQt::WdgImageFigs.
Definition at line 137 of file WdgImage.cpp.
References drawRect().
Referenced by PSQt::WdgImageFigs::paintEvent().
QPointF PSQt::WdgImage::pointInImage | ( | const QPointF & | point_raw | ) |
Definition at line 246 of file WdgImage.cpp.
References m_pixmap_scl, m_xmax_raw, m_xmin_raw, m_ymax_raw, m_ymin_raw, CalibPars::size, ex_imp::x, and Eigen::internal::y.
Referenced by PSQt::DragBase::setImagePointsFromRaw().
QPointF PSQt::WdgImage::pointInRaw | ( | const QPointF & | point_raw | ) |
Definition at line 232 of file WdgImage.cpp.
References m_pixmap_scl, m_xmin_raw, m_ymin_raw, ex_imp::x, and Eigen::internal::y.
Referenced by mousePressEvent(), and PSQt::DragBase::setRawPointsFromImage().
void PSQt::WdgImage::resizeEvent | ( | QResizeEvent * | event = 0 |
) | [protected] |
Reimplemented in PSQt::WdgImageFigs.
Definition at line 321 of file WdgImage.cpp.
References m_pixmap_scl.
void PSQt::WdgImage::setCameraImage | ( | const std::string & | fname_geo = std::string() , |
|
const std::string & | fname_img = std::string() | |||
) | [protected] |
Definition at line 768 of file WdgImage.cpp.
References PSQt::GeoImage::getNormalizedImage(), ex_ndarray_from_image::image, PSQt::INFO, MsgInLog, setPixmapScailedImage(), and ndarray< ElemType, NDim >::shape().
Referenced by onTest().
void PSQt::WdgImage::setColorBar | ( | const unsigned & | rows = 20 , |
|
const unsigned & | cols = 1024 , |
|||
const float & | hue1 = -120 , |
|||
const float & | hue2 = 60 | |||
) | [protected] |
Definition at line 745 of file WdgImage.cpp.
References PSQt::ColorTable(), ex_ndarray_from_image::image, PSQt::INFO, MsgInLog, and setPixmapScailedImage().
Referenced by onTest().
void PSQt::WdgImage::setColorPixmap | ( | ) | [protected] |
Definition at line 661 of file WdgImage.cpp.
References ex_all_dets::i, ex_ndarray_from_image::image, PSQt::INFO, MsgInLog, Eigen::pow(), setPixmapScailedImage(), and sqrt().
Referenced by onTest().
void PSQt::WdgImage::setColorWhellPixmap | ( | ) | [protected] |
Definition at line 705 of file WdgImage.cpp.
References PSQt::HSV2RGBA(), ex_all_dets::i, ex_ndarray_from_image::image, PSQt::INFO, MsgInLog, setPixmapScailedImage(), sqrt(), ex_imp::x, Eigen::internal::y, and DragCenter::yc.
Referenced by onTest().
void PSQt::WdgImage::setFrame | ( | ) | [protected] |
void PSQt::WdgImage::setPixmapScailedImage | ( | const QImage * | = 0 |
) | [protected] |
Definition at line 262 of file WdgImage.cpp.
References m_pixmap_raw, m_pixmap_scl, m_xmax_raw, m_xmin_raw, m_ymax_raw, m_ymin_raw, zoomInImage(), and zoomIsChanged().
Referenced by loadImageFromFile(), mouseReleaseEvent(), setCameraImage(), setColorBar(), setColorPixmap(), setColorWhellPixmap(), and WdgImage().
void PSQt::WdgImage::testSignalZoomIsChanged | ( | int & | , | |
int & | , | |||
int & | , | |||
int & | , | |||
float & | , | |||
float & | ||||
) | [slot] |
void PSQt::WdgImage::zoomInImage | ( | ) | [protected] |
Definition at line 182 of file WdgImage.cpp.
References PSQt::DEBUG, m_pixmap_raw, m_pixmap_scl, m_xmax_raw, m_xmin_raw, m_ymax_raw, m_ymin_raw, MsgInLog, and zoomIsChanged().
Referenced by mouseReleaseEvent(), and setPixmapScailedImage().
void PSQt::WdgImage::zoomIsChanged | ( | int & | , | |
int & | , | |||
int & | , | |||
int & | , | |||
float & | , | |||
float & | ||||
) | [signal] |
Referenced by setPixmapScailedImage(), and zoomInImage().
QPixmap* PSQt::WdgImage::m_pixmap_raw [protected] |
Definition at line 106 of file WdgImage.h.
Referenced by setPixmapScailedImage(), zoomInImage(), and ~WdgImage().
QPixmap* PSQt::WdgImage::m_pixmap_scl [protected] |
Definition at line 107 of file WdgImage.h.
Referenced by pointInImage(), pointInRaw(), resizeEvent(), setPixmapScailedImage(), zoomInImage(), and ~WdgImage().
int PSQt::WdgImage::m_xmax_raw [protected] |
Definition at line 102 of file WdgImage.h.
Referenced by pointInImage(), setPixmapScailedImage(), and zoomInImage().
int PSQt::WdgImage::m_xmin_raw [protected] |
Definition at line 101 of file WdgImage.h.
Referenced by pointInImage(), pointInRaw(), setPixmapScailedImage(), and zoomInImage().
int PSQt::WdgImage::m_ymax_raw [protected] |
Definition at line 104 of file WdgImage.h.
Referenced by pointInImage(), setPixmapScailedImage(), and zoomInImage().
int PSQt::WdgImage::m_ymin_raw [protected] |
Definition at line 103 of file WdgImage.h.
Referenced by pointInImage(), pointInRaw(), setPixmapScailedImage(), and zoomInImage().