-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Consider adding a help menu. It might be better to use something like boost:program_options to construct a CLI that includes the basic information to use the tool.
As is, it's unclear what the input or expected output data is.
EDIT:
3D_reconstruction/src/Main.cpp
Lines 86 to 140 in c4834f6
| int main(int argc, char** argv) { | |
| if (argc < 2) { | |
| cout << "Invalid arguments" << endl; | |
| exit(-1); | |
| } | |
| int opt = atoi(argv[1]); | |
| if (opt != 1 || argc != 27) { | |
| cout << "Invalid arguments" << endl; | |
| exit(-1); | |
| } | |
| int imgWidth = atoi(argv[2]); | |
| int imgHeight = atoi(argv[3]); | |
| Point fullsize(imgWidth, imgWidth, imgHeight); | |
| int numNodesOnOctree = atoi(argv[4]); | |
| Point Unit(1, 1, 1); | |
| char* silPrefix = argv[5]; | |
| int numImgUsed = atoi(argv[6]); | |
| float sampling = atof(argv[7]); | |
| int distortion_radius = atoi(argv[8]); | |
| int num_components = atoi(argv[9]); | |
| float extrainfo = atof(argv[11]); | |
| int rotation_digits = atoi(argv[12]); | |
| int ref_img = atoi(argv[13]); | |
| double ratio = atof(argv[14]); | |
| int rawImgWidth = atoi(argv[15]); | |
| int rawImgHeight = atoi(argv[16]); | |
| int roiLeft = atoi(argv[17]); | |
| int roiTop = atoi(argv[18]); // requires crop parameters | |
| float pixelSize = atof(argv[19]); // mm/pixel //requires scale | |
| float dist2AOR = atof(argv[20]); // mm 1.27 * 1000; // 1.27m | |
| float rotationDir = atof(argv[21]); // 1 --clockwise, -1 --counter clockwise | |
| string calib = argv[22]; | |
| for (int i = 0; i < calib.size(); i++) { | |
| calib[i] = toupper(calib[i]); | |
| } | |
| bool doCalib = false; | |
| if (calib == "TRUE" || calib == "T" || calib == "true" || calib == "t") { | |
| doCalib = true; | |
| } | |
| float translation = atof(argv[23]); | |
| float skewRoll = atof(argv[24]); | |
| float skewPitch = atof(argv[25]); | |
| float focusOffset = atof(argv[26]); |
Although I don't want to break backward compatibility, I think we should consider using flags (e.g., --translation <X> instead of relying on the argument all being positional. Shorthand options would be the compromise for those that are super familiar with the tool, but otherwise, longhand variants would be easier for everyone else.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers