Skip to content

Commit 26a80f8

Browse files
Extra TODO and options
1 parent b16926c commit 26a80f8

File tree

5 files changed

+47
-1
lines changed

5 files changed

+47
-1
lines changed

src/IFPainter.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ IFPainter::~IFPainter()
1818

1919
void IFPainter::drawImage(int x, int y, int width, int height, std::string imgPath)
2020
{
21+
// TODO (Michael): Along with writing this method, figure out the best way to represent images in code.
22+
// Perhaps there's a better way to store images; reading in images multiple times is inefficient, though if we only need
23+
// to read in the image once (which I believe is the case), then reading images from a file should also be fine.
2124
// TODO: this
2225
}
2326

2427
void IFPainter::drawText(int x, int y, int fontSize, int width, std::string text)
2528
{
2629
// TODO: this
30+
// keep in mind that we'll need options for bold, italics, etc.
31+
// Try to make these methods as intuitive as possible in the idea of "we want text here, so we're confident that text will go here"
32+
// Keep in mind text wrapping.
2733
}
2834

2935
void IFPainter::drawLine(int x1, int y1, int x2, int y2, int width, cv::Scalar color)

src/Options.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include "Options.h"
2+
3+
Options::Options()
4+
{
5+
6+
}
7+
8+
Options::~Options()
9+
{
10+
11+
}

src/Options.h

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#pragma once
2+
3+
#include "pch.h"
4+
5+
/*
6+
* The Options class holds report-related parameters that can be specified by the user, such as
7+
* specifications on which renders should be present to the screen, report dimensions, section dimensions,
8+
* etc.
9+
*/
10+
11+
// TODO: Task (Ally): Prepare this class. There's a lot of freedom to how you can build this class. You can
12+
// mix in constant variables along with modifiable ones, and allow certain parameters to be set via the user.
13+
// you should code some way to set and retrieve the values of certain parameters. You can use a map and/or
14+
// add a bunch of variables manually; it's up to you.
15+
16+
class Options
17+
{
18+
public:
19+
Options();
20+
~Options();
21+
};

src/main.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ int main(int argc, char **argv) {
1616
*/
1717
void readParameters(int argc, char** argv)
1818
{
19-
// TODO: this
19+
// TODO (Ally): Write this function to instantiate the options so it can be used in generateReport.
20+
21+
// TODO (Ally): This includes reading in the filepath of the file and storing it somewhere.
22+
23+
// TODO (Ally): Along with storing the filepath, you should give some sort of option/parameter for generating
24+
// reports for an entire folder of models!
2025

2126
// i.e. if user specifies to open the file in a gui, we'll put that here...
2227

@@ -31,6 +36,8 @@ void readParameters(int argc, char** argv)
3136
*/
3237
void generateReport()
3338
{
39+
// TODO (Ally): Incorporate the Options into this method, and set the correct bounds on IFPainter.
40+
3441
// create image frame
3542
IFPainter img(1500, 1000);
3643

src/pch.h

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <string>
1212

1313
// Visualization project header files
14+
#include "Options.h"
1415
#include "IFPainter.h"
1516
#include "InformationGatherer.h"
1617
#include "PerspectiveGatherer.h"

0 commit comments

Comments
 (0)