00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 #ifndef _VOLPACK
00032 #define _VOLPACK
00033 
00034 
00035 
00036 
00037 
00038 #define ANSI_C   
00039 
00040 #ifdef __STDC__
00041 #ifndef NO_PROTOTYPE
00042 #define ANSI_C
00043 #endif
00044 #endif
00045 
00046 #ifdef __cplusplus
00047 #define ANSI_C
00048 #define EXTERN extern "C"
00049 #else
00050 #define EXTERN extern
00051 #endif
00052 
00053 #ifdef ANSI_C
00054 #define ANSI_ARGS(x)    x
00055 #else
00056 #define ANSI_ARGS(x)    ()
00057 #endif
00058 
00059 
00060 
00061 
00062 
00063 #define VP_EPS  1.0e-11         
00064 #define VP_MAX_VOLUME_DIM 1024  
00065 #define VP_MAX_FIELDS   6       
00066 #define VP_MAX_MATERIAL 6       
00067 #define VP_MAX_LIGHTS   6       
00068 
00069 
00070 #define VP_CVFILE_MAGIC         0x4F4F5F5F 
00071 #define VP_OCTFILE_MAGIC        0x4F4F6F6F 
00072 #define VP_RVFILE_MAGIC         0x4F4F7F7F 
00073 #define VP_VPCFILE_MAGIC        0x4F4F8F8F 
00074 
00075 #define VP_VERSION              "1.1"   
00076 #define VP_MAJOR_VERSION        1       
00077 #define VP_MINOR_VERSION        1       
00078 
00079 
00080 
00081 
00082 
00083 
00084 #define VP_XLEN                 1000    
00085 #define VP_YLEN                 1001    
00086 #define VP_ZLEN                 1002    
00087 #define VP_BYTES_PER_VOXEL      1003    
00088 #define VP_VOXEL_FIELD_COUNT    1004    
00089 #define VP_SHADE_FIELD_COUNT    1005    
00090 #define VP_FIELD_SIZES          1006    
00091 #define VP_FIELD_OFFSETS        1007    
00092 #define VP_FIELD_MAXES          1008    
00093 #define VP_VOXEL_DATA           1009    
00094 #define VP_VOXEL_DATA_SIZE      1010    
00095 #define VP_VOXEL_XSTRIDE        1011    
00096 #define VP_VOXEL_YSTRIDE        1012    
00097 #define VP_VOXEL_ZSTRIDE        1013    
00098 #define VP_MIN_VOXEL_OPACITY    1014    
00099 #define VP_CLASSIFY_FIELD_COUNT 1015    
00100 #define VP_CLASSIFY_FIELDS      1016    
00101 #define VP_CLASSIFY_TABLES      1017    
00102 #define VP_CLASSIFY_TABLE_SIZES 1018    
00103 #define VP_COLOR_CHANNELS       1019    
00104 #define VP_SHADE_FUNC           1020    
00105 #define VP_GRAY_SHADE_FUNC      1021    
00106 #define VP_RGB_SHADE_FUNC       1022    
00107 #define VP_SHADE_COLOR_TABLE    1023    
00108 #define VP_SHADE_COLOR_SIZE     1024    
00109 #define VP_SHADE_WEIGHT_TABLE   1025    
00110 #define VP_SHADE_WEIGHT_SIZE    1026    
00111 #define VP_SHADE_COLOR_FIELD    1027    
00112 #define VP_SHADE_WEIGHT_FIELD   1028    
00113 #define VP_LIGHT_BOTH_SIDES     1029    
00114 #define VP_REVERSE_SURFACE_SIDES 1030   
00115 #define VP_DEPTH_CUE            1031    
00116 #define VP_DEPTH_CUE_FRONT      1032    
00117 #define VP_DEPTH_CUE_DENSITY    1034    
00118 #define VP_DEPTH_CUE_TABLE_SIZE 1035    
00119 #define VP_DEPTH_CUE_SIZE_HINT  1036    
00120 #define VP_DEPTH_CUE_QUANTIZATION 1037  
00121 #define VP_CONCAT_MODE          1038    
00122 #define VP_IMAGE                1039    
00123 #define VP_IMAGE_WIDTH          1040    
00124 #define VP_IMAGE_HEIGHT         1041    
00125 #define VP_IMAGE_SCAN_SIZE      1042    
00126 #define VP_MAX_RAY_OPACITY      1043    
00127 #define VP_VIEW_AXIS            1044    
00128 #define VP_INTERMEDIATE_WIDTH   1045    
00129 #define VP_INTERMEDIATE_HEIGHT  1046    
00130 #define VP_INTERMEDIATE_COLOR   1047    
00131 #define VP_INT_WIDTH_HINT       1048    
00132 #define VP_INT_HEIGHT_HINT      1049    
00133 #define VP_VIEW_X_AXIS          1050    
00134 #define VP_VIEW_Y_AXIS          1051    
00135 #define VP_VIEW_Z_AXIS          1052    
00136 #define VP_VIEW_X_SIZE          1053    
00137 #define VP_VIEW_Y_SIZE          1054    
00138 #define VP_VIEW_Z_SIZE          1055    
00139 #define VP_MMOCTREE_THRESHOLDS  1056    
00140 #define VP_MMOCTREE_SIZE        1057    
00141 #define VP_LOG_ALLOC_FUNC       1058    
00142 #define VP_LOG_FREE_FUNC        1059    
00143 #define VP_STATUS_FUNC          1060    
00144 #define VP_READ_FUNC            1061    
00145 #define VP_WRITE_FUNC           1062    
00146 #define VP_MMAP_FUNC            1063    
00147 #define VP_CLIENT_FUNC          1064    
00148 #define VP_MATERIAL_COUNT       1065    
00149 #define VP_CURRENT_MATRIX       1066    
00150 #define VP_CLIENT_DATA          1067    
00151 #define VP_SHADOW               1068    
00152 #define VP_SHADOW_LIGHT         1069    
00153 #define VP_SHADOW_WIDTH_HINT    1070    
00154 #define VP_SHADOW_HEIGHT_HINT   1071    
00155 #define VP_SHADOW_WIDTH         1072    
00156 #define VP_SHADOW_HEIGHT        1073    
00157 #define VP_SHADOW_COLOR_TABLE   1074    
00158 #define VP_SHADOW_COLOR_SIZE    1075    
00159 #define VP_SHADOW_BIAS          1076    
00160 #define VP_PIXEL_TYPE           1077    
00161 #define VP_CLAMP_SHADE_TABLE    1078    
00162 #define VP_COMPOSITE_ORDER      1079    
00163 #define VP_AXIS_OVERRIDE        1080    
00164 #define VP_TRACE_SHADOW_K       1081    
00165 
00166 
00167 #define VP_LIGHT0               2000
00168 #define VP_LIGHT1               2001
00169 #define VP_LIGHT2               2002
00170 #define VP_LIGHT3               2003
00171 #define VP_LIGHT4               2004
00172 #define VP_LIGHT5               2005
00173 
00174 
00175 #define VP_COLOR                2100    
00176 #define VP_DIRECTION            2101    
00177 
00178 
00179 #define VP_MATERIAL0            2200
00180 #define VP_MATERIAL1            2201
00181 #define VP_MATERIAL2            2202
00182 #define VP_MATERIAL3            2203
00183 #define VP_MATERIAL4            2204
00184 #define VP_MATERIAL5            2205
00185 
00186 
00187 #define VP_AMBIENT              2300    
00188 #define VP_DIFFUSE              2301    
00189 #define VP_SPECULAR             2302    
00190 #define VP_SHINYNESS            2303    
00191 
00192 
00193 
00194 #define VP_PARALLEL             2400    
00195 #define VP_PERSPECTIVE          2401    
00196 
00197 
00198 #define VP_RAW_VOLUME           2500    
00199 #define VP_CLASSIFIED_VOLUME    2501    
00200 #define VP_CLX_VOLUME           2502    
00201 #define VP_CLY_VOLUME           2503    
00202 #define VP_CLZ_VOLUME           2504    
00203 
00204 
00205 #define VP_CONCAT_RIGHT         2600    
00206 #define VP_CONCAT_LEFT          2601    
00207 
00208 
00209 #define VP_EXTERIOR             1
00210 #define VP_INTERIOR             2
00211 #define VP_BOTH_SIDES           (VP_EXTERIOR | VP_INTERIOR)
00212 
00213 
00214 #define VP_X_AXIS               0
00215 #define VP_Y_AXIS               1
00216 #define VP_Z_AXIS               2
00217 #define VP_NO_AXIS              -1
00218 
00219 
00220 #define VP_MODEL                0   
00221 #define VP_VIEW                 1   
00222 #define VP_PROJECT              2   
00223 #define VP_SCREEN               8   
00224 
00225 
00226 #define VP_SKIP_FIELD           -1      
00227 #define VP_OPACITY_FIELD        -2      
00228 #define VP_CORRECTED_OPAC_FIELD -3      
00229 #define VP_COLOR_FIELD          -4      
00230 
00231 
00232 #define VP_IMAGE_BUFFER         4000    
00233 #define VP_SHADOW_BUFFER        4001    
00234 
00235 
00236 #define VP_ALPHA                5000    
00237 #define VP_LUMINANCE            5001    
00238 #define VP_LUMINANCEA           5002    
00239 #define VP_RGB                  5003    
00240 #define VP_RGBA                 5004    
00241 #define VP_BGR                  5005    
00242 #define VP_ABGR                 5006    
00243 
00244 
00245 #define VP_NORM_SIZE            2       
00246 #define VP_SCALAR_SIZE          1       
00247 #define VP_GRAD_SIZE            1       
00248 
00249 #define VP_NORM_MAX             7923    
00250 #define VP_SCALAR_MAX           255     
00251 #define VP_GRAD_MAX             221     
00252 
00253 #define VP_OPACITY_MAX          255     
00254 
00255 
00256 #define VP_UCHAR                1200    
00257 #define VP_USHORT               1201    
00258 #define VP_FLOAT                1202    
00259 
00260 
00261 #define VP_BOX_FILTER           1300    
00262 #define VP_LINEAR_FILTER        1301    
00263 #define VP_GAUSSIAN_FILTER      1302    
00264 #define VP_BSPLINE_FILTER       1303    
00265 #define VP_MITCHELL_FILTER      1304    
00266 
00267 #define VP_GAUSSIAN_SIGMA       0.4
00268 
00269 
00270 
00271 
00272 
00273 
00274 #define vpSetVector3(v, v0, v1, v2)     v[0]=v0; v[1]=v1; v[2]=v2
00275 #define vpSetVector4(v, v0, v1, v2, v3) v[0]=v0; v[1]=v1; v[2]=v2; v[3]=v3
00276 
00277 
00278 #define vpFieldOffset(ptr, field)       ((char *)&(ptr)->field - (char *)(ptr))
00279 
00280 
00281 
00282 
00283 
00284 typedef unsigned vpResult;              
00285 typedef double vpVector3[3];            
00286 typedef double vpVector4[4];            
00287 typedef double vpMatrix3[3][3];         
00288 typedef double vpMatrix4[4][4];         
00289 
00290 typedef struct _vp_context vpContext;
00291 
00292 
00293 
00294 
00295 
00296 #define VPDEBUG_VIEW            0       
00297 #define VPDEBUG_RENDER          1       
00298 #define VPDEBUG_RBUF            2       
00299 #define VPDEBUG_OPCCORRECT      3       
00300 #define VPDEBUG_DEPTHCUE        4       
00301 #define VPDEBUG_PYRAMID         5       
00302 #define VPDEBUG_OCTREE          6       
00303 #define VPDEBUG_CLSFYOCTREE     7       
00304 #define VPDEBUG_OCTREERUNS      8       
00305 #define VPDEBUG_OCTREETRAVERSE  9       
00306 #define VPDEBUG_TRANSPOSE       10      
00307 #define VPDEBUG_COMPOSITE       11      
00308 #define VPDEBUG_SHADOW          12      
00309 #define VPDEBUG_COUNT           13      
00310 
00311 
00312 
00313 
00314 
00315 #define VPTIMER_SHADE           0       
00316 #define VPTIMER_COMPOSITE       1       
00317 #define VPTIMER_DEPTHCUE        2       
00318 #define VPTIMER_WARP            3       
00319 #define VPTIMER_TRAVERSE_RUNS   4       
00320 #define VPTIMER_PROCESS_VOXELS  5       
00321 #define VPTIMER_ERT             6       
00322 #define VPTIMER_CLSFY_OCTREE    7       
00323 #define VPTIMER_TRAVERSE_OCTREE 8       
00324 #define VPTIMER_RENDER          9       
00325 #define VPTIMER_CLEAR          10       
00326 #define VPTIMER_COUNT          11       
00327 
00328 
00329 
00330 
00331 
00332 #define VP_OK   0                       
00333 #define VPERROR_FIRST           1000
00334 #define VPERROR_LIMIT_EXCEEDED  1000    
00335 #define VPERROR_SINGULAR        1001    
00336 #define VPERROR_IO              1002    
00337 #define VPERROR_BAD_SIZE        1003    
00338 #define VPERROR_BAD_IMAGE       1004    
00339 #define VPERROR_BAD_SHADER      1005    
00340 #define VPERROR_BAD_CLASSIFIER  1006    
00341 #define VPERROR_BAD_VOLUME      1007    
00342 #define VPERROR_BAD_VOXEL       1008    
00343 #define VPERROR_BAD_OPTION      1009    
00344 #define VPERROR_BAD_VALUE       1010    
00345 #define VPERROR_BAD_FILE        1011    
00346 #define VPERROR_BAD_SHADOW      1012    
00347 #define VPERROR_LAST            1012
00348 
00349 
00350 
00351 
00352 
00353 EXTERN char *vpCompilerOptions;
00354 
00355 
00356 
00357 
00358 
00359 
00360 EXTERN vpContext *          vpCreateContext ANSI_ARGS((void));
00361 EXTERN void                 vpDestroyContext ANSI_ARGS((vpContext *vpc));
00362 
00363 
00364 EXTERN vpResult             vpSetVolumeSize ANSI_ARGS((vpContext *vpc,
00365                                 int xlen, int ylen, int zlen));
00366 EXTERN vpResult             vpSetVoxelSize ANSI_ARGS((vpContext *vpc,
00367                                 int bytes_per_voxel, int num_voxel_fields,
00368                                 int num_shade_fields, int num_clsfy_fields));
00369 EXTERN vpResult             vpSetVoxelField ANSI_ARGS((vpContext *vpc,
00370                                 int field_num, int field_size,
00371                                 int field_offset, int field_max));
00372 EXTERN vpResult             vpSetRawVoxels ANSI_ARGS((vpContext *vpc,
00373                                 void *raw_voxels, int raw_voxels_size,
00374                                 int xstride, int ystride, int zstride));
00375 
00376 
00377 EXTERN vpResult             vpSetClassifierTable ANSI_ARGS((vpContext *vpc,
00378                                 int param_num, int param_field, float *table,
00379                                 int table_size));
00380 EXTERN vpResult             vpClassifyScalars ANSI_ARGS((vpContext *vpc,
00381                                 unsigned char *scalar_data, int length,
00382                                 int scalar_field, int grad_field,
00383                                 int norm_field));
00384 EXTERN vpResult             vpClassifyVolume ANSI_ARGS((vpContext *vpc));
00385 EXTERN vpResult             vpClassifyScanline ANSI_ARGS((vpContext *vpc,
00386                                 void *voxels));
00387 EXTERN vpResult             vpDestroyClassifiedVolume ANSI_ARGS((
00388                                 vpContext *vpc));
00389 EXTERN vpResult             vpMinMaxOctreeThreshold ANSI_ARGS((vpContext *vpc,
00390                                 int param, int range));
00391 EXTERN vpResult             vpCreateMinMaxOctree ANSI_ARGS((vpContext *vpc,
00392                                 int root_node_size, int base_node_size));
00393 EXTERN vpResult             vpDestroyMinMaxOctree ANSI_ARGS((vpContext *vpc));
00394 EXTERN vpResult             vpOctreeMask ANSI_ARGS((vpContext *vpc,
00395                                 unsigned char *array, int array_size,
00396                                 int max_level));
00397 
00398 
00399 EXTERN vpResult             vpSetLookupShader ANSI_ARGS((vpContext *vpc,
00400                                 int color_channels, int num_materials,
00401                                 int color_field, float *color_table,
00402                                 int color_table_size, int weight_field,
00403                                 float *weight_table, int weight_table_size));
00404 EXTERN vpResult             vpSetShadowLookupShader ANSI_ARGS((vpContext *vpc,
00405                                 int color_channels, int num_materials,
00406                                 int color_field, float *color_table,
00407                                 int color_table_size, int weight_field,
00408                                 float *weight_table, int weight_table_size,
00409                                 float *shadow_table, int shadow_table_size));
00410 EXTERN vpResult             vpSetMaterial ANSI_ARGS((vpContext *vpc,
00411                                 int material, int property, int surface_side,
00412                                 double r, double g, double b));
00413 EXTERN vpResult             vpSetLight ANSI_ARGS((vpContext *vpc,
00414                                 int light_num, int property, double n0,
00415                                 double n1, double n2));
00416 EXTERN vpResult             vpSetDepthCueing ANSI_ARGS((vpContext *vpc,
00417                                 double front_factor, double density));
00418 EXTERN int                  vpNormalIndex ANSI_ARGS((double nx, double ny,
00419                                 double nz));
00420 EXTERN vpResult             vpNormal ANSI_ARGS((int n, double *nx, double *ny,
00421                                 double *nz));
00422 EXTERN vpResult             vpScanlineNormals ANSI_ARGS((vpContext *vpc,
00423                                 int length, unsigned char *scalar_data,
00424                                 unsigned char *scalar_minus_y,
00425                                 unsigned char *scalar_plus_y,
00426                                 unsigned char *scalar_minus_z,
00427                                 unsigned char *scalar_plus_z,
00428                                 void *voxel_data, int scalar_field,
00429                                 int grad_field, int norm_field));
00430 EXTERN vpResult             vpVolumeNormals ANSI_ARGS((vpContext *vpc,
00431                                 unsigned char *scalar_data, int length,
00432                                 int scalar_field, int grad_field,
00433                                 int norm_field));
00434 EXTERN vpResult             vpShadeTable ANSI_ARGS((vpContext *vpc));
00435 
00436 
00437 EXTERN vpResult             vpCurrentMatrix ANSI_ARGS((vpContext *vpc,
00438                                 int option));
00439 EXTERN vpResult             vpIdentityMatrix ANSI_ARGS((vpContext *vpc));
00440 EXTERN vpResult             vpSetMatrix ANSI_ARGS((vpContext *vpc,
00441                                 vpMatrix4 matrix));
00442 EXTERN vpResult             vpMultMatrix ANSI_ARGS((vpContext *vpc,
00443                                 vpMatrix4 matrix));
00444 EXTERN vpResult             vpTranslate ANSI_ARGS((vpContext *vpc,
00445                                 double tx, double ty, double tz));
00446 EXTERN vpResult             vpRotate ANSI_ARGS((vpContext *vpc,
00447                                 int axis, double degrees));
00448 EXTERN vpResult             vpScale ANSI_ARGS((vpContext *vpc,
00449                                 double sx, double sy, double sz));
00450 EXTERN vpResult             vpWindow ANSI_ARGS((vpContext *vpc,
00451                                 int type, double left, double right,
00452                                 double bottom, double top, double near,
00453                                 double far));
00454 EXTERN vpResult             vpWindowPHIGS ANSI_ARGS((vpContext *vpc,
00455                                 vpVector3 vrp, vpVector3 vpn, vpVector3 vup,
00456                                 vpVector3 prp, double viewport_umin,
00457                                 double viewport_umax, double viewport_vmin,
00458                                 double viewport_vmax, double viewport_front,
00459                                 double viewport_back, int projection_type));
00460 
00461 
00462 EXTERN vpResult             vpSetImage ANSI_ARGS((vpContext *vpc,
00463                                 unsigned char *image, int width, int height,
00464                                 int bytes_per_scan, int pixel_type));
00465 
00466 
00467 EXTERN vpResult             vpEnable ANSI_ARGS((vpContext *vpc,
00468                                 int option, int value));
00469 EXTERN vpResult             vpSeti ANSI_ARGS((vpContext *vpc, int option,
00470                                 int value));
00471 EXTERN vpResult             vpSetd ANSI_ARGS((vpContext *vpc, int option,
00472                                 double value));
00473 EXTERN vpResult             vpSetCallback ANSI_ARGS((vpContext *vpc,
00474                                 int option, void *func));
00475 EXTERN vpResult             vpSetClientData ANSI_ARGS((vpContext *vpc,
00476                                 void *client_data));
00477 EXTERN vpResult             vpSetDebug ANSI_ARGS((vpContext *vpc, int flag,
00478                                 int value));
00479 EXTERN vpResult             vpTracePixel ANSI_ARGS((vpContext *vpc,
00480                                 int trace_u, int trace_v));
00481 EXTERN vpResult             vpGetTimer ANSI_ARGS((vpContext *vpc, int option,
00482                                 int *iptr));
00483 EXTERN vpResult             vpClearTimer ANSI_ARGS((vpContext *vpc,
00484                                 int option));
00485 
00486 
00487 EXTERN vpResult             vpRenderClassifiedVolume ANSI_ARGS((
00488                                 vpContext *vpc));
00489 EXTERN vpResult             vpRenderRawVolume ANSI_ARGS((vpContext *vpc));
00490 EXTERN vpResult             vpBruteForceRender ANSI_ARGS((vpContext *vpc));
00491 
00492 
00493 EXTERN vpResult             vpGeti ANSI_ARGS((vpContext *vpc, int option,
00494                                 int *iptr));
00495 EXTERN vpResult             vpGetd ANSI_ARGS((vpContext *vpc, int option,
00496                                 double *dptr));
00497 EXTERN vpResult             vpGetp ANSI_ARGS((vpContext *vpc, int option,
00498                                 void **pptr));
00499 EXTERN vpResult             vpGetMatrix ANSI_ARGS((vpContext *vpc,
00500                                 int matrix_code, vpMatrix4 matrix));
00501 EXTERN vpResult             vpGetMaterial ANSI_ARGS((vpContext *vpc,
00502                                 int material, int property, int surface_side,
00503                                 double *r, double *g, double *b));
00504 EXTERN vpResult             vpGetLight ANSI_ARGS((vpContext *vpc,
00505                                 int light_num, int property,
00506                                 double *n0, double *n1, double *n2));
00507 EXTERN vpResult             vpGetImage ANSI_ARGS((vpContext *vpc,
00508                                 void *image, int width, int height,
00509                                 int scan_bytes, int pixel_type,
00510                                 int image_type));
00511 EXTERN vpResult             vpGetError ANSI_ARGS((vpContext *vpc));
00512 EXTERN char *               vpGetErrorString ANSI_ARGS((vpResult code));
00513 
00514 
00515 EXTERN void                 vpIdentity3 ANSI_ARGS((vpMatrix3 m));
00516 EXTERN void                 vpIdentity4 ANSI_ARGS((vpMatrix4 m));
00517 EXTERN vpResult             vpNormalize3 ANSI_ARGS((vpVector3 v));
00518 EXTERN void                 vpMatrixVectorMult4 ANSI_ARGS((vpVector4 v2,
00519                                 vpMatrix4 m, vpVector4 v1));
00520 EXTERN void                 vpMatrixMult4 ANSI_ARGS((vpMatrix4 m3,
00521                                 vpMatrix4 m2, vpMatrix4 m1));
00522 EXTERN void                 vpCrossProduct ANSI_ARGS((vpVector3 p,
00523                                 vpVector3 v, vpVector3 w));
00524 EXTERN vpResult             vpSolveSystem4 ANSI_ARGS((vpMatrix4 a, double **b,
00525                                 int m));
00526 
00527 
00528 EXTERN vpResult             vpStoreClassifiedVolume ANSI_ARGS((vpContext *vpc,
00529                                 int fd));
00530 EXTERN vpResult             vpLoadClassifiedVolume ANSI_ARGS((vpContext *vpc,
00531                                 int fd));
00532 EXTERN vpResult             vpStoreMinMaxOctree ANSI_ARGS((vpContext *vpc,
00533                                 int fd));
00534 EXTERN vpResult             vpLoadMinMaxOctree ANSI_ARGS((vpContext *vpc,
00535                                 int fd));
00536 EXTERN vpResult             vpStoreRawVolume ANSI_ARGS((vpContext *vpc,
00537                                 int fd));
00538 EXTERN vpResult             vpLoadRawVolume ANSI_ARGS((vpContext *vpc,
00539                                 int fd));
00540 EXTERN vpResult             vpStoreContext ANSI_ARGS((vpContext *vpc, int fd));
00541 EXTERN vpResult             vpLoadContext ANSI_ARGS((vpContext *vpc, int fd));
00542 
00543 
00544 EXTERN vpResult             vpExtract ANSI_ARGS((vpContext *vpc,
00545                                 int volume_type, int x0, int y0, int z0,
00546                                 int x1, int y1, int z1, int field, void *dst,
00547                                 int dst_size, int dst_xstride, int dst_ystride,
00548                                 int dst_zstride));
00549 EXTERN vpResult             vpRamp ANSI_ARGS((float *dst, int stride,
00550                                 int num_points, int *ramp_x, float *ramp_y));
00551 EXTERN vpResult             vpTranspose ANSI_ARGS((vpContext *vpc, int kaxis));
00552 EXTERN vpResult             vpSetFilter ANSI_ARGS((vpContext *vpc,
00553                                 int num_taps, int num_phases, float *weights));
00554 EXTERN vpResult             vpResample ANSI_ARGS((vpContext *vpc,
00555                                 int num_dimens, int *src_dimens,
00556                                 int *dst_dimens, int *src_strides,
00557                                 int *dst_strides, int element_type,
00558                                 void *in_array, void *out_array));
00559 EXTERN vpResult             vpResample2D ANSI_ARGS((
00560                                 void *in_array, int in_x, int in_y,
00561                                 void *out_array, int out_x, int out_y,
00562                                 int element_type, int filter_type));
00563 EXTERN vpResult             vpResample3D ANSI_ARGS((
00564                                 void *in_array, int in_x, int in_y, int in_z,
00565                                 void *out_array, int out_x, int out_y,
00566                                 int out_z, int element_type, int filter_type));
00567 EXTERN vpResult             vpBoxFilter ANSI_ARGS((int num_taps,
00568                                 int num_phases, float *weights,
00569                                 int weights_bytes));
00570 EXTERN vpResult             vpLinearFilter ANSI_ARGS((int num_taps,
00571                                 int num_phases, float *weights,
00572                                 int weights_bytes));
00573 EXTERN vpResult             vpBicubicFilter ANSI_ARGS((double b_value,
00574                                 double c_value, int num_taps, int num_phases,
00575                                 float *weights, int weights_bytes));
00576 EXTERN vpResult             vpGaussianFilter ANSI_ARGS((double sigma,
00577                                 int num_taps, int num_phases, float *weights,
00578                                 int weights_bytes));
00579 #endif