Skip to content

Commit

Permalink
added rtiframe
Browse files Browse the repository at this point in the history
  • Loading branch information
ponchio committed Feb 26, 2024
1 parent 9d1b8bb commit 4ad283f
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 1 deletion.
3 changes: 2 additions & 1 deletion relightlab/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "imageframe.h"
#include "lightsframe.h"
#include "cropframe.h"

#include "rtiframe.h"

#include <QMessageBox>

Expand All @@ -29,6 +29,7 @@ MainWindow::MainWindow() {
tabs->addTab(new QWidget, "Align");
tabs->addTab(lights_frame = new LightsFrame, "Lights");
tabs->addTab(crop_frame = new CropFrame, "Crop");
tabs->addTab(rti_frame = new RtiFrame, "RTI");

setCentralWidget(tabs);
}
Expand Down
3 changes: 3 additions & 0 deletions relightlab/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class HomeFrame;
class ImageFrame;
class LightsFrame;
class CropFrame;
class RtiFrame;

class MainWindow: public QMainWindow {
Q_OBJECT
Expand All @@ -28,6 +29,8 @@ class MainWindow: public QMainWindow {
ImageFrame *image_frame = nullptr;
LightsFrame *lights_frame = nullptr;
CropFrame *crop_frame = nullptr;
RtiFrame *rti_frame = nullptr;

private:
QMenu *recentMenu = nullptr;
};
Expand Down
2 changes: 2 additions & 0 deletions relightlab/relightlab.pro
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ SOURCES += main.cpp \
recentprojects.cpp \
reflectionview.cpp \
relightapp.cpp \
rtiframe.cpp \
sphererow.cpp \
tabwidget.cpp \
imageframe.cpp \
Expand Down Expand Up @@ -99,6 +100,7 @@ HEADERS += \
recentprojects.h \
reflectionview.h \
relightapp.h \
rtiframe.h \
sphererow.h \
tabwidget.h \
imageframe.h \
Expand Down
81 changes: 81 additions & 0 deletions relightlab/rtiframe.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#include "rtiframe.h"
#include "helpbutton.h"

#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGroupBox>
#include <QRadioButton>
#include <QSpinBox>
#include <QLabel>

RtiFrame::RtiFrame(QWidget *parent): QFrame(parent) {
QVBoxLayout *content = new QVBoxLayout(this);

QHBoxLayout *parameters = new QHBoxLayout;
content->addLayout(parameters);

QGroupBox *model = new QGroupBox("Model");
parameters->addWidget(model);
QGridLayout *model_layout = new QGridLayout(model);
QRadioButton *ptm = new QRadioButton("Polynomial Texture Maps (PTM)");
model_layout->addWidget(ptm, 0, 0);
model_layout->addWidget(new HelpButton("rti/ptm"), 0, 1);

QRadioButton *hsh = new QRadioButton("HemiSpherical Harmonics (HSH)");
model_layout->addWidget(hsh, 1, 0);
model_layout->addWidget(new HelpButton("rti/hsh"), 1, 1);

QRadioButton *rbf = new QRadioButton("Radial Basis Functions (RBF)");
model_layout->addWidget(rbf, 2, 0);
model_layout->addWidget(new HelpButton("rti/rbf"), 2, 1);

QRadioButton *bln = new QRadioButton("Bilinear sampling (BNL)");
model_layout->addWidget(bln, 3, 0);
model_layout->addWidget(new HelpButton("rti/bln"), 3, 1);

QRadioButton *neural = new QRadioButton("Neural networkr");
model_layout->addWidget(neural, 4, 0);
model_layout->addWidget(new HelpButton("rti/neural"), 4, 1);


QGroupBox *colorspace= new QGroupBox("Colorspace");
parameters->addWidget(colorspace);
QGridLayout *colorspace_layout = new QGridLayout(colorspace);
QRadioButton *rgb = new QRadioButton("RGB");
colorspace_layout->addWidget(rgb, 0, 0);
colorspace_layout->addWidget(new HelpButton("rti/rgb"), 0, 1);

QRadioButton *lrgb = new QRadioButton("LRGB");
colorspace_layout->addWidget(lrgb, 1, 0);
colorspace_layout->addWidget(new HelpButton("rti/lrgb"), 1, 1);

QRadioButton *mrgb = new QRadioButton("MRGB");
colorspace_layout->addWidget(mrgb, 2, 0);
colorspace_layout->addWidget(new HelpButton("rti/mrgb"), 2, 1);

QRadioButton *ycc = new QRadioButton("YCC");
colorspace_layout->addWidget(ycc, 3, 0);
colorspace_layout->addWidget(new HelpButton("rti/ycc"), 3, 1);


QGroupBox *planes = new QGroupBox("Planes");
parameters->addWidget(planes);

QGridLayout *planes_layout = new QGridLayout(planes);
planes_layout->addWidget(new QLabel("Total number of planes:"), 0, 0);

QSpinBox *total_planes = new QSpinBox;
planes_layout->addWidget(total_planes, 0, 1);

planes_layout->addWidget(new QLabel("Number of luminance planes:"), 1, 0);

QSpinBox *luminance_planes = new QSpinBox;
planes_layout->addWidget(luminance_planes, 1, 1);


content->addStretch();
}

void RtiFrame::init() {

}
12 changes: 12 additions & 0 deletions relightlab/rtiframe.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef RTIFRAME_H
#define RTIFRAME_H

#include <QFrame>

class RtiFrame: public QFrame {
public:
RtiFrame(QWidget *parent = nullptr);
void init();
};

#endif // RTIFRAME_H

0 comments on commit 4ad283f

Please sign in to comment.