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
2 changes: 1 addition & 1 deletion autoinvertdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ void autoInvertDlg::enableConic(bool b) {

void autoInvertDlg::on_InvertWithoutAskingRb_clicked(bool checked)
{

Q_UNUSED(checked);
}

48 changes: 3 additions & 45 deletions autoinvertdlg.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1295</width>
<height>565</height>
<width>1078</width>
<height>464</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -25,7 +25,7 @@
<property name="modal">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="lblMain">
<property name="font">
Expand Down Expand Up @@ -137,48 +137,6 @@
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:700;&quot;&gt;What to do if invertions may be detected&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QRadioButton" name="InvertWithoutAskingRb">
<property name="text">
<string>Don't Ask but Invert</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="AskDoNotInvertRb">
<property name="text">
<string>Ask but Don't Invert</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="DoNotAskorInvertRb">
<property name="text">
<string>Don't ask or invert</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="text">
Expand Down
8 changes: 4 additions & 4 deletions foucaultview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ QImage foucaultView::generateOpticalTestImage(OpticalTestType type, wavefront* w
double lpi_val = s.lpi * (s.useMM ? 25.4 : 1.0);
int ppl = std::max(1, (int)((0.5 / lpi_val) / pixwidth));
int start = (size / 2) - (ppl / 2);
bool even = ((start / ppl) % 2 == 0) ^ s.clearCenter;
bool even = ((start / ppl) % 2 == 0) != s.clearCenter;
int roffset_start = ppl - (start % ppl);

for (int y = 0; y < size; ++y) {
Expand Down Expand Up @@ -298,10 +298,10 @@ void foucaultView::on_makePb_clicked()
QImage foucaultImg = generateOpticalTestImage(OpticalTestType::Foucault, m_wf, settings);

// Store for potential saving/external access
m_foucultQimage = foucaultImg;
m_foucaultQimage = foucaultImg;

// 3. UI Painting Helper (to avoid duplicating the Painter logic)
auto paintAndDisplay = [&](QLabel* label, QImage img, double offsetValue) {
auto paintAndDisplay = [&](QLabel* label, const QImage& img, double offsetValue) {
if (img.isNull()) return;

QSize s = label->size();
Expand Down Expand Up @@ -637,7 +637,7 @@ void foucaultView::on_scanPb_clicked()
QString fvpng = QString("%1//%2.png").arg(imageDir).arg(cnt++, 6, 10, QLatin1Char('0'));
qDebug() << "fn"<< fvpng;
if (ui->saveOnlyFouccault->isChecked()){
fv->m_foucultQimage.save(fvpng);
fv->m_foucaultQimage.save(fvpng);
}
else {
fvImage.save(fvpng);
Expand Down
2 changes: 1 addition & 1 deletion foucaultview.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private slots:
Ui::foucaultView *ui;
SurfaceManager *m_sm;
QString imageDir;
QImage m_foucultQimage;
QImage m_foucaultQimage;
QTimer m_guiTimer;
int heightMultiply;
double m_sag;
Expand Down
6 changes: 3 additions & 3 deletions profileplot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ ProfilePlot::~ProfilePlot(){



void ProfilePlot::SetYoffset(QString name, double value){
void ProfilePlot::SetYoffset(const QString& name, double value){
if (m_waveFrontyOffsets.contains(name)){
m_waveFrontyOffsets[name] += value;
}
Expand Down Expand Up @@ -560,7 +560,7 @@ struct RadialBin {
*/
std::vector<double> compute_average_radial_profile(
const cv::Mat& matrix,
const cv::Point& center,
cv::Point center,
int radius)
{
// Check matrix validity
Expand Down Expand Up @@ -721,7 +721,7 @@ qDebug() << "Populate";
}
qDebug() << "offsets" << m_waveFrontyOffsets<< y_offset;
// if show one angle
if (m_show_oneAngle or (!m_showAvg and !m_show_16_diameters & !m_show_oneAngle)){
if (m_show_oneAngle or (!m_showAvg and !m_show_16_diameters and !m_show_oneAngle)){

cprofile->setSamples( createProfile( units,wf, true));
cprofile->attach( m_plot );
Expand Down
2 changes: 1 addition & 1 deletion profileplot.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public slots:
void toggleShow16();
void toggleOneAngle();
void CreateWaveFrontFromAverage();
void SetYoffset(QString name, double value);
void SetYoffset(const QString& name, double value);
//QPolygonF createZernProfile(wavefront *wf);
private:

Expand Down
4 changes: 2 additions & 2 deletions ronchicomparedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include <QWidget>
#include <QGuiApplication>
#include <QScreen>
RonchiCompareDialog::RonchiCompareDialog(const QImage& img1, const QString name1, const QImage &img2,
const QString name2, QWidget* parent)
RonchiCompareDialog::RonchiCompareDialog(const QImage& img1, const QString& name1, const QImage &img2,
const QString& name2, QWidget* parent)
: QDialog(parent), m_q1(img1), m_q2(img2)
{
setWindowTitle(tr("Ronchi Comparison Overlay"));
Expand Down
4 changes: 2 additions & 2 deletions ronchicomparedialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class RonchiCompareDialog : public QDialog {
Q_OBJECT

public:
explicit RonchiCompareDialog(const QImage& img1, const QString name1, const QImage &img2,
const QString name2, QWidget* parent);
explicit RonchiCompareDialog(const QImage& img1, const QString& name1, const QImage &img2,
const QString& name2, QWidget* parent);
virtual ~RonchiCompareDialog();

private slots:
Expand Down
2 changes: 1 addition & 1 deletion wavefrontloaderworker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ WavefrontLoaderWorker::WavefrontLoaderWorker(QObject *parent)
{
}

void WavefrontLoaderWorker::process(QStringList args, SurfaceManager* manager) {
void WavefrontLoaderWorker::process(const QStringList& args, SurfaceManager* manager) {
m_isCancelled = false; // Reset the flag for this run
int cnt = 0;

Expand Down
2 changes: 1 addition & 1 deletion wavefrontloaderworker.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public slots:
/**
* @brief The main loop that processes the wavefront files.
*/
void process(QStringList args, SurfaceManager* manager);
void process(const QStringList& args, SurfaceManager* manager);

/**
* @brief Slot to trigger a safe exit of the loop.
Expand Down
Loading