OSDN Git Service

Modified: doc
[eos/optional.git] / doc / Objects / Contour.html
1 <HR>
2 <A NAME="Information">
3 <H2>Information from source codes</H2>
4 </A>
5 <PRE>
6 </PRE>
7 <HR>
8 <A NAME="include">
9 <H2>Contour.h</H2>
10 </A>
11 <PRE>
12 #ifndef CONTOUR_H
13 #define CONTOUR_H
14 /*
15     contour.h
16 */
17 #include  "genUtil.h"
18
19 #ifndef MINFLOAT
20 #define MINFLOAT (1e-31)
21 #endif
22
23 #include "mrcImage.h"
24 /* constant begin */
25 #define CONTOUR_ACCURACY  (MINFLOAT)
26 /* constant end */
27
28 /* struct begin */
29 typedef long   contourParaTypeInteger;
30 typedef double contourParaTypeReal;
31
32 typedef struct contourParaElement {
33     contourParaTypeInteger n;
34     contourParaTypeReal    Min;
35     contourParaTypeReal    Max;
36     contourParaTypeReal    d;
37 } contourParaElement;
38
39 typedef struct contourImage {
40     contourParaTypeReal* image;
41     contourParaTypeReal* image2;
42     contourParaElement   x;
43     contourParaElement   y;
44     contourParaElement   z;
45     contourParaElement   w;
46     contourParaElement   h;
47     contourParaTypeReal  section;
48 } contourImage;
49
50 typedef struct contourPoint {
51     contourParaTypeReal    x;
52     contourParaTypeReal    y;
53     contourParaTypeReal    z;
54 } contourPoint;
55
56 typedef struct contourALine contourALine;
57 struct contourALine {
58     contourALine* before;
59     contourPoint p0;
60     contourPoint p1;
61     contourPoint p2;
62     contourALine* next;
63 };
64
65 typedef struct contourLine contourLine;
66 struct contourLine {
67     contourALine* top;
68     contourALine* current;
69     contourParaTypeInteger n;
70     contourLine*  next;
71 };
72
73 typedef struct contourLines contourLines;
74 struct contourLines {
75     contourLine*  top;
76     contourLine*  current;
77     contourParaTypeInteger n;
78     contourLines* next;
79 };
80
81 typedef struct contourLinesSet contourLinesSet;
82 struct contourLinesSet {
83     contourLines*  top;
84     contourLines*  current;
85     contourParaTypeInteger n;
86     contourLinesSet* next;
87 };
88
89 typedef struct contourArgs {
90     contourParaTypeReal f00;  /* For 2D Contour*/
91     contourParaTypeReal f01;
92     contourParaTypeReal f11;
93     contourParaTypeReal f10;
94     contourParaTypeReal f000; /* For 3D Contour */
95     contourParaTypeReal f001;
96     contourParaTypeReal f010;
97     contourParaTypeReal f011;
98     contourParaTypeReal f100;
99     contourParaTypeReal f101;
100     contourParaTypeReal f110;
101     contourParaTypeReal f111;
102     contourParaTypeReal x;
103     contourParaTypeReal y;
104     contourParaTypeReal z;
105     contourParaTypeReal dx;
106     contourParaTypeReal dy;
107     contourParaTypeReal dz;
108 } contourArgs;
109
110 typedef enum contourFlag {
111     contourFlagXSection,
112     contourFlagYSection,
113     contourFlagZSection,
114     contourFlag3D
115 } contourFlag;
116 /* struct end */
117
118 /* prototype begin */
119 /* search contour lines in a boxel */
120 extern void createContourALine(contourLine* ls, contourArgs c);
121
122 /* create contour lines in order */
123 extern void createContourLine (contourLines*  ls, contourLine* l);
124
125 /* craete contourLines at each section */
126 extern void createContourLines(contourLines* ls, contourImage image);
127
128 /* create contourLines at all sections */
129 extern void createContour(contourLinesSet* lsset, contourImage image, contourParaTypeReal level, contourFlag flag);
130
131 extern void appendContourLine0(contourLine* l, contourParaTypeReal xc1, contourParaTypeReal yc1, contourParaTypeReal xc2, contourParaTypeReal yc2, contourParaTypeReal z);
132 extern void appendContourLine1(contourLine* l, contourLine* als);
133
134 extern void lmrc2contour(contourLinesSet* c, mrcImage* m, contourParaTypeReal l, contourFlag f, long mode); 
135 /* prototype end */
136
137 #endif /* CONTOUR_H */
138 </PRE>