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 IgramArea.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class IgramArea : public QWidget
IgramArea(QWidget *parent = 0, void *mwp = 0 );

void *m_mw;
bool openImage(QImage img, bool showBoundary, QString = "stream");
bool openImage(QImage img, bool showBoundary, const QString &fileName = "stream");
bool openImage(const QString &fileName, bool showBoundary = true);
bool saveImage(const QString &fileName, const char *fileFormat);
void setPenColor(const QColor &newColor);
Expand Down
5 changes: 2 additions & 3 deletions igramarea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@
}
}
}
bool IgramArea::openImage(QImage loadedImage, bool showBoundary, QString fileName){
bool IgramArea::openImage(QImage loadedImage, bool showBoundary, const QString &fileName){

if (Settings2::getInstance()->m_igram->m_removeDistortion){
cv::Mat raw = cv::imread(fileName.toStdString().c_str());
Expand Down Expand Up @@ -1013,7 +1013,7 @@

}
if (mirrorDlg::get_Instance()->shouldFlipH())
loadedImage = loadedImage.mirrored(true,false);

Check warning on line 1016 in igramarea.cpp

View workflow job for this annotation

GitHub Actions / build-macos (macos-15, arm64)

'mirrored' is deprecated: Use flipped(Qt::Orientations) instead [-Wdeprecated-declarations]

Check warning on line 1016 in igramarea.cpp

View workflow job for this annotation

GitHub Actions / build-macos (macos-15-intel, x86_64)

'mirrored' is deprecated: Use flipped(Qt::Orientations) instead [-Wdeprecated-declarations]
hasBeenCropped = false;
needToConvertBGR = true;
//m_demo->hide();
Expand Down Expand Up @@ -2443,7 +2443,7 @@
qWarning("Couldn't save .OLN (outline) file.");
return;
}
QFileInfo info(saveFile);

saveFile.write(jsondoc.toJson());
saveFile.close();

Expand Down Expand Up @@ -2640,4 +2640,3 @@
zoomFull();
}


10 changes: 5 additions & 5 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ void MainWindow::on_actionSave_screen_triggered()
QImage image( this->size(), QImage::Format_ARGB32 );


QImage SurfaceImage = m_ogl->m_surface->render(1000,1000);
QImage SurfaceImage = m_ogl->m_surface->render();

QPainter painter( &image );

Expand Down Expand Up @@ -1399,7 +1399,7 @@ void MainWindow::batchProcess(QStringList fileList){
//::reviewFileName = videoFileName;
}
QImage img = QImage(width,height,QImage::Format_RGB32);
QImage d3 = m_ogl->m_surface->render(1000,1000).scaled(width/2,height/2);
QImage d3 = m_ogl->m_surface->render().scaled(width/2,height/2);
QImage dft = m_dftArea->grab().toImage().scaled(width/2, height/2);
QImage igram = m_igramArea->grab().toImage().scaled(width/2, height/2);
QImage contour = m_contourView->getPlot()->grab().toImage().scaled(width/2, height/2);
Expand Down Expand Up @@ -1857,7 +1857,7 @@ void MainWindow::on_actionCreate_Movie_of_wavefronts_triggered()
QSettings set;
QString lastPath = set.value("lastPath",".").toString();
//int memThreshold = set.value("lowMemoryThreshold",300).toInt();
QImage img = m_ogl->m_surface->render(1000,1000);
QImage img = m_ogl->m_surface->render();

int width = img.width();
int height = img.height();
Expand Down Expand Up @@ -1895,7 +1895,7 @@ void MainWindow::on_actionCreate_Movie_of_wavefronts_triggered()
delete wf;
QApplication::processEvents();
if (dowavefront){
QImage img = m_ogl->m_surface->render(1000,1000);
QImage img = m_ogl->m_surface->render();
QPainter painter(&img);
painter.setPen(Qt::yellow);
painter.setBrush(Qt::yellow);
Expand Down Expand Up @@ -2680,7 +2680,7 @@ void MainWindow::runLiveAnalysisLoop() {
}

// 6. RENDER SURFACE
img = m_ogl->m_surface->render(1000, 1000);
img = m_ogl->m_surface->render();
m_ogl->m_liveLabel->setPixmap(QPixmap::fromImage(img));
// Update UI Status Bar
QString statusRightText;
Expand Down
2 changes: 1 addition & 1 deletion mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ private slots:

void on_actionPreferences_triggered();
void mainTabChanged(int);
QString getCurrentHotKeyHelp() const ;
void on_actionMirror_triggered();

void on_saveOutline_clicked();
Expand Down Expand Up @@ -305,6 +304,7 @@ private slots:
void setCurrentFile(const QString &fileName);
void updateRecentFileActions();
QString strippedName(const QString &fullFileName);
QString getCurrentHotKeyHelp() const;
QMenu* m_view_menu;
QTimer *m_liveViewRMSTimer = NULL;
void createActions();
Expand Down
4 changes: 2 additions & 2 deletions oglview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void OGLView::saveImage(){
if (fName.isEmpty())
return;

QImage img = m_surface->render(1000,1000);
QImage img = m_surface->render();
img.save(fName);
}
#include <QApplication>
Expand Down Expand Up @@ -198,7 +198,7 @@ void OGLView::showSelected() // show all selected wavefronts as 3D plots
{
wavefront * wf = m_wavefronts[list[i]];
m_surface->setSurface(wf);
QImage glImage = m_surface->render(width,width);
QImage glImage = m_surface->render();
QPainter p2(&glImage);
p2.setFont(serifFont);
p2.setPen(QPen(QColor(Qt::white)));
Expand Down
2 changes: 1 addition & 1 deletion surfacegraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ void SurfaceGraph::setGreenToRedGradient()
QSize SurfaceGraph::Size(){
return m_graph->size();
}
QImage SurfaceGraph::render(int width, int height){
QImage SurfaceGraph::render(){
// Render directly at the widget's current display size without resizing the live view
return m_graph->renderToImage(0, m_graph->size());
}
2 changes: 1 addition & 1 deletion surfacegraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class SurfaceGraph : public QObject
void setSurface(wavefront *wf);
void setGraphColors();
void setLegend(QLabel * legend) {m_legend = legend;}
QImage render(int width, int height);
QImage render();
QSize Size();
public slots:
void changeTheme(int theme);
Expand Down
2 changes: 1 addition & 1 deletion surfacemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3224,7 +3224,7 @@ void SurfaceManager::report(){
if (dlg.ui->show3D->isChecked()){
// assemble the surface metrics from the OG 3D view and the color map legend
// put into the OGLW window that will provide the titles and placement.
QImage SurfaceImage =m_SurfaceGraph->render(1000, 1000);
QImage SurfaceImage =m_SurfaceGraph->render();
const QPixmap pm = m_SurfaceGraph->m_legend->pixmap(Qt::ReturnByValue);
QSize lsize = pm.size();
QImage legend(lsize, QImage::Format_ARGB32);
Expand Down
12 changes: 11 additions & 1 deletion wavefront.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,17 @@
#include "wavefront.h"

wavefront::wavefront():
zernEnablesApplied(),gaussian_diameter(0.),gbEnabled(false),gbValue(20.),wasSmoothed(false),useSANull(true),GBSmoothingValue(0.),m_origin(WavefrontOrigin::Unknown),m_manuallyInverted(false),dirtyZerns(true),regions_have_been_expanded(false)
zernEnablesApplied(),
gaussian_diameter(0.),
GBSmoothingValue(0.),
gbValue(20.),
m_origin(WavefrontOrigin::Unknown),
dirtyZerns(true),
regions_have_been_expanded(false),
gbEnabled(false),
wasSmoothed(false),
useSANull(true),
m_manuallyInverted(false)
{
}

Expand Down
Loading