open_iA 2021.08
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
Signals | Public Member Functions | Static Public Attributes | List of all members
iAProfileWidget Class Reference

#include <iAProfileWidget.h>

Inheritance diagram for iAProfileWidget:
[legend]
Collaboration diagram for iAProfileWidget:
[legend]

Signals

void binSelected (int newBin)
 
- Signals inherited from iAChartWidget
void axisChanged ()
 Fires whenever the displayed x/y axis has changed (i.e. if it has been shifted, zoomed, or reset). More...
 
void clicked (double x, Qt::KeyboardModifiers modifiers)
 Fires whenever the user clicks on the chart. More...
 
void dblClicked ()
 Fires whenever the user double-clicks on the chart. More...
 
void plotsSelected (std::vector< size_t > const &plotIDs)
 Fires whenever one or more plots are selected. More...
 

Public Member Functions

 iAProfileWidget (QWidget *parent, vtkPolyData *profData, double rayLength, QString yCapt="Y Axis", QString xCapt="X Axis")
 
void initialize (vtkPolyData *profData, double rayLength)
 
- Public Member Functions inherited from iAChartWidget
 iAChartWidget (QWidget *parent, QString const &xLabel, QString const &yLabel)
 
 ~iAChartWidget ()
 
void addImageOverlay (QSharedPointer< QImage > imgOverlay, bool stretch=true)
 Add an image overlay to the chart. More...
 
void addPlot (QSharedPointer< iAPlot > plot)
 Add a plot to the chart. More...
 
virtual int bottomMargin () const
 Retrieve bottom margin (in pixels). More...
 
bool categoricalAxis () const
 Whether the axis of this chart is categorical type (as determined by the first plot). More...
 
virtual int chartHeight () const
 Retrieve height (in pixels) of the actual chart, i.e. the region where plots are drawn, without space for the margins / axes. More...
 
virtual int chartWidth () const
 Retrieve width (in pixels) of the actual chart, i.e. the region where plots are drawn, without space for margins / axes. More...
 
void clearImageOverlays ()
 Clear all image overlays: More...
 
void clearMarkers ()
 Remove all markers. More...
 
void clearPlots ()
 Remove all plots from the chart. More...
 
QPoint contextMenuPos () const
 Get the position where the context menu was last shown. More...
 
int dataBin2ScreenX (long x) const
 Convert a bin number to a screen coordinate. More...
 
QImage drawOffscreen ()
 Draws the chart off screen and returns an image of the result. More...
 
double fullChartWidth () const
 width in pixels that the chart would have if it were fully shown (considering current zoom level)k More...
 
bool isTooltipShown () const
 Check whether currently tooltips are enabled. More...
 
virtual int leftMargin () const
 Retrieve left margin (in pixels). More...
 
double maxXZoom () const
 Get the maximum zoom factor in x direction that can be in use. More...
 
std::vector< QSharedPointer< iAPlot > > const & plots ()
 Retrieve all plots currently in the chart. More...
 
void removeImageOverlay (QImage *imgOverlay)
 Remove an image overlay from the chart. More...
 
void removePlot (QSharedPointer< iAPlot > plot)
 Remove a plot from the chart. More...
 
void removeXMarker (double xPos)
 Remove the marker at the given x position (in data space, see screenX2DataBin for details). More...
 
void resetYBounds ()
 Reset y bounds to the range specified by the current plots. More...
 
long screenX2DataBin (int x) const
 Convert an x screen coordinate to a bin space index; Note that there are (at least) four different coordinate spaces to consider: More...
 
void setCaptionPosition (Qt::Alignment captionAlignment)
 Set position of x axis caption (Center/Left, Bottom/Top, via Qt::Align... flags). More...
 
void setEmptyText (QString const &text)
 Set text shown when no plot available. More...
 
void setSelectionMode (SelectionMode mode)
 Determine how a selection works; see SelectionMode: either disable selection, or allow selection of single plots. More...
 
void setShowXAxisLabel (bool show)
 Set whether x axis caption should be shown or not. More...
 
void setXBounds (double minVal, double maxVal)
 Set custom x bounds (the interval the x axis covers). More...
 
void setXCaption (QString const &caption)
 Set the caption shown along the x axis. More...
 
void setXMarker (double xPos, QColor const &color, Qt::PenStyle penStyle=Qt::SolidLine)
 Add or update a marker at a specific x position (in data space, see screenX2DataBin for details) in the given color. More...
 
void setYBounds (iAPlotData::DataType minVal, iAPlotData::DataType maxVal)
 Set custom y bounds (the interval the y axis covers). More...
 
void setYCaption (QString const &caption)
 Set the caption shown along the y axis. More...
 
void setYMappingMode (AxisMappingType drawMode)
 Set either linear or logarithmic mapping mode. More...
 
void updateBounds (size_t startPlot=0)
 Update all bounds such that all current plots are in the visible area of the chart. More...
 
void updateXBounds (size_t startPlot=0)
 Update x bounds of the chart such that the x bounds of all current plots are in the visible area of the chart. More...
 
void updateYBounds (size_t startPlot=0)
 Update y bounds of the chart such that the y bounds of all current plots are in the visible area of the chart. More...
 
double xRange () const
 Get the range in x direction (i.e. maximum - minimum of x bounds) More...
 
double xZoom () const
 Get x/y zoom and shift. More...
 
double yZoom () const
 
double xShift () const
 
int yShift () const
 
void setXShift (double xShift)
 set the x zoom/shift: More...
 
void setXZoom (double xZoom)
 
void setYZoom (double yZoom)
 
iAPlotData::DataType minYDataValue (size_t startPlot=0) const
 Retrieve minimum/maximum y data value. More...
 
iAPlotData::DataType maxYDataValue (size_t startPlot=0) const
 
iAMapper const & xMapper () const
 Get mapper for x/y coordinates. More...
 
iAMapper const & yMapper () const
 
int data2MouseX (double dataX)
 Convert mouse X coordinates (in chart already, i.e. More...
 
double mouse2DataX (int mouseX)
 
virtual iAPlotData::DataType const * yBounds () const
 Get x/y bounds as array of size 2 (minimum, maximum) More...
 
virtual double const * xBounds () const
 

Static Public Attributes

static const int TEXT_Y = 15
 
- Static Public Attributes inherited from iAChartWidget
static const size_t MaxPossiblePlot = std::numeric_limits<size_t>::max()
 

Additional Inherited Members

- Public Types inherited from iAChartWidget
enum  AxisMappingType { Linear , Logarithmic }
 
enum  Mode { NO_MODE , MOVE_VIEW_MODE , X_ZOOM_MODE , Y_ZOOM_MODE }
 
enum  SelectionMode { SelectionDisabled , SelectPlot }
 
- Public Slots inherited from iAChartWidget
void resetView ()
 Reset view (zoom and shift in x and y direction) such that all plots are fully visible. More...
 
void setDrawXAxisAtZero (bool enable)
 Determines whether the x axis is drawn at location of zero in the data, or at the bottom of the chart region. More...
 
- Protected Member Functions inherited from iAChartWidget
virtual void changeMode (int newMode, QMouseEvent *event)
 
virtual void drawAxes (QPainter &painter)
 
virtual QString xAxisTickMarkLabel (double value, double stepWidth)
 
void zoomAlongX (double value, int x, bool deltaMode)
 
void zoomAlongY (double value, bool deltaMode)
 
void mouseMoveEvent (QMouseEvent *event) override
 Overriden Qt events. More...
 
void mousePressEvent (QMouseEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 
void mouseDoubleClickEvent (QMouseEvent *event) override
 
void wheelEvent (QWheelEvent *event) override
 
void leaveEvent (QEvent *event) override
 
void paintEvent (QPaintEvent *event) override
 
void contextMenuEvent (QContextMenuEvent *event) override
 
bool event (QEvent *event) override
 
- Protected Attributes inherited from iAChartWidget
int m_dragStartPosX
 
int m_dragStartPosY
 
int m_mode
 
int m_translationStartY
 
int m_translationY
 
QString m_xCaption
 
QSharedPointer< iAMapperm_xMapper
 Main mappers from diagram coordinates to pixel coordinates, for each axis: More...
 
double m_xShift
 
double m_xShiftStart
 
double m_xZoom
 
double m_xZoomStart
 
QString m_yCaption
 
QSharedPointer< iAMapperm_yMapper
 
AxisMappingType m_yMappingMode
 
double m_yZoom
 
double m_yZoomStart
 
int m_zoomXPos
 
int m_zoomYPos
 

Constructor & Destructor Documentation

◆ iAProfileWidget()

iAProfileWidget::iAProfileWidget ( QWidget *  parent,
vtkPolyData *  profData,
double  rayLength,
QString  yCapt = "Y Axis",
QString  xCapt = "X Axis" 
)

Member Function Documentation

◆ binSelected

void iAProfileWidget::binSelected ( int  newBin)
signal

◆ initialize()

void iAProfileWidget::initialize ( vtkPolyData *  profData,
double  rayLength 
)

Member Data Documentation

◆ TEXT_Y

const int iAProfileWidget::TEXT_Y = 15
static

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