// This is the header file (class declaration) for my pointset class // // COMP 254 final project, study of landmark points // // Matt Cutts, April 18, 1996 #ifndef __POINTSET_H__ #define __POINTSET_H__ 1 // only include declaration once #include "main.h" #include #include #include // include necessary system files class pointset { int numpoints; double *x, *y; // pointer to array of landmark points double xcen, ycen; // centroid position double scale_factor; // amount that points are scaled public: pointset(); // constructor for pointset pointset(int size); // constructor for pointset ~pointset(); // destructor pointset(pointset&); // copy constructor void prn_points(); // print the points void read_points(); // read in the points void compute_centroid(); // determine the centroid double get_xcen() { return xcen; } // return the x component of centroid double get_ycen() { return ycen; } // return the y component of centroid double get_x(int i) { return x[i]; } // get i-th x value double get_y(int i) { return y[i]; } // get i-th y value void set_x(int i, double d) { x[i] = d; } // set i-th x value void set_y(int i, double d) { y[i] = d; } // set i-th y value double compute_scale_factor(); // determine the amount to normalize void translate(double x, double y); // translate the pointset void rotate(double angle); // rotate the pointset void scale(double scale); // scale the pointset void add(pointset obj); // add two pointsets double dist(pointset obj); // compute distance between 2 pointsets pointset procrustes(pointset obj); // apply the procrustes metric void imfilter(double x, double y); // apply a filter for im reading code void interleave(pointset obj); // print interleaved points }; #endif