グラフィックデータ定義用ヘッダ More...
#include "gheader.h"
#include "matrix.h"
Go to the source code of this file.
Data Structures | |
struct | BSGraph |
struct | WSGraph |
struct | ISGraph |
struct | FSGraph |
struct | VSGraph |
struct | MSGraph |
struct | IRBound |
struct | DRBound |
Defines | |
#define | unset_RZxy() {ChkRZxy=OFF;} |
#define | free_Graph(v) {if((v)!=NULL){if((v)->gp)free((v)->gp); (v)->gp=NULL; (v)->xs=(v)->ys=(v)->zs=0; (v)->state=JBXL_NORMAL;}} |
vのバッファ部を解放する. | |
#define | free_WSGraph(v) {if((v)!=NULL){if((v)->gp)free((v)->gp); (v)->gp=NULL; (v)->xs=(v)->ys=(v)->zs=0; (v)->state=JBXL_NORMAL;}} |
#define | free_BSGraph(v) {if((v)!=NULL){if((v)->gp)free((v)->gp); (v)->gp=NULL; (v)->xs=(v)->ys=(v)->zs=0; (v)->state=JBXL_NORMAL;}} |
#define | free_FSGraph(v) {if((v)!=NULL){if((v)->gp)free((v)->gp); (v)->gp=NULL; (v)->xs=(v)->ys=(v)->zs=0; (v)->state=JBXL_NORMAL;}} |
#define | free_ISGraph(v) {if((v)!=NULL){if((v)->gp)free((v)->gp); (v)->gp=NULL; (v)->xs=(v)->ys=(v)->zs=0; (v)->state=JBXL_NORMAL;}} |
#define | free_VSGraph(v) {if((v)!=NULL){if((v)->gp)free((v)->gp); (v)->gp=NULL; (v)->xs=(v)->ys=(v)->zs=0; (v)->state=JBXL_NORMAL;}} |
#define | free_MSGraph(v) {if((v)!=NULL){if((v)->gp)free((v)->gp); (v)->gp=NULL; (v)->xs=(v)->ys=(v)->zs=(v)->depth=0; (v)->state=JBXL_NORMAL;}} |
#define | del_Graph(v) {if((v)!=NULL && *(v)!=NULL) {if((*(v))->gp)free((*(v))->gp); free((*(v)); *(v)=NULL}} |
#define | del_WSGraph(v) {if((v)!=NULL && *(v)!=NULL) {if((*(v))->gp)free((*(v))->gp); free((*(v)); *(v)=NULL}} |
#define | del_BSGraph(v) {if((v)!=NULL && *(v)!=NULL) {if((*(v))->gp)free((*(v))->gp); free((*(v)); *(v)=NULL}} |
#define | del_FSGraph(v) {if((v)!=NULL && *(v)!=NULL) {if((*(v))->gp)free((*(v))->gp); free((*(v)); *(v)=NULL}} |
#define | del_ISGraph(v) {if((v)!=NULL && *(v)!=NULL) {if((*(v))->gp)free((*(v))->gp); free((*(v)); *(v)=NULL}} |
#define | del_VSGraph(v) {if((v)!=NULL && *(v)!=NULL) {if((*(v))->gp)free((*(v))->gp); free((*(v)); *(v)=NULL}} |
#define | del_MSGraph(v) {if((v)!=NULL && *(v)!=NULL) {if((*(v))->gp)free((*(v))->gp); free((*(v)); *(v)=NULL}} |
#define | Lx(v, i) ((v).gp[(i)]) |
1次元画像データ vの (i) のデータを参照する. | |
#define | Px(v, i, j) ((v).gp[(i)+(v).xs*(j)]) |
2次元画像データ vの (i, j) のデータを参照する. | |
#define | Vx(v, i, j, k) ((v).gp[(i)+(v).xs*(j)+(v).xs*(v).ys*(k)]) |
3次元画像データ vの (i, j, k) のデータを参照する. | |
#define | pLx(v, i) ((v)->gp[(i)]) |
1次元画像データ vの (i) のデータを参照する. | |
#define | pPx(v, i, j) ((v)->gp[(i)+(v)->xs*(j)]) |
2次元画像データ vの (i, j) のデータを参照する. | |
#define | pVx(v, i, j, k) ((v)->gp[(i)+(v)->xs*(j)+(v)->xs*(v)->ys*(k)]) |
3次元画像データ vの (i, j, k) のデータを参照する. | |
#define | Lxt(v, i) ((v).gp[((i)-1)]) |
座標を 1 から数える. | |
#define | Pxt(v, i, j) ((v).gp[((i)-1)+(v).xs*((j)-1)]) |
#define | Vxt(v, i, j, k) ((v).gp[((i)-1)+(v).xs*((j)-1)+(v).xs*(v).ys*((k)-1)]) |
#define | pLxt(v, i) ((v)->gp[((i)-1)]) |
座標を 1 から数える. | |
#define | pPxt(v, i, j) ((v)->gp[((i)-1)+(v)->xs*((j)-1)]) |
#define | pVxt(v, i, j, k) ((v)->gp[((i)-1)+(v)->xs*((j)-1)+(v)->xs*(v).ys->((k)-1)]) |
Functions | |
WSGraph | B2WSGraph (BSGraph vp) |
WSGraph | I2WSGraph (ISGraph vp) |
WSGraph | F2WSGraph (FSGraph vp) |
ISGraph | W2ISGraph (WSGraph vp) |
FSGraph | W2FSGraph (WSGraph vp) |
WSGraph | V2WSGraph (VSGraph vp) |
FSGraph | V2FSGraph (VSGraph vp) |
BSGraph | make_BSGraph (int xs, int ys, int zs) |
WSGraph | make_WSGraph (int xs, int ys, int zs) |
FSGraph | make_FSGraph (int xs, int ys, int zs) |
ISGraph | make_ISGraph (int xs, int ys, int zs) |
VSGraph | make_VSGraph (int xs, int ys, int zs) |
MSGraph | make_MSGraph (int xs, int ys, int zs, int depth) |
BSGraph * | new_BSGraph (int xs, int ys, int zs) |
WSGraph * | new_WSGraph (int xs, int ys, int zs) |
FSGraph * | new_FSGraph (int xs, int ys, int zs) |
ISGraph * | new_ISGraph (int xs, int ys, int zs) |
VSGraph * | new_VSGraph (int xs, int ys, int zs) |
MSGraph * | new_MSGraph (int xs, int ys, int zs, int depth) |
WSGraph | zoom_WSGraph (WSGraph vp, int zm, int mode) |
WSGraph | grab_WSGraph (WSGraph vp, int x1, int y1, int x2, int y2) |
void | copy_WSGraph (WSGraph src, WSGraph dst) |
int | chk_RZxy (void) |
void | set_RZxy (double rzm) |
void | init_IRBound (IRBound *rb) |
void | init_DRBound (DRBound *rb) |
void | free_CmnHead (CmnHead *hd) |
void | init_CmnHead (CmnHead *hd) |
Variables | |
int | ZeroBase |
double | RZxy |
int | ChkRZxy |
Definition in file gdata.h.
#define del_BSGraph | ( | v | ) | {if((v)!=NULL && *(v)!=NULL) {if((*(v))->gp)free((*(v))->gp); free((*(v)); *(v)=NULL}} |
#define del_FSGraph | ( | v | ) | {if((v)!=NULL && *(v)!=NULL) {if((*(v))->gp)free((*(v))->gp); free((*(v)); *(v)=NULL}} |
#define del_Graph | ( | v | ) | {if((v)!=NULL && *(v)!=NULL) {if((*(v))->gp)free((*(v))->gp); free((*(v)); *(v)=NULL}} |
#define del_ISGraph | ( | v | ) | {if((v)!=NULL && *(v)!=NULL) {if((*(v))->gp)free((*(v))->gp); free((*(v)); *(v)=NULL}} |
#define del_MSGraph | ( | v | ) | {if((v)!=NULL && *(v)!=NULL) {if((*(v))->gp)free((*(v))->gp); free((*(v)); *(v)=NULL}} |
#define del_VSGraph | ( | v | ) | {if((v)!=NULL && *(v)!=NULL) {if((*(v))->gp)free((*(v))->gp); free((*(v)); *(v)=NULL}} |
#define del_WSGraph | ( | v | ) | {if((v)!=NULL && *(v)!=NULL) {if((*(v))->gp)free((*(v))->gp); free((*(v)); *(v)=NULL}} |
#define free_BSGraph | ( | v | ) | {if((v)!=NULL){if((v)->gp)free((v)->gp); (v)->gp=NULL; (v)->xs=(v)->ys=(v)->zs=0; (v)->state=JBXL_NORMAL;}} |
#define free_FSGraph | ( | v | ) | {if((v)!=NULL){if((v)->gp)free((v)->gp); (v)->gp=NULL; (v)->xs=(v)->ys=(v)->zs=0; (v)->state=JBXL_NORMAL;}} |
#define free_Graph | ( | v | ) | {if((v)!=NULL){if((v)->gp)free((v)->gp); (v)->gp=NULL; (v)->xs=(v)->ys=(v)->zs=0; (v)->state=JBXL_NORMAL;}} |
#define free_ISGraph | ( | v | ) | {if((v)!=NULL){if((v)->gp)free((v)->gp); (v)->gp=NULL; (v)->xs=(v)->ys=(v)->zs=0; (v)->state=JBXL_NORMAL;}} |
#define free_MSGraph | ( | v | ) | {if((v)!=NULL){if((v)->gp)free((v)->gp); (v)->gp=NULL; (v)->xs=(v)->ys=(v)->zs=(v)->depth=0; (v)->state=JBXL_NORMAL;}} |
Definition at line 182 of file gdata.h.
Referenced by free_TIFF_ifd_dem(), and proc_tiff_ifd().
#define free_VSGraph | ( | v | ) | {if((v)!=NULL){if((v)->gp)free((v)->gp); (v)->gp=NULL; (v)->xs=(v)->ys=(v)->zs=0; (v)->state=JBXL_NORMAL;}} |
Definition at line 181 of file gdata.h.
Referenced by curvature(), curvature3D(), vfNabra(), and vNabra().
#define free_WSGraph | ( | v | ) | {if((v)!=NULL){if((v)->gp)free((v)->gp); (v)->gp=NULL; (v)->xs=(v)->ys=(v)->zs=0; (v)->state=JBXL_NORMAL;}} |
Definition at line 177 of file gdata.h.
Referenced by euclid_distance(), and Nabra().
#define Lxt | ( | v, | |||
i | ) | ((v).gp[((i)-1)]) |
Definition at line 200 of file gdata.h.
Referenced by euclid_distance().
#define pVx | ( | v, | |||
i, | |||||
j, | |||||
k | ) | ((v)->gp[(i)+(v)->xs*(j)+(v)->xs*(v)->ys*(k)]) |
#define pVxt | ( | v, | |||
i, | |||||
j, | |||||
k | ) | ((v)->gp[((i)-1)+(v)->xs*((j)-1)+(v)->xs*(v).ys->((k)-1)]) |
#define Px | ( | v, | |||
i, | |||||
j | ) | ((v).gp[(i)+(v).xs*(j)]) |
Definition at line 193 of file gdata.h.
Referenced by grab_WSGraph(), Laplacian(), and triangle().
#define unset_RZxy | ( | ) | {ChkRZxy=OFF;} |
Definition at line 170 of file gdata.h.
Referenced by read_dicom_file().
#define Vx | ( | v, | |||
i, | |||||
j, | |||||
k | ) | ((v).gp[(i)+(v).xs*(j)+(v).xs*(v).ys*(k)]) |
#define Vxt | ( | v, | |||
i, | |||||
j, | |||||
k | ) | ((v).gp[((i)-1)+(v).xs*((j)-1)+(v).xs*(v).ys*((k)-1)]) |
Definition at line 202 of file gdata.h.
Referenced by euclid_distance().
uByte型単純グラフィックデータ(ISGraph)を sWord型単純グラフィック データ(WSGraph)に変換する.
vp | 変換する int型単純グラフィックデータ |
Definition at line 677 of file gdata.c.
References BSGraph::gp, WSGraph::gp, JBXL_GRAPH_MEMORY_ERROR, BSGraph::state, WSGraph::state, BSGraph::xs, WSGraph::xs, BSGraph::ys, WSGraph::ys, BSGraph::zs, and WSGraph::zs.
00678 { 00679 int i; 00680 WSGraph ix; 00681 00682 ix.xs = vp.xs; 00683 ix.ys = vp.ys; 00684 ix.zs = vp.zs; 00685 ix.state = vp.state; 00686 00687 ix.gp = (sWord*)malloc(ix.xs*ix.ys*ix.zs*sizeof(sWord)); 00688 if (ix.gp==NULL) { 00689 memset(&ix, 0, sizeof(WSGraph)); 00690 ix.state = JBXL_GRAPH_MEMORY_ERROR; 00691 return ix; 00692 } 00693 00694 for (i=0; i<ix.xs*ix.ys*ix.zs; i++) ix.gp[i] = (sWord)vp.gp[i]; 00695 return ix; 00696 }
int chk_RZxy | ( | void | ) |
int chk_RZxy(void)
z軸のひずみを設定が設定されているかどうかをチェックする.
Definition at line 868 of file gdata.c.
References ChkRZxy, DEBUG_MODE, FALSE, OFF, PRINT_MESG, and TRUE.
Referenced by get_wdat(), set_wdat(), write_ct_file(), and write_file_rb().
00869 { 00870 if (ChkRZxy==OFF) { 00871 DEBUG_MODE PRINT_MESG("CHK_RZXY: WARNING: undefined RZxy!!!\n"); 00872 //exit(1); 00873 return FALSE; 00874 } 00875 return TRUE; 00876 }
void copy_WSGraph(WSGraph src, WSGraph dst)
WSGraph型データのバッファ部をコピーする.とにかくコピーする.できるだけコピーする.
コピー元とコピー先のバッファ部のサイズが合わない場合,コピー結果は保証されない.
src | コピー元グラフィックデータ | |
dst | コピー先グラフィックデータ |
Definition at line 1380 of file graph.c.
01381 { 01382 int i, ssz, dsz, sz; 01383 01384 if (src.zs<=0) src.zs = 1; 01385 if (dst.zs<=0) dst.zs = 1; 01386 ssz = src.xs*src.ys*src.zs; 01387 dsz = dst.xs*dst.ys*dst.zs; 01388 sz = Min(ssz, dsz); 01389 01390 for (i=0; i<sz; i++) dst.gp[i] = src.gp[i]; 01391 for (i=sz; i<dsz; i++) dst.gp[i] = 0; 01392 return; 01393 }
double型単純グラフィックデータ(FSGraph)を sWord型単純グラフィック データ(WSGraph)に変換する.
vp | 変換する double型単純グラフィックデータ |
Definition at line 741 of file gdata.c.
References FSGraph::gp, WSGraph::gp, JBXL_GRAPH_MEMORY_ERROR, FSGraph::state, WSGraph::state, FSGraph::xs, WSGraph::xs, FSGraph::ys, WSGraph::ys, FSGraph::zs, and WSGraph::zs.
00742 { 00743 int i; 00744 WSGraph ix; 00745 00746 ix.xs = vp.xs; 00747 ix.ys = vp.ys; 00748 ix.zs = vp.zs; 00749 ix.state = vp.state; 00750 00751 ix.gp = (sWord*)malloc(ix.xs*ix.ys*ix.zs*sizeof(sWord)); 00752 if (ix.gp==NULL) { 00753 memset(&ix, 0, sizeof(WSGraph)); 00754 ix.state = JBXL_GRAPH_MEMORY_ERROR; 00755 return ix; 00756 } 00757 00758 for (i=0; i<ix.xs*ix.ys*ix.zs; i++) ix.gp[i] = (sWord)vp.gp[i]; 00759 return ix; 00760 }
void free_CmnHead | ( | CmnHead * | hd | ) |
void free_CmnHead(CmnHead* hd)
共通ヘッダのメモリ領域を開放する.cmnHead.kind は HEADER_NONE になる. init_CmnHead()を内包している.
hd | 開放する共通ヘッダ |
Definition at line 28 of file gdata.c.
References CmnHead::buf, CmnHead::grptr, and init_CmnHead().
Referenced by read_cmn_file(), read_ct_data(), read_ras_data(), read_ras_file(), read_user_data(), and read_wsg_file().
00029 { 00030 if (hd!=NULL) { 00031 if (hd->buf!=NULL) free(hd->buf); 00032 if (hd->grptr!=NULL) free(hd->grptr); 00033 init_CmnHead(hd); 00034 } 00035 }
WSGraph grab_WSGraph(WSGraph vp, int x1, int y1, int x2, int y2)
WSGraph型データの (x1,y1)-(x2,y2)の矩形部分だけを取り出す.
(x1,y1)-(x2,y2)が元のデータのサイズを越える場合は,元のデータに合わせられる.
vp | 操作対象グラフィックデータ | |
(x1,y1),(x2,y2) | 矩形の対角の座標. |
Definition at line 1338 of file graph.c.
01339 { 01340 int i, j, xs, xe, ys, ye, xsize, ysize; 01341 WSGraph xp; 01342 01343 xs = Min(x1, x2); 01344 xe = Max(x1, x2); 01345 xe = Min(xe, vp.xs-1); 01346 ys = Min(y1, y2); 01347 ye = Max(y1, y2); 01348 ye = Min(ye, vp.ys-1); 01349 xsize = xe - xs + 1; 01350 ysize = ye - ys + 1; 01351 01352 xp = make_WSGraph(xsize, ysize, 1); 01353 if (xp.gp==NULL) { 01354 memset(&xp, 0, sizeof(WSGraph)); 01355 xp.state = JBXL_GRAPH_MEMORY_ERROR; 01356 return xp; 01357 } 01358 01359 for (j=0; j<ysize; j++) { 01360 for (i=0; i<xsize; i++) { 01361 Px(xp, i, j) = Px(vp, i+xs, j+ys); 01362 } 01363 } 01364 01365 return xp; 01366 }
int型単純グラフィックデータ(ISGraph)を sWord型単純グラフィック データ(WSGraph)に変換する.
vp | 変換する int型単純グラフィックデータ |
Definition at line 709 of file gdata.c.
References ISGraph::gp, WSGraph::gp, JBXL_GRAPH_MEMORY_ERROR, ISGraph::state, WSGraph::state, ISGraph::xs, WSGraph::xs, ISGraph::ys, WSGraph::ys, ISGraph::zs, and WSGraph::zs.
00710 { 00711 int i; 00712 WSGraph ix; 00713 00714 ix.xs = vp.xs; 00715 ix.ys = vp.ys; 00716 ix.zs = vp.zs; 00717 ix.state = vp.state; 00718 00719 ix.gp = (sWord*)malloc(ix.xs*ix.ys*ix.zs*sizeof(sWord)); 00720 if (ix.gp==NULL) { 00721 memset(&ix, 0, sizeof(WSGraph)); 00722 ix.state = JBXL_GRAPH_MEMORY_ERROR; 00723 return ix; 00724 } 00725 00726 for (i=0; i<ix.xs*ix.ys*ix.zs; i++) ix.gp[i] = (sWord)vp.gp[i]; 00727 return ix; 00728 }
void init_CmnHead | ( | CmnHead * | hd | ) |
void init_CmnHead(CmnHead* hd)
共通ヘッダのメモリ領域を初期化する.cmnHead.kind は HEADER_NONE になる.
hd | 初期化する共通ヘッダ |
Definition at line 46 of file gdata.c.
References HEADER_NONE, and CmnHead::kind.
Referenced by free_CmnHead(), read_cmn_file(), read_cmn_header(), read_ct_data(), read_ras_data(), read_user_data(), read_xxx_file(), write_file_rb(), and write_ras_file().
00047 { 00048 if (hd!=NULL) { 00049 memset(hd, 0, sizeof(CmnHead)); 00050 hd->kind = HEADER_NONE; 00051 } 00052 }
void init_DRBound | ( | DRBound * | rb | ) |
void init_DRBound(DRBound* rb)
2D境界データ構造体を初期化する.
[out] | rb | 初期化する境界データ. |
Definition at line 836 of file gdata.c.
References DRBound::misc, OFF, DRBound::xmax, DRBound::xmin, DRBound::ymax, DRBound::ymin, DRBound::zmax, and DRBound::zmin.
void init_IRBound | ( | IRBound * | rb | ) |
void init_IRBound(IRBound* rb)
境界データ構造体を初期化する.
[out] | rb | 初期化する境界データ. |
Definition at line 820 of file gdata.c.
References IRBound::misc, OFF, SINTMAX, IRBound::xmax, IRBound::xmin, IRBound::ymax, IRBound::ymin, IRBound::zmax, and IRBound::zmin.
Referenced by cut_object().
00821 { 00822 rb->xmax = rb->ymax = rb->zmax = 0; 00823 rb->xmin = rb->ymin = rb->zmin = SINTMAX; 00824 rb->misc = OFF; 00825 }
BSGraph make_BSGraph | ( | int | xs, | |
int | ys, | |||
int | zs | |||
) |
BSGraph make_BSGraph(int xs, int ys, int zs)
Byte型単純グラフィックデータ(BSGraph)のメモリ領域を確保する. グラフィックデータ部分は 0クリアされる.
xs | 確保するグラフィックデータの x方向のサイズ. | |
ys | 確保するグラフィックデータの y方向のサイズ. | |
zs | 確保するグラフィックデータの z方向のサイズ. |
Definition at line 69 of file gdata.c.
References BSGraph::gp, JBXL_GRAPH_IVDARG_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_NORMAL, BSGraph::state, BSGraph::xs, BSGraph::ys, and BSGraph::zs.
Referenced by jp2k_toBSGraph(), JPEGImage2BSGraph(), and read_shape_main_file().
00070 { 00071 int i; 00072 BSGraph vp; 00073 00074 memset(&vp, 0, sizeof(BSGraph)); 00075 if (xs==0 || ys==0) { 00076 vp.state = JBXL_GRAPH_IVDARG_ERROR; 00077 return vp; 00078 } 00079 00080 vp.xs = xs; 00081 vp.ys = ys; 00082 if (zs>0) vp.zs = zs; 00083 else vp.zs = 1; 00084 vp.state = JBXL_NORMAL; 00085 00086 vp.gp = (uByte*)malloc(vp.xs*vp.ys*vp.zs*sizeof(uByte)); 00087 if (vp.gp==NULL) { 00088 memset(&vp, 0, sizeof(BSGraph)); 00089 vp.state = JBXL_GRAPH_MEMORY_ERROR; 00090 return vp; 00091 } 00092 00093 for (i=0; i<vp.xs*vp.ys*vp.zs; i++) vp.gp[i] = 0; 00094 00095 return vp; 00096 }
FSGraph make_FSGraph | ( | int | xs, | |
int | ys, | |||
int | zs | |||
) |
FSGraph make_FSGraph(int xs, int ys, int zs)
double 型単純グラフィックデータ(FSGraph)のメモリ領域を確保する. グラフィックデータ部分は 0クリアされる.
xs | 確保するグラフィックデータの x方向のサイズ. | |
ys | 確保するグラフィックデータの y方向のサイズ. | |
zs | 確保するグラフィックデータの z方向のサイズ. |
Definition at line 157 of file gdata.c.
References FSGraph::gp, JBXL_GRAPH_IVDARG_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_NORMAL, FSGraph::state, FSGraph::xs, FSGraph::ys, and FSGraph::zs.
Referenced by fNabra(), fxSobel(), fxxSobel(), fySobel(), fyySobel(), fzSobel(), fzzSobel(), and V2FSGraph().
00158 { 00159 int i; 00160 FSGraph vp; 00161 00162 memset(&vp, 0, sizeof(FSGraph)); 00163 if (xs==0 || ys==0) { 00164 vp.state = JBXL_GRAPH_IVDARG_ERROR; 00165 return vp; 00166 } 00167 00168 vp.xs = xs; 00169 vp.ys = ys; 00170 if (zs>0) vp.zs = zs; 00171 else vp.zs = 1; 00172 vp.state = JBXL_NORMAL; 00173 00174 vp.gp = (double*)malloc(vp.xs*vp.ys*vp.zs*sizeof(double)); 00175 if (vp.gp==NULL) { 00176 memset(&vp, 0, sizeof(FSGraph)); 00177 vp.state = JBXL_GRAPH_MEMORY_ERROR; 00178 return vp; 00179 } 00180 00181 for (i=0; i<vp.xs*vp.ys*vp.zs; i++) vp.gp[i] = 0.0; 00182 00183 return vp; 00184 }
ISGraph make_ISGraph | ( | int | xs, | |
int | ys, | |||
int | zs | |||
) |
ISGraph make_ISGraph(int xs, int ys, int zs)
int型単純グラフィックデータ(ISGraph)のメモリ領域を確保する. グラフィックデータ部分は 0クリアされる.
xs | 確保するグラフィックデータの x方向のサイズ. | |
ys | 確保するグラフィックデータの y方向のサイズ. | |
zs | 確保するグラフィックデータの z方向のサイズ. |
Definition at line 201 of file gdata.c.
References ISGraph::gp, JBXL_GRAPH_IVDARG_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_NORMAL, ISGraph::state, ISGraph::xs, ISGraph::ys, and ISGraph::zs.
Referenced by euclid_distance().
00202 { 00203 int i; 00204 ISGraph vp; 00205 00206 memset(&vp, 0, sizeof(ISGraph)); 00207 if (xs==0 || ys==0) { 00208 vp.state = JBXL_GRAPH_IVDARG_ERROR; 00209 return vp; 00210 } 00211 00212 vp.xs = xs; 00213 vp.ys = ys; 00214 if (zs>0) vp.zs = zs; 00215 else vp.zs = 1; 00216 vp.state = JBXL_NORMAL; 00217 00218 vp.gp = (int*)malloc(vp.xs*vp.ys*vp.zs*sizeof(int)); 00219 if (vp.gp==NULL) { 00220 memset(&vp, 0, sizeof(ISGraph)); 00221 vp.state = JBXL_GRAPH_MEMORY_ERROR; 00222 return vp; 00223 } 00224 00225 for (i=0; i<vp.xs*vp.ys*vp.zs; i++) vp.gp[i] = 0; 00226 00227 return vp; 00228 }
MSGraph make_MSGraph | ( | int | xs, | |
int | ys, | |||
int | zs, | |||
int | depth | |||
) |
MSGraph make_MSGraph(int xs, int ys, int zs, int depth)
単純グラフィックデータ(MSGraph)のメモリ領域を確保する. グラフィックデータ部分は 0クリアされる.
xs | 確保するグラフィックデータの x方向のサイズ. | |
ys | 確保するグラフィックデータの y方向のサイズ. | |
zs | 確保するグラフィックデータの z方向のサイズ. | |
depth | カラーデプス(bit) |
Definition at line 290 of file gdata.c.
References MSGraph::depth, MSGraph::gp, JBXL_GRAPH_IVDARG_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_NORMAL, MSGraph::state, MSGraph::xs, MSGraph::ys, and MSGraph::zs.
Referenced by proc_tiff_ifd().
00291 { 00292 MSGraph vp; 00293 00294 memset(&vp, 0, sizeof(MSGraph)); 00295 if (xs==0 || ys==0) { 00296 vp.state = JBXL_GRAPH_IVDARG_ERROR; 00297 return vp; 00298 } 00299 00300 vp.xs = xs; 00301 vp.ys = ys; 00302 if (zs>0) vp.zs = zs; 00303 else vp.zs = 1; 00304 if (depth>0) vp.depth = depth; 00305 else vp.depth = 1; 00306 vp.state = JBXL_NORMAL; 00307 00308 vp.gp = (unsigned char*)malloc(xs*ys*zs*((depth+7)/8)); 00309 if (vp.gp==NULL) { 00310 memset(&vp, 0, sizeof(MSGraph)); 00311 vp.state = JBXL_GRAPH_MEMORY_ERROR; 00312 return vp; 00313 } 00314 00315 memset(vp.gp, 0, xs*ys*zs*((depth+7)/8)); 00316 return vp; 00317 }
VSGraph make_VSGraph | ( | int | xs, | |
int | ys, | |||
int | zs | |||
) |
VSGraph make_VSGraph(int xs, int ys, int zs)
vector型単純グラフィックデータ(VSGraph)のメモリ領域を確保する. グラフィックデータ部分は 0クリアされる.
xs | 確保するグラフィックデータの x方向のサイズ. | |
ys | 確保するグラフィックデータの y方向のサイズ. | |
zs | 確保するグラフィックデータの z方向のサイズ. |
Definition at line 245 of file gdata.c.
References VSGraph::gp, JBXL_GRAPH_IVDARG_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_NORMAL, set_vector(), VSGraph::state, VSGraph::xs, VSGraph::ys, and VSGraph::zs.
Referenced by curvature(), curvature3D(), vfNabra(), and vNabra().
00246 { 00247 int i; 00248 VSGraph vp; 00249 00250 memset(&vp, 0, sizeof(VSGraph)); 00251 if (xs==0 || ys==0) { 00252 vp.state = JBXL_GRAPH_IVDARG_ERROR; 00253 return vp; 00254 } 00255 00256 vp.xs = xs; 00257 vp.ys = ys; 00258 if (zs>0) vp.zs = zs; 00259 else vp.zs = 1; 00260 vp.state = JBXL_NORMAL; 00261 00262 vp.gp = (vector*)malloc(xs*ys*zs*sizeof(vector)); 00263 if (vp.gp==NULL) { 00264 memset(&vp, 0, sizeof(VSGraph)); 00265 vp.state = JBXL_GRAPH_MEMORY_ERROR; 00266 return vp; 00267 } 00268 00269 for (i=0; i<xs*ys*zs; i++) vp.gp[i] = set_vector(0.0, 0.0, 0.0); 00270 00271 return vp; 00272 }
WSGraph make_WSGraph | ( | int | xs, | |
int | ys, | |||
int | zs | |||
) |
WSGraph make_WSGraph(int xs, int ys, int zs)
sWord型単純グラフィックデータ(WSGraph)のメモリ領域を確保する. グラフィックデータ部分は 0クリアされる.
xs | 確保するグラフィックデータの x方向のサイズ. | |
ys | 確保するグラフィックデータの y方向のサイズ. | |
zs | 確保するグラフィックデータの z方向のサイズ. |
Definition at line 113 of file gdata.c.
References WSGraph::gp, JBXL_GRAPH_IVDARG_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_NORMAL, WSGraph::state, WSGraph::xs, WSGraph::ys, and WSGraph::zs.
Referenced by circle3d(), curv2WSGraph(), cut_object(), edge_enhance(), euclid_distance(), grab_WSGraph(), imask(), JPEGImage2WSGraph(), Laplacian(), median(), Nabra(), pool(), read_dicom_file(), to2d(), torus(), V2WSGraph(), x_reverse_wsg(), xSobel(), xxSobel(), ySobel(), yySobel(), zoom_WSGraph(), zSobel(), and zzSobel().
00114 { 00115 int i; 00116 WSGraph vp; 00117 00118 memset(&vp, 0, sizeof(WSGraph)); 00119 if (xs==0 || ys==0) { 00120 vp.state = JBXL_GRAPH_IVDARG_ERROR; 00121 return vp; 00122 } 00123 00124 vp.xs = xs; 00125 vp.ys = ys; 00126 if (zs>0) vp.zs = zs; 00127 else vp.zs = 1; 00128 vp.state = JBXL_NORMAL; 00129 00130 vp.gp = (sWord*)malloc(vp.xs*vp.ys*vp.zs*sizeof(sWord)); 00131 if (vp.gp==NULL) { 00132 memset(&vp, 0, sizeof(WSGraph)); 00133 vp.state = JBXL_GRAPH_MEMORY_ERROR; 00134 return vp; 00135 } 00136 00137 for (i=0; i<vp.xs*vp.ys*vp.zs; i++) vp.gp[i] = 0; 00138 00139 return vp; 00140 }
BSGraph* new_BSGraph | ( | int | xs, | |
int | ys, | |||
int | zs | |||
) |
BSGraph* new_BSGraph(int xs, int ys, int zs)
Byte型単純グラフィックデータ(BSGraph)のメモリ領域を確保する. グラフィックデータ部分は 0クリアされる.
xs | 確保するグラフィックデータの x方向のサイズ. | |
ys | 確保するグラフィックデータの y方向のサイズ. | |
zs | 確保するグラフィックデータの z方向のサイズ. |
Definition at line 334 of file gdata.c.
References BSGraph::gp, JBXL_GRAPH_IVDARG_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_NORMAL, BSGraph::state, BSGraph::xs, BSGraph::ys, and BSGraph::zs.
00335 { 00336 int i; 00337 BSGraph* vp; 00338 00339 vp = (BSGraph*)malloc(sizeof(BSGraph)); 00340 if (vp==NULL) return NULL; 00341 memset(vp, 0, sizeof(BSGraph)); 00342 00343 if (xs==0 || ys==0) { 00344 vp->state = JBXL_GRAPH_IVDARG_ERROR; 00345 return vp; 00346 } 00347 00348 vp->xs = xs; 00349 vp->ys = ys; 00350 if (zs>0) vp->zs = zs; 00351 else vp->zs = 1; 00352 vp->state = JBXL_NORMAL; 00353 00354 vp->gp = (uByte*)malloc(vp->xs*vp->ys*vp->zs*sizeof(uByte)); 00355 if (vp->gp==NULL) { 00356 memset(vp, 0, sizeof(BSGraph)); 00357 vp->state = JBXL_GRAPH_MEMORY_ERROR; 00358 return vp; 00359 } 00360 00361 for (i=0; i<vp->xs*vp->ys*vp->zs; i++) vp->gp[i] = 0; 00362 00363 return vp; 00364 }
FSGraph* new_FSGraph | ( | int | xs, | |
int | ys, | |||
int | zs | |||
) |
FSGraph* new_FSGraph(int xs, int ys, int zs)
double 型単純グラフィックデータ(FSGraph)のメモリ領域を確保する. グラフィックデータ部分は 0クリアされる.
xs | 確保するグラフィックデータの x方向のサイズ. | |
ys | 確保するグラフィックデータの y方向のサイズ. | |
zs | 確保するグラフィックデータの z方向のサイズ. |
Definition at line 428 of file gdata.c.
References FSGraph::gp, JBXL_GRAPH_IVDARG_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_NORMAL, FSGraph::state, FSGraph::xs, FSGraph::ys, and FSGraph::zs.
00429 { 00430 int i; 00431 FSGraph* vp; 00432 00433 vp = (FSGraph*)malloc(sizeof(FSGraph)); 00434 if (vp==NULL) return NULL; 00435 memset(vp, 0, sizeof(FSGraph)); 00436 00437 if (xs==0 || ys==0) { 00438 vp->state = JBXL_GRAPH_IVDARG_ERROR; 00439 return vp; 00440 } 00441 00442 vp->xs = xs; 00443 vp->ys = ys; 00444 if (zs>0) vp->zs = zs; 00445 else vp->zs = 1; 00446 vp->state = JBXL_NORMAL; 00447 00448 vp->gp = (double*)malloc(vp->xs*vp->ys*vp->zs*sizeof(double)); 00449 if (vp->gp==NULL) { 00450 memset(vp, 0, sizeof(FSGraph)); 00451 vp->state = JBXL_GRAPH_MEMORY_ERROR; 00452 return vp; 00453 } 00454 00455 for (i=0; i<vp->xs*vp->ys*vp->zs; i++) vp->gp[i] = 0.0; 00456 00457 return vp; 00458 }
ISGraph* new_ISGraph | ( | int | xs, | |
int | ys, | |||
int | zs | |||
) |
ISGraph* new_ISGraph(int xs, int ys, int zs)
int型単純グラフィックデータ(ISGraph)のメモリ領域を確保する. グラフィックデータ部分は 0クリアされる.
xs | 確保するグラフィックデータの x方向のサイズ. | |
ys | 確保するグラフィックデータの y方向のサイズ. | |
zs | 確保するグラフィックデータの z方向のサイズ. |
Definition at line 475 of file gdata.c.
References ISGraph::gp, JBXL_GRAPH_IVDARG_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_NORMAL, ISGraph::state, ISGraph::xs, ISGraph::ys, and ISGraph::zs.
00476 { 00477 int i; 00478 ISGraph* vp; 00479 00480 vp = (ISGraph*)malloc(sizeof(ISGraph)); 00481 if (vp==NULL) return NULL; 00482 00483 memset(vp, 0, sizeof(ISGraph)); 00484 if (xs==0 || ys==0) { 00485 vp->state = JBXL_GRAPH_IVDARG_ERROR; 00486 return vp; 00487 } 00488 00489 vp->xs = xs; 00490 vp->ys = ys; 00491 if (zs>0) vp->zs = zs; 00492 else vp->zs = 1; 00493 vp->state = JBXL_NORMAL; 00494 00495 vp->gp = (int*)malloc(vp->xs*vp->ys*vp->zs*sizeof(int)); 00496 if (vp->gp==NULL) { 00497 memset(vp, 0, sizeof(ISGraph)); 00498 vp->state = JBXL_GRAPH_MEMORY_ERROR; 00499 return vp; 00500 } 00501 00502 for (i=0; i<vp->xs*vp->ys*vp->zs; i++) vp->gp[i] = 0; 00503 00504 return vp; 00505 }
MSGraph* new_MSGraph | ( | int | xs, | |
int | ys, | |||
int | zs, | |||
int | depth | |||
) |
MSGraph* new_MSGraph(int xs, int ys, int zs, int depth)
単純グラフィックデータ(MSGraph)のメモリ領域を確保する. グラフィックデータ部分は 0クリアされる.
xs | 確保するグラフィックデータの x方向のサイズ. | |
ys | 確保するグラフィックデータの y方向のサイズ. | |
zs | 確保するグラフィックデータの z方向のサイズ. | |
depth | カラーデプス(bit) |
Definition at line 570 of file gdata.c.
References MSGraph::depth, MSGraph::gp, JBXL_GRAPH_IVDARG_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_NORMAL, MSGraph::state, MSGraph::xs, MSGraph::ys, and MSGraph::zs.
00571 { 00572 MSGraph* vp; 00573 00574 vp = (MSGraph*)malloc(sizeof(MSGraph)); 00575 if (vp==NULL) return NULL; 00576 memset(vp, 0, sizeof(MSGraph)); 00577 00578 if (xs==0 || ys==0) { 00579 vp->state = JBXL_GRAPH_IVDARG_ERROR; 00580 return vp; 00581 } 00582 00583 vp->xs = xs; 00584 vp->ys = ys; 00585 if (zs>0) vp->zs = zs; 00586 else vp->zs = 1; 00587 if (depth>0) vp->depth = depth; 00588 else vp->depth = 1; 00589 vp->state = JBXL_NORMAL; 00590 00591 vp->gp = (unsigned char*)malloc(vp->xs*vp->ys*vp->zs*((depth+7)/8)); 00592 if (vp->gp==NULL) { 00593 memset(vp, 0, sizeof(MSGraph)); 00594 vp->state = JBXL_GRAPH_MEMORY_ERROR; 00595 return vp; 00596 } 00597 00598 memset(vp->gp, 0, vp->xs*vp->ys*vp->zs*((depth+7)/8)); 00599 return vp; 00600 }
VSGraph* new_VSGraph | ( | int | xs, | |
int | ys, | |||
int | zs | |||
) |
VSGraph* new_VSGraph(int xs, int ys, int zs)
vector型単純グラフィックデータ(VSGraph)のメモリ領域を確保する. グラフィックデータ部分は 0クリアされる.
xs | 確保するグラフィックデータの x方向のサイズ. | |
ys | 確保するグラフィックデータの y方向のサイズ. | |
zs | 確保するグラフィックデータの z方向のサイズ. |
Definition at line 522 of file gdata.c.
References VSGraph::gp, JBXL_GRAPH_IVDARG_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_NORMAL, set_vector(), VSGraph::state, VSGraph::xs, VSGraph::ys, and VSGraph::zs.
00523 { 00524 int i; 00525 VSGraph* vp; 00526 00527 vp = (VSGraph*)malloc(sizeof(VSGraph)); 00528 if (vp==NULL) return NULL; 00529 memset(vp, 0, sizeof(VSGraph)); 00530 00531 if (xs==0 || ys==0) { 00532 vp->state = JBXL_GRAPH_IVDARG_ERROR; 00533 return vp; 00534 } 00535 00536 vp->xs = xs; 00537 vp->ys = ys; 00538 if (zs>0) vp->zs = zs; 00539 else vp->zs = 1; 00540 vp->state = JBXL_NORMAL; 00541 00542 vp->gp = (vector*)malloc(vp->xs*vp->ys*vp->zs*sizeof(vector)); 00543 if (vp->gp==NULL) { 00544 memset(vp, 0, sizeof(VSGraph)); 00545 vp->state = JBXL_GRAPH_MEMORY_ERROR; 00546 return vp; 00547 } 00548 00549 for (i=0; i<vp->xs*vp->ys*vp->zs; i++) vp->gp[i] = set_vector(0.0, 0.0, 0.0); 00550 00551 return vp; 00552 }
WSGraph* new_WSGraph | ( | int | xs, | |
int | ys, | |||
int | zs | |||
) |
WSGraph* new_WSGraph(int xs, int ys, int zs)
sWord型単純グラフィックデータ(WSGraph)のメモリ領域を確保する. グラフィックデータ部分は 0クリアされる.
xs | 確保するグラフィックデータの x方向のサイズ. | |
ys | 確保するグラフィックデータの y方向のサイズ. | |
zs | 確保するグラフィックデータの z方向のサイズ. |
Definition at line 381 of file gdata.c.
References WSGraph::gp, JBXL_GRAPH_IVDARG_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_NORMAL, WSGraph::state, WSGraph::xs, WSGraph::ys, and WSGraph::zs.
00382 { 00383 int i; 00384 WSGraph* vp; 00385 00386 vp = (WSGraph*)malloc(sizeof(WSGraph)); 00387 if (vp==NULL) return NULL; 00388 memset(vp, 0, sizeof(WSGraph)); 00389 00390 if (xs==0 || ys==0) { 00391 vp->state = JBXL_GRAPH_IVDARG_ERROR; 00392 return vp; 00393 } 00394 00395 vp->xs = xs; 00396 vp->ys = ys; 00397 if (zs>0) vp->zs = zs; 00398 else vp->zs = 1; 00399 vp->state = JBXL_NORMAL; 00400 00401 vp->gp = (sWord*)malloc(vp->xs*vp->ys*vp->zs*sizeof(sWord)); 00402 if (vp->gp==NULL) { 00403 memset(vp, 0, sizeof(WSGraph)); 00404 vp->state = JBXL_GRAPH_MEMORY_ERROR; 00405 return vp; 00406 } 00407 00408 for (i=0; i<vp->xs*vp->ys*vp->zs; i++) vp->gp[i] = 0; 00409 00410 return vp; 00411 }
void set_RZxy | ( | double | rzm | ) |
void set_RZxy(double rzm)
z軸のひずみを設定する.デフォルトでは 1.0に設定されている. 設定を無効にするには void unset_RZxy(void) を使用する.
rzm | ひずみの値. |
Definition at line 853 of file gdata.c.
References ChkRZxy, ON, and RZxy.
Referenced by read_dicom_file(), read_wsg_file(), and read_wsg_file_rb().
00854 { 00855 ChkRZxy = ON; 00856 RZxy = rzm; 00857 //fprintf(stderr,"set_RZxy: set RZxy to %f\n", rzm); 00858 }
vector型単純グラフィックデータ(VSGraph)を double型単純グラフィック データ(FSGraph)に変換する.
vp | 変換する vector型単純グラフィックデータ |
Definition at line 773 of file gdata.c.
References VSGraph::gp, FSGraph::gp, make_FSGraph(), vector::n, VSGraph::state, FSGraph::state, FSGraph::xs, VSGraph::xs, FSGraph::ys, VSGraph::ys, FSGraph::zs, and VSGraph::zs.
00774 { 00775 int i; 00776 FSGraph ix; 00777 00778 ix = make_FSGraph(vp.xs, vp.ys, vp.zs); 00779 if (ix.gp==NULL) return ix; 00780 00781 for (i=0; i<ix.xs*ix.ys*ix.zs; i++) ix.gp[i] = vp.gp[i].n; 00782 ix.state = vp.state; 00783 00784 return ix; 00785 }
vector型単純グラフィックデータ(VSGraph)を sWord型単純グラフィックデータ(WSGraph)に変換する.
vp | 変換する vector型単純グラフィックデータ |
Definition at line 797 of file gdata.c.
References VSGraph::gp, WSGraph::gp, make_WSGraph(), vector::n, VSGraph::state, WSGraph::state, WSGraph::xs, VSGraph::xs, WSGraph::ys, VSGraph::ys, WSGraph::zs, and VSGraph::zs.
00798 { 00799 int i; 00800 WSGraph ix; 00801 00802 ix = make_WSGraph(vp.xs, vp.ys, vp.zs); 00803 if (ix.gp==NULL) return ix; 00804 00805 for (i=0; i<ix.xs*ix.ys*ix.zs; i++) ix.gp[i] = (sWord)vp.gp[i].n; 00806 ix.state = vp.state; 00807 00808 return ix; 00809 }
sWord型単純グラフィックデータ(WSGraph)を double型単純グラフィック データ(FSGraph)に変換する.
vp | 変換する sWord型単純グラフィックデータ |
Definition at line 645 of file gdata.c.
References WSGraph::gp, FSGraph::gp, JBXL_GRAPH_MEMORY_ERROR, WSGraph::state, FSGraph::state, WSGraph::xs, FSGraph::xs, WSGraph::ys, FSGraph::ys, WSGraph::zs, and FSGraph::zs.
Referenced by WSCurve().
00646 { 00647 int i; 00648 FSGraph ix; 00649 00650 ix.xs = vp.xs; 00651 ix.ys = vp.ys; 00652 ix.zs = vp.zs; 00653 ix.state = vp.state; 00654 00655 ix.gp = (double*)malloc(ix.xs*ix.ys*ix.zs*sizeof(double)); 00656 if (ix.gp==NULL) { 00657 memset(&ix, 0, sizeof(FSGraph)); 00658 ix.state = JBXL_GRAPH_MEMORY_ERROR; 00659 return ix; 00660 } 00661 00662 for (i=0; i<ix.xs*ix.ys*ix.zs; i++) ix.gp[i]=(double)vp.gp[i]; 00663 return ix; 00664 }
sWord型単純グラフィックデータ(WSGraph)を int型単純グラフィック データ(ISGraph)に変換する.
vp | 変換する sWord型単純グラフィックデータ |
Definition at line 613 of file gdata.c.
References WSGraph::gp, ISGraph::gp, JBXL_GRAPH_MEMORY_ERROR, WSGraph::state, ISGraph::state, WSGraph::xs, ISGraph::xs, WSGraph::ys, ISGraph::ys, WSGraph::zs, and ISGraph::zs.
00614 { 00615 int i; 00616 ISGraph ix; 00617 00618 ix.xs = vp.xs; 00619 ix.ys = vp.ys; 00620 ix.zs = vp.zs; 00621 ix.state = vp.state; 00622 00623 ix.gp = (int*)malloc(ix.xs*ix.ys*ix.zs*sizeof(int)); 00624 if (ix.gp==NULL) { 00625 memset(&ix, 0, sizeof(ISGraph)); 00626 ix.state = JBXL_GRAPH_MEMORY_ERROR; 00627 return ix; 00628 } 00629 00630 for (i=0; i<ix.xs*ix.ys*ix.zs; i++) ix.gp[i] = (int)vp.gp[i]; 00631 return ix; 00632 }
WSGraph zoom_WSGraph(WSGraph vp, int zm, int mode)
グラフィックデータ拡大する.
vp | 変換する Word型単純グラフィックデータ. | |
zm | 倍率. | |
mode | モード.1: 線形補間拡大,その他: 単純拡大 |
Definition at line 1271 of file graph.c.
01272 { 01273 WSGraph vx; 01274 int i, j, k, l, m, n; 01275 sWord ws, wt; 01276 01277 memset(&vx, 0, sizeof(WSGraph)); 01278 if (zm<1) { 01279 vx.state = JBXL_GRAPH_IVDARG_ERROR; 01280 return vx; 01281 } 01282 01283 vx = make_WSGraph(vp.xs*zm, vp.ys*zm, 1); 01284 if (vx.gp==NULL) { 01285 memset(&vx, 0, sizeof(WSGraph)); 01286 vx.state = JBXL_GRAPH_MEMORY_ERROR; 01287 return vx; 01288 } 01289 01290 if (mode==1){ 01291 for(j=0; j<vp.ys; j++) { 01292 for(i=0; i<vp.xs; i++) { 01293 m = i + j*vp.xs; 01294 n = (i + j*vx.xs)*zm; 01295 if(i==vp.xs-1) wt = 0; 01296 else wt = (vp.gp[m+1] - vp.gp[m])/zm; 01297 if(j==vp.ys-1) ws = 0; 01298 else ws = (vp.gp[m+vp.xs] - vp.gp[m])/zm; 01299 01300 for(k=0; k<zm; k++) { 01301 for(l=0; l<zm; l++) { 01302 vx.gp[n+l+k*vx.xs] = ws*k + wt*l + vp.gp[m]; 01303 } 01304 } 01305 } 01306 } 01307 } 01308 else { 01309 for(j=0; j<vp.ys; j++) { 01310 for(i=0; i<vp.xs; i++) { 01311 m = i + j*vp.xs; 01312 n = (i + j*vx.xs)*zm; 01313 for(k=0; k<zm; k++) { 01314 for(l=0; l<zm; l++) { 01315 vx.gp[n+l+k*vx.xs] = vp.gp[m]; 01316 } 01317 } 01318 } 01319 } 01320 } 01321 return vx; 01322 }
int ChkRZxy |
Definition at line 17 of file gdata.c.
Referenced by chk_RZxy(), and set_RZxy().
double RZxy |
Definition at line 16 of file gdata.c.
Referenced by get_wdat(), set_RZxy(), set_wdat(), sphere(), write_ct_file(), and write_file_rb().
int ZeroBase |
Definition at line 15 of file gdata.c.
Referenced by read_wsg_file(), read_wsg_file_rb(), write_ct_file(), and write_file_rb().