/* * dicen.h * * structure and constant definitions for dicentric detection * by the candidate generation from density profile followed * by feature extraction and within-cell box classification method. * ******************************************************************************* * MODIFICATION HISTORY * -------------------- * 22-05-90 jimp added kurtosis and crossing-profile curvature features. * Needed to increase MAXFEATURES. * * ??-??-90 joanne added various bits and bobs. * * 21-06-88 jimp added ->obj,->cpol for display program * 08-04-88 jimp added mom1ratio feature * 28-03-88 jimp added ovFP, ovFN to struct dcresults * 23-03-88 jimp Added porigin * 11-03-88 simon Added curvsum * 02-03-88 jimp Added profcurv * 25-02-88 jimp Added axislen,neardistfeat * 02-02-88 jimp Added struct dcresults. * 20-01-88 jimp Added "neardist" for nearest other-type candidate. * 21-01-87 jimp First atempt to expand to accomodate both Jim and Simon. * 10-02-87 jimp Candtype comment */ #define MAXCANDS 300 /* max candidates in a cell */ #define CQUANTUM 20 /* for profile analysis */ #define MAXOBJECTS 100 #define MAXFEATURES 25 #define XSCALE 1.0 /* Objects were digitised on FIP, */ #define YSCALE 0.75 /* had 4:3 aspect ratio originally */ #define MAXVALUE 3000 #define COLNUMBER 10 #define Atype 'a' #define Btype 'b' #define screendist 100.0 struct chromcands { int number; /* object number in some ordering */ int ncands; /* number of candidates on this object */ int selected; /* selected for inclusion in classification ? */ int otype; /* object type as in property list */ int Cotype; /* correct object type */ int btype; /* object "biological" type as in property list */ int Cbtype; /* correct object "biological" type */ int porigin; /* parental origin, as plist->history[0] (qv.) */ int profmax; /* profile maximum value */ int quantum; /* true quantum value used for candidate extraction */ int axislen; /* length of medial axis / profiles */ int area; /* object area */ int density; /* object relative density (mass/area) */ struct object *obj; /* image object */ struct cand *cands; /* the actual candidate centromeres */ }; struct cand { int candtype; /* 1: derived from profile, 2: derived from boundary, 3: randomly positioned candidate, 4: acrocentric candidate, -1: unusable */ int candnum; /* candidate serial number for this chromosome */ int profpos; /* location (index) on density profile */ int lboundpos; /* location (index) of left chord end point on boundary */ int rboundpos; /* location (index) of right chord end point on boundary */ int boundmaxcurv; /* which end point has maximum curvature: 1: left, 2: right, 3: identical */ int nearest; /* serial of nearest candidate of other type (-1 if none) */ int neardist; /* distance (along medial axis) to nearest (1000000 if none) */ int ctype; /* computed candidate type e.g. centromere, artefact */ int Cctype; /* true candidate type (training data) */ char abtype; struct object *cpol; /* centromere polygon */ union { int af[MAXFEATURES]; /* array features of candidate */ struct { /* symbolic names of features */ int profval; /* 1: profile value at candidate */ int profdepth; /* 2: depth below profile peak */ int width; /* 3: width */ int cprofsum; /* 4: crossing profile sum */ int cprofpeak; /* 5: crossing profile peak */ int modality; /* 6: of crossing profile */ int skewness; /* 7: of crossing profile */ int cvhdeficiency; /* 8: between crossing profile and its semi-hull */ int cvhhwdiff; /* 9: c.h. deficiency weighted by chord cotangent to horizontal */ int curvmax; /* 10: maximum curvature of bounda at chord end point */ int curvmin; /* 11: minimum curvature of boundary at chord end point */ int chordprofconfig; /* 12: configuration of profile where chord crosses: 1 = profile local minimum, 0 = other */ int nprofval; /* 13: normalised by profmax */ int ncprofpeak; /* 14: normalised by density */ int ncvhdeficiency; /* 15: normalised by cprofsum */ int neardistfeat; /* 16: as neardist but max 20 if none */ int profcurv; /* 17 profile 2nd derivative at candidate */ int curvsum; /* 18 sum of curvmax and curvmin */ int mom1ratio; /* 19 ratio 1st to 0th central moment of crossing profile */ int cprofcurv; /* 20 curvature at centroid of crossing profile */ int kurtosis; /* 21 of crossing profile */ } sy; } u; }; struct dcresults { int ncells; int TP; /* true positive */ int FP; /* false positive */ int FN; /* false negative */ int UTP; /* unsure true positive */ int UFN; /* unsure false negative */ int twistedFP; /* false positive (twisted arms) */ int compoFP; /* false positive (undetected composite ) */ int ovFP; /* false positive (from overlap split) */ int acroFN; /* false negative (acrocentric) */ int onecandFN; /* false negative (only one candidate) */ int areaFN; /* false negative (too small) */ int ovFN; /* false negative (from overlap split) */ int nchrom; /* number of "chromosomes" analysed */ int nwithcands; /* number of "chromosomes" with >=1 candidates */ }; struct ftrvalueStruct { int min[MAXVALUE]; int other[MAXVALUE]; }; struct scaledftrvalueStruct { int min[2*COLNUMBER]; int other[2*COLNUMBER]; int value[2*COLNUMBER]; };