|
Correa 1
C++ library with Python bindings to analyse the shape of simple closed curves in R^2
|
compare 2 polygons with automatic focal points More...
#include "Comp2DShapes.h"Functions | |
| int | main (int argc, char **argv) |
| Main function for comparing 2D shapes with automatic focal point computation. | |
| bool | parse_args (int argc, char **argv, std::string *file1, std::string *file2, int *disttype, double *microns_per_pixel1, double *microns_per_pixel2, bool *verbose) |
| Parse command-line arguments for Comp2DShapes. | |
compare 2 polygons with automatic focal points
| int main | ( | int | argc, |
| char ** | argv ) |
Main function for comparing 2D shapes with automatic focal point computation.
This program compares two 2D polygons using various distance metrics. Unlike Comp2DShapesFocal, this version automatically computes focal points (centroids) for each polygon and centers them before comparison. The polygons are also scaled to a normalized range for comparison.
The program supports multiple distance metrics:
| argc | Number of command-line arguments |
| argv | Array of command-line argument strings |
| bool parse_args | ( | int | argc, |
| char ** | argv, | ||
| std::string * | file1, | ||
| std::string * | file2, | ||
| int * | disttype, | ||
| double * | microns_per_pixel1, | ||
| double * | microns_per_pixel2, | ||
| bool * | verbose ) |
Parse command-line arguments for Comp2DShapes.
Parses command-line arguments for the Comp2DShapes program, extracting input files, distance type, microns per pixel settings, and verbose flag. This version automatically computes focal points (unlike Comp2DShapesFocal).
| argc | Argument count from main() | |
| argv | Argument vector from main() | |
| [out] | file1 | Path to first input polygon file (set by -i1 flag) |
| [out] | file2 | Path to second input polygon file (set by -i2 flag) |
| [out] | disttype | Distance type flag (set by -d flag):
|
| [out] | microns_per_pixel1 | Microns per pixel conversion for polygon 1 (set by -mpp1 or -mpp flag, default: 1.0) |
| [out] | microns_per_pixel2 | Microns per pixel conversion for polygon 2 (set by -mpp2 or -mpp flag, default: 1.0) |
| [out] | verbose | Enable verbose output (set by -v or –verbose flag, default: false) |