mirror of
https://github.com/brmlab/medirap.git
synced 2025-06-08 00:54:00 +02:00
store images into structure
This commit is contained in:
parent
a0d3dba238
commit
8039ff529a
4 changed files with 29 additions and 7 deletions
|
@ -2,6 +2,7 @@
|
|||
#include "ui_mainwindow.h"
|
||||
#include <QFileDialog>
|
||||
#include <qdebug.h>
|
||||
#include <QMessageBox>
|
||||
|
||||
#define BLACK 0xFF000000
|
||||
#define RED 0xFFFF0000
|
||||
|
@ -13,7 +14,6 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
@ -26,7 +26,13 @@ void MainWindow::on_pushLoad_clicked()
|
|||
QString filename = QFileDialog::getOpenFileName(this, "Open Image", "", "Series of medical files (*.txt)");
|
||||
if (filename.isNull()) return;
|
||||
QFileInfo pathInfo(filename);
|
||||
vdata.load(pathInfo.path(), pathInfo.fileName());
|
||||
if (!vdata.load(pathInfo.path(), pathInfo.fileName())) {
|
||||
QMessageBox("Error", "Error loading data");
|
||||
} else {
|
||||
ui->sliderPosition->setMaximum(vdata.getDimZ());
|
||||
ui->sliderPosition->setValue(vdata.getDimZ()/2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -124,3 +130,11 @@ void MainWindow::floodfill(QImage &img)
|
|||
|
||||
}
|
||||
*/
|
||||
|
||||
void MainWindow::on_sliderPosition_valueChanged(int value)
|
||||
{
|
||||
QPixmap pixmap;
|
||||
scene.clear();
|
||||
pixmap.convertFromImage(image);
|
||||
scene.addPixmap(pixmap);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue