「Contour(API)」の版間の差分
提供: Eospedia
(ページの作成:「DataExpress/'''Contour'''は境界線を算出するためのAPI です。psFile(API)などで使用しています。 == 定数 == #define MINFLOAT (1e-31) #defin...」) |
(→API) |
||
| 行95: | 行95: | ||
== API == | == API == | ||
| − | === | + | === ボクセル内の境界線探索 === |
| + | cによる境界線をlsに追加します。 | ||
extern void createContourALine(contourLine* ls, contourArgs c); | extern void createContourALine(contourLine* ls, contourArgs c); | ||
| − | ===create contour lines in order=== | + | === create contour lines in order === |
extern void createContourLine (contourLines* ls, contourLine* l); | extern void createContourLine (contourLines* ls, contourLine* l); | ||
| − | ===craete contourLines at each section=== | + | === craete contourLines at each section === |
extern void createContourLines(contourLines* ls, contourImage image); | extern void createContourLines(contourLines* ls, contourImage image); | ||
| − | ===create contourLines at all sections=== | + | === create contourLines at all sections === |
extern void createContour(contourLinesSet* lsset, contourImage image, contourParaTypeReal level, contourFlag flag); | extern void createContour(contourLinesSet* lsset, contourImage image, contourParaTypeReal level, contourFlag flag); | ||
| + | === 追加 === | ||
| + | 境界線リストlに(xc1, yc1, z), (xc2, yc2, z)による境界線を追加します。(l=NULLの場合は新規作成) | ||
extern void appendContourLine0(contourLine* l, contourParaTypeReal xc1, contourParaTypeReal yc1, contourParaTypeReal xc2, contourParaTypeReal yc2, contourParaTypeReal z); | extern void appendContourLine0(contourLine* l, contourParaTypeReal xc1, contourParaTypeReal yc1, contourParaTypeReal xc2, contourParaTypeReal yc2, contourParaTypeReal z); | ||
| + | flagContourにより、入出力の座標の対応を選択できます。 | ||
| + | <table border=1> | ||
| + | <tr> | ||
| + | <th>flagContour</th> | ||
| + | <th>入力l側座標</th> | ||
| + | <th>引数側座標</th> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>contourFlagXSection</td> | ||
| + | <td>(x, y, z)</td> | ||
| + | <td>(z, x, y)</td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>contourFlagYSection</td> | ||
| + | <td>(x, y, z)</td> | ||
| + | <td>(y, z, x)</td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>contourFlagZSection</td> | ||
| + | <td>(x, y, z)</td> | ||
| + | <td>(x, y, z)</td> | ||
| + | </tr> | ||
| + | </table> | ||
| + | <br> | ||
| + | |||
| + | 境界線リストlに境界線alsを追加します。(l=NULLの場合は新規作成) | ||
extern void appendContourLine1(contourLine* l, contourLine* als); | extern void appendContourLine1(contourLine* l, contourLine* als); | ||
extern void lmrc2contour(contourLinesSet* c, mrcImage* m, contourParaTypeReal l, contourFlag f, long mode); | extern void lmrc2contour(contourLinesSet* c, mrcImage* m, contourParaTypeReal l, contourFlag f, long mode); | ||
2015年3月18日 (水) 05:11時点における版
DataExpress/Contourは境界線を算出するためのAPI です。psFile(API)などで使用しています。
目次
定数
#define MINFLOAT (1e-31) #define CONTOUR_ACCURACY (MINFLOAT)
構造体
typedef long contourParaTypeInteger; typedef double contourParaTypeReal;
typedef struct contourParaElement {
contourParaTypeInteger n;
contourParaTypeReal Min;
contourParaTypeReal Max;
contourParaTypeReal d;
} contourParaElement;
typedef struct contourImage {
contourParaTypeReal* image;
contourParaTypeReal* image2;
contourParaElement x;
contourParaElement y;
contourParaElement z;
contourParaElement w;
contourParaElement h;
contourParaTypeReal section;
} contourImage;
typedef struct contourPoint {
contourParaTypeReal x;
contourParaTypeReal y;
contourParaTypeReal z;
} contourPoint;
typedef struct contourALine contourALine;
struct contourALine {
contourALine* before;
contourPoint p0;
contourPoint p1;
contourPoint p2;
contourALine* next;
};
typedef struct contourLine contourLine;
struct contourLine {
contourALine* top;
contourALine* current;
contourParaTypeInteger n;
contourLine* next;
};
typedef struct contourLines contourLines;
struct contourLines {
contourLine* top;
contourLine* current;
contourParaTypeInteger n;
contourLines* next;
};
typedef struct contourLinesSet contourLinesSet;
struct contourLinesSet {
contourLines* top;
contourLines* current;
contourParaTypeInteger n;
contourLinesSet* next;
};
typedef struct contourArgs {
contourParaTypeReal f00; /* For 2D Contour*/
contourParaTypeReal f01;
contourParaTypeReal f11;
contourParaTypeReal f10;
contourParaTypeReal f000; /* For 3D Contour */
contourParaTypeReal f001;
contourParaTypeReal f010;
contourParaTypeReal f011;
contourParaTypeReal f100;
contourParaTypeReal f101;
contourParaTypeReal f110;
contourParaTypeReal f111;
contourParaTypeReal x;
contourParaTypeReal y;
contourParaTypeReal z;
contourParaTypeReal dx;
contourParaTypeReal dy;
contourParaTypeReal dz;
} contourArgs;
typedef enum contourFlag {
contourFlagXSection,
contourFlagYSection,
contourFlagZSection,
contourFlag3D
} contourFlag;
API
ボクセル内の境界線探索
cによる境界線をlsに追加します。
extern void createContourALine(contourLine* ls, contourArgs c);
create contour lines in order
extern void createContourLine (contourLines* ls, contourLine* l);
craete contourLines at each section
extern void createContourLines(contourLines* ls, contourImage image);
create contourLines at all sections
extern void createContour(contourLinesSet* lsset, contourImage image, contourParaTypeReal level, contourFlag flag);
追加
境界線リストlに(xc1, yc1, z), (xc2, yc2, z)による境界線を追加します。(l=NULLの場合は新規作成)
extern void appendContourLine0(contourLine* l, contourParaTypeReal xc1, contourParaTypeReal yc1, contourParaTypeReal xc2, contourParaTypeReal yc2, contourParaTypeReal z);
flagContourにより、入出力の座標の対応を選択できます。
| flagContour | 入力l側座標 | 引数側座標 |
|---|---|---|
| contourFlagXSection | (x, y, z) | (z, x, y) |
| contourFlagYSection | (x, y, z) | (y, z, x) |
| contourFlagZSection | (x, y, z) | (x, y, z) |
境界線リストlに境界線alsを追加します。(l=NULLの場合は新規作成)
extern void appendContourLine1(contourLine* l, contourLine* als);
extern void lmrc2contour(contourLinesSet* c, mrcImage* m, contourParaTypeReal l, contourFlag f, long mode);