Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions IgramArea.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@
#include <opencv2/highgui/highgui.hpp>
#include "dftthumb.h"
#include <QTimer>
#include <QVideoWidget>
#include <QMediaPlayer>
#include <QMediaPlaylist>
#include <QScrollArea>
#include "settingsigram.h"
#include <QDockWidget>
Expand Down
1 change: 1 addition & 0 deletions astigpolargraph.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "astigpolargraph.h"
#include "ui_astigpolargraph.h"
#include "surfacemanager.h"
#include <QtCharts/QLegendMarker>


astigPolargraph::astigPolargraph( QList<astigSample>list, QWidget *parent) :
Expand Down Expand Up @@ -126,7 +127,7 @@
qreal distance(INT_MAX);
int closeNdx = -1;
int ndx = 0;
for (const auto& sample : m_list) {

Check warning on line 130 in astigpolargraph.cpp

View workflow job for this annotation

GitHub Actions / build-linux-clazy

c++11 range-loop might detach Qt container (QList) [-Wclazy-range-loop-detach]
QPointF currentPoint(sample.m_xastig, sample.m_yastig);
qreal currentDistance = qSqrt((currentPoint.x() - clickedPoint.x())
* (currentPoint.x() - clickedPoint.x())
Expand Down
4 changes: 3 additions & 1 deletion astigstatsdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <qwt_interval_symbol.h>
#include <qwt_plot_intervalcurve.h>
#include <qwt_scale_engine.h>
#include <qwt_scale_map.h>
#include <qwt_plot_marker.h>
#include <QDebug>
#include <math.h>
Expand All @@ -26,6 +27,7 @@
#include <qwt_plot_panner.h>
#include <QScrollArea>
#include <QGroupBox>
#include <QPen>
#include <QPrinter>
#include <QTextDocument>
#include <QTextEdit>
Expand Down Expand Up @@ -53,7 +55,7 @@
Zoomer( QWidget *canvas, QwtPlot * plot ):
QwtPlotZoomer( canvas ),mPlot(plot)
{
setRubberBandPen( QColor( Qt::lightGray ) );
setRubberBandPen( QPen( Qt::lightGray ) );
setTrackerMode( QwtPlotPicker::AlwaysOn );
}

Expand Down Expand Up @@ -294,7 +296,7 @@
double ymax = -1000;
int colorndx = 0;
QMap<QString, QPointF> means;
foreach(QString name, groups.keys()){

Check warning on line 299 in astigstatsdlg.cpp

View workflow job for this annotation

GitHub Actions / build-linux-clazy

allocating an unneeded temporary container [-Wclazy-container-anti-pattern]
RunningStat xstats, ystats;

QColor color = QColor(Qt::GlobalColor( 7 + colorndx%12 ));
Expand Down Expand Up @@ -419,7 +421,7 @@
double *xvals = new double[means.size()];
double *yvals = new double[means.size()];
int i = 0;
foreach(QString name, means.keys()){

Check warning on line 424 in astigstatsdlg.cpp

View workflow job for this annotation

GitHub Actions / build-linux-clazy

allocating an unneeded temporary container [-Wclazy-container-anti-pattern]
xvals[i] = means[name].x();
yvals[i] = means[name].y();
++i;
Expand Down Expand Up @@ -828,7 +830,7 @@
html.append("<p><img src='" +imageName + "'/></p>");
}
// for each group
foreach(QString Name, groups.keys()){

Check warning on line 833 in astigstatsdlg.cpp

View workflow job for this annotation

GitHub Actions / build-linux-clazy

allocating an unneeded temporary container [-Wclazy-container-anti-pattern]

QList<QPointF> items = groups[Name];
int size = items.size();
Expand Down
3 changes: 2 additions & 1 deletion astigzoomer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
#include <qwt_plot.h>
#include <qwt_plot_marker.h>
#include <QtMath>
#include <QPen>

astigZoomer::astigZoomer( QWidget *canvas, QwtPlot * plot ):
QwtPlotZoomer( canvas ),mPlot(plot)
{
setRubberBandPen( QColor( Qt::lightGray ) );
setRubberBandPen( QPen( Qt::lightGray ) );
setTrackerMode( QwtPlotPicker::AlwaysOn );
}

Expand Down
2 changes: 1 addition & 1 deletion averagewavefrontfilesdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "utils.h"
#include <opencv2/imgproc.hpp>

void showData(const std::string &txt, Mat mat, bool useLog);
void showData(const std::string &txt, cv::Mat mat, bool useLog);
averageWaveFrontFilesDlg::averageWaveFrontFilesDlg(QStringList list, SurfaceManager *m, QWidget *parent) :
QDialog(parent),
ui(new Ui::averageWaveFrontFilesDlg)
Expand Down
2 changes: 1 addition & 1 deletion cameracalibwizard.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "cameracalibwizard.h"
#include "ui_cameracalibwizard.h"
#include "spdlog/spdlog.h"
#include <QLabel>
#include <QLayout>
#include "camwizardpage1.h"
#include "spdlog/spdlog.h"

cameraCalibWizard::cameraCalibWizard(QWidget *parent) :
QWizard(parent),
Expand Down
8 changes: 4 additions & 4 deletions camwizardpage1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,11 @@ void CamWizardPage1::on_compute_clicked()
if (found)
break;
if ( i == 1){
cv::SimpleBlobDetector detector;
static Ptr<SimpleBlobDetector> detector = cv::SimpleBlobDetector::create();

// Detect blobs.
std::vector<cv::KeyPoint> keypoints;
detector.detect( dial, keypoints);
detector->detect( dial, keypoints);

/*int horz = 1;
int vert = 1;
Expand Down Expand Up @@ -329,13 +329,13 @@ void CamWizardPage1::on_compute_clicked()
msg << "Grid of " << ui->columns->value() << " X " << ui->rows->value() << " not found. Press any key.";
ui->Results->append("Pattern not found. Calibration failed.");
// Set up the detector with default parameters.
cv::SimpleBlobDetector detector;
static Ptr<SimpleBlobDetector> detector = cv::SimpleBlobDetector::create();

cv::threshold(raw,view, 200, 255, cv::THRESH_BINARY);

// Detect blobs.
std::vector<cv::KeyPoint> keypoints;
detector.detect( view, keypoints);
detector->detect( view, keypoints);

// Draw detected blobs as red circles.
// DrawMatchesFlags::DRAW_RICH_KEYPOINTS flag ensures the size of the circle corresponds to the size of blob
Expand Down
1 change: 1 addition & 0 deletions contourplot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <qwt_plot_shapeitem.h>
#include <QSettings>
#include <qwt_picker_machine.h>
#include "spdlog/spdlog.h"


double zOffset = 0;
Expand Down
2 changes: 1 addition & 1 deletion contourrulerparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void ContourRulerParams::on_radialAngleSB_valueChanged(int arg1)
void ContourRulerParams::on_setColorPB_clicked()
{

QColor color = QColorDialog::getColor( ui->setColorPB->palette().color(QPalette::Background));
QColor color = QColorDialog::getColor( ui->setColorPB->palette().color(QPalette::Window));

QSettings set;
set.setValue("contourRulerColor", color.name());
Expand Down
4 changes: 2 additions & 2 deletions contourtools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ void ContourTools::on_ColorMapCB_activated(int index)



void ContourTools::on_zeroOffsetCB_activated(const QString &arg1)
void ContourTools::on_zeroOffsetCB_textActivated(const QString &arg1)
{
emit contourZeroOffsetChanged(arg1);
}

void ContourTools::on_colorRangeCB_activated(const QString &arg1)
void ContourTools::on_colorRangeCB_textActivated(const QString &arg1)
{
ui->errorRangeSpin->setEnabled(arg1 == "Fractions of Wave");
emit contourColorRangeChanged(arg1);
Expand Down
4 changes: 2 additions & 2 deletions contourtools.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ private slots:
void setWaveRange(double val);
void on_ColorMapCB_activated(int index);

void on_zeroOffsetCB_activated(const QString &arg1);
void on_zeroOffsetCB_textActivated(const QString &arg1);

void on_colorRangeCB_activated(const QString &arg1);
void on_colorRangeCB_textActivated(const QString &arg1);

void on_errorRangeSpin_valueChanged(double arg1);

Expand Down
2 changes: 1 addition & 1 deletion dftarea.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <string>
#include "psi_dlg.h"
#include "psiphasedisplay.h"
using namespace cv;

extern void showData(const std::string& txt, cv::Mat mat, bool useLog = false);
extern QImage showMag(cv::Mat complexI, bool show = false, const char *title = "FFT", bool doLog = true, double gamma = 0);
extern void shiftDFT(cv::Mat &magI);
Expand Down
28 changes: 14 additions & 14 deletions foucaultview.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include "foucaultview.h"
#include "ui_foucaultview.h"
#include "spdlog/spdlog.h"
#include "mirrordlg.h"
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "simulationsview.h"
#include <QVector>
#include <QMenu>
#include "zernikeprocess.h"
#include "spdlog/spdlog.h"

extern double outputLambda;

Expand Down Expand Up @@ -220,17 +220,17 @@ void foucaultView::on_makePb_clicked()
double hy = hx;

cv::Mat vknife[] = {cv::Mat::zeros(size,size,CV_64FC1)
,cv::Mat::zeros(Size(size,size),CV_64FC1)};
,cv::Mat::zeros(cv::Size(size,size),CV_64FC1)};

cv::Mat ronchiGrid[] = {cv::Mat::zeros(size,size,CV_64FC1)
,cv::Mat::zeros(Size(size,size),CV_64FC1)};
,cv::Mat::zeros(cv::Size(size,size),CV_64FC1)};

cv::Mat slit[] = {cv::Mat::zeros(size,size,CV_64FC1)
,cv::Mat::zeros(Size(size,size),CV_64FC1)};
,cv::Mat::zeros(cv::Size(size,size),CV_64FC1)};


cv::Mat ronchiSlit[] = {cv::Mat::zeros(size,size,CV_64FC1)
,cv::Mat::zeros(Size(size,size),CV_64FC1)};
,cv::Mat::zeros(cv::Size(size,size),CV_64FC1)};

// compute real world pixel width.
double pixwidth = outputLambda * 1.E-6* Fnumber * 2./(25.4 * pad);
Expand Down Expand Up @@ -311,7 +311,7 @@ void foucaultView::on_makePb_clicked()
}
}

Mat FFT1, FFT2;
cv::Mat FFT1, FFT2;
//fftw_plan p;
cv::Mat complexIn;
cv::Mat complexIn2;
Expand All @@ -323,18 +323,18 @@ void foucaultView::on_makePb_clicked()
//showData("rslit", ronchiSlit[0]);


dft(complexIn, FFT1, DFT_REAL_OUTPUT);
dft(complexIn, FFT1, cv::DFT_REAL_OUTPUT);
shiftDFT(FFT1);
dft(complexIn2, FFT2, DFT_REAL_OUTPUT);
dft(complexIn2, FFT2, cv::DFT_REAL_OUTPUT);
shiftDFT(FFT2);
cv::Mat knifeSlit;
mulSpectrums(FFT1, FFT2, knifeSlit, 0, true);
idft(knifeSlit, knifeSlit, DFT_SCALE); // gives us the correlation result...
idft(knifeSlit, knifeSlit, cv::DFT_SCALE); // gives us the correlation result...
shiftDFT(knifeSlit);
cv::Mat knifeSurf;

mulSpectrums(knifeSlit, surf_fftRonchi, knifeSurf,0,true);
idft(knifeSurf, knifeSurf, DFT_SCALE);
idft(knifeSurf, knifeSurf, cv::DFT_SCALE);
shiftDFT(knifeSurf);

QImage ronchi = showMag(knifeSurf, false,"", false, gamma);
Expand Down Expand Up @@ -372,15 +372,15 @@ void foucaultView::on_makePb_clicked()
merge(slit,2,complexIn2);


dft(complexIn, FFT1, DFT_REAL_OUTPUT);
dft(complexIn2, FFT2, DFT_REAL_OUTPUT);
dft(complexIn, FFT1, cv::DFT_REAL_OUTPUT);
dft(complexIn2, FFT2, cv::DFT_REAL_OUTPUT);

mulSpectrums(FFT1, FFT2, knifeSlit, 0, true);
idft(knifeSlit, knifeSlit, DFT_SCALE); // gives us the correlation result...
idft(knifeSlit, knifeSlit, cv::DFT_SCALE); // gives us the correlation result...


mulSpectrums(knifeSlit, surf_fft, knifeSurf,0,true);
idft(knifeSurf, knifeSurf, DFT_SCALE);
idft(knifeSurf, knifeSurf, cv::DFT_SCALE);

m_foucultQimage = showMag(knifeSurf, false,"", false, gamma);

Expand Down
23 changes: 11 additions & 12 deletions generatetargetdlg.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "generatetargetdlg.h"
#include "ui_generatetargetdlg.h"
#include <QDesktopWidget>
#include <QGuiApplication>
#include <QScreen>
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
Expand All @@ -16,8 +17,9 @@ generateTargetDlg::generateTargetDlg(QWidget *parent) :
ui(new Ui::generateTargetDlg), m_units(INCHES)
{
ui->setupUi(this);
m_dpix = qApp->desktop()->physicalDpiX();
m_dpiy = qApp->desktop()->physicalDpiY();
QScreen *screen = QGuiApplication::primaryScreen();
m_dpix = screen->physicalDotsPerInchX();
m_dpiy = screen->physicalDotsPerInchY();
ui->printerGroup->hide();
QSettings set;
ui->rows->setValue(set.value("target rows", 10).toInt());
Expand All @@ -38,17 +40,14 @@ void generateTargetDlg::on_generate_clicked()
int vsize;

if (ui->fullScreen->isChecked()){
// make sure sizes are even
hsize = qApp->desktop()->width();
hsize/=2;
// make sure sizes are even
QScreen *screen = QGuiApplication::primaryScreen();
hsize = screen->geometry().width();
hsize /= 2;
hsize *= 2;

vsize = qApp->desktop()->height();
vsize /=2;
vsize = screen->geometry().height();
vsize /= 2;
vsize *= 2;



}
else {
double mul = 1.;
Expand Down
3 changes: 0 additions & 3 deletions graphmodifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
#include <QtWidgets/QComboBox>
#include <QtCore/qmath.h>

using namespace QtDataVisualization;



//! [0]
GraphModifier::GraphModifier(Q3DBars *bargraph)
Expand Down
Loading
Loading