#include <stdio.h>#include <stdlib.h>#include <limits.h>#include <math.h>#include <teem/air.h>#include <teem/biff.h>#include <teem/ell.h>#include <teem/nrrd.h>


| #define GAGE gageBiffKey |
| #define GAGE_CTX_FLAG_MAX 6 |
| #define GAGE_ERR_MAX 4 |
| #define GAGE_EXPORT extern |
| #define GAGE_ITEM_MAX ((8*GAGE_QUERY_BYTES_NUM)-1) |
| #define GAGE_ITEM_PREREQ_MAXNUM 8 |
| #define GAGE_KERNEL_MAX 7 |
| #define GAGE_PERVOLUME_ARR_INCR 32 |
| #define GAGE_PVL_FLAG_MAX 3 |
| #define GAGE_QUERY_ADD | ( | p, | |||
| q | ) |
Value:
p[ 0] |= q[ 0]; p[ 1] |= q[ 1]; p[ 2] |= q[ 2]; p[ 3] |= q[ 3]; \ p[ 4] |= q[ 4]; p[ 5] |= q[ 5]; p[ 6] |= q[ 6]; p[ 7] |= q[ 7]; \ p[ 8] |= q[ 8]; p[ 9] |= q[ 9]; p[10] |= q[10]; p[11] |= q[11]; \ p[12] |= q[12]; p[13] |= q[13]; p[14] |= q[14]; p[15] |= q[15]; \ p[16] |= q[16]; p[17] |= q[17]; p[18] |= q[18]; p[19] |= q[19]; \ p[20] |= q[20]; p[21] |= q[21]; p[22] |= q[22]; p[23] |= q[23]
| #define GAGE_QUERY_BYTES_NUM 24 |
| #define GAGE_QUERY_COPY | ( | p, | |||
| q | ) |
Value:
p[ 0] = q[ 0]; p[ 1] = q[ 1]; p[ 2] = q[ 2]; p[ 3] = q[ 3]; \ p[ 4] = q[ 4]; p[ 5] = q[ 5]; p[ 6] = q[ 6]; p[ 7] = q[ 7]; \ p[ 8] = q[ 8]; p[ 9] = q[ 9]; p[10] = q[10]; p[11] = q[11]; \ p[12] = q[12]; p[13] = q[13]; p[14] = q[14]; p[15] = q[15]; \ p[16] = q[16]; p[17] = q[17]; p[18] = q[18]; p[19] = q[19]; \ p[20] = q[20]; p[21] = q[21]; p[22] = q[22]; p[23] = q[23]
| #define GAGE_QUERY_EQUAL | ( | p, | |||
| q | ) |
Value:
( \ p[ 0] == q[ 0] && p[ 1] == q[ 1] && p[ 2] == q[ 2] && p[ 3] == q[ 3] && \ p[ 4] == q[ 4] && p[ 5] == q[ 5] && p[ 6] == q[ 6] && p[ 7] == q[ 7] && \ p[ 8] == q[ 8] && p[ 9] == q[ 9] && p[10] == q[10] && p[11] == q[11] && \ p[12] == q[12] && p[13] == q[13] && p[14] == q[14] && p[15] == q[15] && \ p[16] == q[16] && p[17] == q[17] && p[18] == q[18] && p[19] == q[19] && \ p[20] == q[20] && p[21] == q[21] && p[22] == q[22] && p[23] == q[23])
| #define GAGE_QUERY_ITEM_OFF | ( | q, | |||
| i | ) | (q[i/8] &= ~(1 << (i % 8))) |
| #define GAGE_QUERY_ITEM_ON | ( | q, | |||
| i | ) | (q[i/8] |= (1 << (i % 8))) |
| #define GAGE_QUERY_ITEM_TEST | ( | q, | |||
| i | ) | (q[i/8] & (1 << (i % 8))) |
| #define GAGE_QUERY_NONZERO | ( | q | ) |
Value:
( \ q[ 0] | q[ 1] | q[ 2] | q[ 3] | \ q[ 4] | q[ 5] | q[ 6] | q[ 7] | \ q[ 8] | q[ 9] | q[10] | q[11] | \ q[12] | q[13] | q[14] | q[15] | \ q[16] | q[17] | q[18] | q[19] | \ q[20] | q[21] | q[22] | q[23] )
| #define GAGE_QUERY_RESET | ( | q | ) |
Value:
q[ 0] = q[ 1] = q[ 2] = q[ 3] = \ q[ 4] = q[ 5] = q[ 6] = q[ 7] = \ q[ 8] = q[ 9] = q[10] = q[11] = \ q[12] = q[13] = q[14] = q[15] = \ q[16] = q[17] = q[18] = q[19] = \ q[20] = q[21] = q[22] = q[23] = 0
| #define GAGE_SCL_ITEM_MAX 32 |
| #define GAGE_VEC_ITEM_MAX 29 |
| typedef struct gageContext_t gageContext |
| typedef struct gageKind_t gageKind |
| typedef struct gageParm_t gageParm |
| typedef struct gagePerVolume_t gagePerVolume |
| typedef struct gagePoint_t gagePoint |
| typedef unsigned char gageQuery[GAGE_QUERY_BYTES_NUM] |
| typedef void( gageScl3PFilter_t)(gageShape *shape, double *iv3, double *iv2, double *iv1, double *fw00, double *fw11, double *fw22, double *val, double *gvec, double *hess, int doV, int doD1, int doD2) |
| typedef struct gageShape_t gageShape |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| GAGE_EXPORT unsigned int gageAnswerLength | ( | const gageContext * | ctx, | |
| const gagePerVolume * | pvl, | |||
| int | item | |||
| ) |
| GAGE_EXPORT const double* gageAnswerPointer | ( | const gageContext * | ctx, | |
| const gagePerVolume * | pvl, | |||
| int | item | |||
| ) |
| GAGE_EXPORT gageContext* gageContextCopy | ( | gageContext * | ctx | ) |
| GAGE_EXPORT gageContext* gageContextNew | ( | ) |
| GAGE_EXPORT gageContext* gageContextNix | ( | gageContext * | ctx | ) |
| GAGE_EXPORT int gageDeconvolve | ( | Nrrd * | nout, | |
| double * | lastDiffP, | |||
| const Nrrd * | nin, | |||
| const gageKind * | kind, | |||
| const NrrdKernelSpec * | ksp, | |||
| int | typeOut, | |||
| unsigned int | maxIter, | |||
| int | saveAnyway, | |||
| double | step, | |||
| double | epsilon, | |||
| int | verbose | |||
| ) |
| GAGE_EXPORT void gageItemSpecInit | ( | gageItemSpec * | isp | ) |
| GAGE_EXPORT gageItemSpec* gageItemSpecNew | ( | void | ) |
| GAGE_EXPORT gageItemSpec* gageItemSpecNix | ( | gageItemSpec * | isp | ) |
| GAGE_EXPORT void gageKernelReset | ( | gageContext * | ctx | ) |
| GAGE_EXPORT int gageKernelSet | ( | gageContext * | ctx, | |
| int | which, | |||
| const NrrdKernel * | k, | |||
| const double * | kparm | |||
| ) |
| GAGE_EXPORT unsigned int gageKindAnswerLength | ( | const gageKind * | kind, | |
| int | item | |||
| ) |
| GAGE_EXPORT int gageKindAnswerOffset | ( | const gageKind * | kind, | |
| int | item | |||
| ) |
| GAGE_EXPORT int gageKindCheck | ( | const gageKind * | kind | ) |
| GAGE_EXPORT int gageKindTotalAnswerLength | ( | const gageKind * | kind | ) |
| GAGE_EXPORT void gageParmReset | ( | gageParm * | parm | ) |
| GAGE_EXPORT void gageParmSet | ( | gageContext * | ctx, | |
| int | which, | |||
| double | val | |||
| ) |
| GAGE_EXPORT int gagePerVolumeAttach | ( | gageContext * | ctx, | |
| gagePerVolume * | pvl | |||
| ) |
| GAGE_EXPORT int gagePerVolumeDetach | ( | gageContext * | ctx, | |
| gagePerVolume * | pvl | |||
| ) |
| GAGE_EXPORT int gagePerVolumeIsAttached | ( | const gageContext * | ctx, | |
| const gagePerVolume * | pvl | |||
| ) |
| GAGE_EXPORT gagePerVolume* gagePerVolumeNew | ( | gageContext * | ctx, | |
| const Nrrd * | nin, | |||
| const gageKind * | kind | |||
| ) |
| GAGE_EXPORT gagePerVolume* gagePerVolumeNix | ( | gagePerVolume * | pvl | ) |
| GAGE_EXPORT void gagePointReset | ( | gagePoint * | point | ) |
| GAGE_EXPORT int gageProbe | ( | gageContext * | ctx, | |
| double | xi, | |||
| double | yi, | |||
| double | zi | |||
| ) |
| GAGE_EXPORT int gageProbeSpace | ( | gageContext * | ctx, | |
| double | x, | |||
| double | y, | |||
| double | z, | |||
| int | indexSpace, | |||
| int | clamp | |||
| ) |
| GAGE_EXPORT int gageQueryAdd | ( | gageContext * | ctx, | |
| gagePerVolume * | pvl, | |||
| gageQuery | query | |||
| ) |
| GAGE_EXPORT int gageQueryItemOn | ( | gageContext * | ctx, | |
| gagePerVolume * | pvl, | |||
| int | item | |||
| ) |
| GAGE_EXPORT int gageQueryReset | ( | gageContext * | ctx, | |
| gagePerVolume * | pvl | |||
| ) |
| GAGE_EXPORT int gageQuerySet | ( | gageContext * | ctx, | |
| gagePerVolume * | pvl, | |||
| gageQuery | query | |||
| ) |
| GAGE_EXPORT void gageScl3PFilterN | ( | gageShape * | shape, | |
| int | fd, | |||
| double * | iv3, | |||
| double * | iv2, | |||
| double * | iv1, | |||
| double * | fw00, | |||
| double * | fw11, | |||
| double * | fw22, | |||
| double * | val, | |||
| double * | gvec, | |||
| double * | hess, | |||
| int | doV, | |||
| int | doD1, | |||
| int | doD2 | |||
| ) |
| GAGE_EXPORT void gageShapeBoundingBox | ( | double | min[3], | |
| double | max[3], | |||
| gageShape * | shape | |||
| ) |
| GAGE_EXPORT void gageShapeItoW | ( | gageShape * | shape, | |
| double | world[3], | |||
| double | index[3] | |||
| ) |
| GAGE_EXPORT gageShape* gageShapeNew | ( | ) |
| GAGE_EXPORT void gageShapeReset | ( | gageShape * | shp | ) |
| GAGE_EXPORT void gageShapeWtoI | ( | gageShape * | shape, | |
| double | index[3], | |||
| double | world[3] | |||
| ) |
| GAGE_EXPORT double gageSigOfTau | ( | double | tau | ) |
| GAGE_EXPORT int gageStackBlur | ( | Nrrd *const | nblur[], | |
| const double * | scale, | |||
| unsigned int | num, | |||
| const Nrrd * | nin, | |||
| unsigned int | baseDim, | |||
| const NrrdKernelSpec * | kspec, | |||
| int | boundary, | |||
| int | renormalize, | |||
| int | verbose | |||
| ) |
| GAGE_EXPORT int gageStackPerVolumeAttach | ( | gageContext * | ctx, | |
| gagePerVolume * | pvlBase, | |||
| gagePerVolume ** | pvlStack, | |||
| const double * | stackPos, | |||
| unsigned int | blnum | |||
| ) |
| GAGE_EXPORT int gageStackPerVolumeNew | ( | gageContext * | ctx, | |
| gagePerVolume *** | pvlP, | |||
| const Nrrd *const * | nblur, | |||
| unsigned int | blnum, | |||
| const gageKind * | kind | |||
| ) |
| GAGE_EXPORT int gageStackProbe | ( | gageContext * | ctx, | |
| double | xi, | |||
| double | yi, | |||
| double | zi, | |||
| double | si | |||
| ) |
| GAGE_EXPORT int gageStackProbeSpace | ( | gageContext * | ctx, | |
| double | x, | |||
| double | y, | |||
| double | z, | |||
| double | s, | |||
| int | indexSpace, | |||
| int | clamp | |||
| ) |
| GAGE_EXPORT int gageStructureTensor | ( | Nrrd * | nout, | |
| const Nrrd * | nin, | |||
| int | dScale, | |||
| int | iScale, | |||
| int | dsmp | |||
| ) |
| GAGE_EXPORT double gageTauOfSig | ( | double | sig | ) |
| GAGE_EXPORT double gageTauOfTee | ( | double | tee | ) |
| GAGE_EXPORT double gageTeeOfTau | ( | double | tau | ) |
| GAGE_EXPORT int gageUpdate | ( | gageContext * | ctx | ) |
| GAGE_EXPORT int gageVolumeCheck | ( | const gageContext * | ctx, | |
| const Nrrd * | nin, | |||
| const gageKind * | kind | |||
| ) |
| GAGE_EXPORT const char* gageBiffKey |
| GAGE_EXPORT int gageDefCheckIntegrals |
| GAGE_EXPORT int gageDefCurvNormalSide |
| GAGE_EXPORT int gageDefDefaultCenter |
| GAGE_EXPORT double gageDefDefaultSpacing |
| GAGE_EXPORT double gageDefGradMagCurvMin |
| GAGE_EXPORT int gageDefK3Pack |
| GAGE_EXPORT double gageDefKernelIntegralNearZero |
| GAGE_EXPORT int gageDefRenormalize |
| GAGE_EXPORT int gageDefRequireAllSpacings |
| GAGE_EXPORT int gageDefRequireEqualCenters |
| GAGE_EXPORT int gageDefStackRenormalize |
| GAGE_EXPORT int gageDefStackUse |
| GAGE_EXPORT int gageDefVerbose |
| GAGE_EXPORT airEnum* gageKernel |
| GAGE_EXPORT gageKind* const gageKindScl |
| GAGE_EXPORT gageKind* const gageKindVec |
| GAGE_EXPORT gageScl3PFilter_t gageScl3PFilter2 |
| GAGE_EXPORT gageScl3PFilter_t gageScl3PFilter4 |
| GAGE_EXPORT gageScl3PFilter_t gageScl3PFilter6 |
| GAGE_EXPORT gageScl3PFilter_t gageScl3PFilter8 |
| GAGE_EXPORT double gageZeroNormal[3] |
1.5.6