2 enum { nrrdCenterUnknown
, nrrdCenterNode
, nrrdCenterCell
, nrrdCenterLast
};
3 typedef struct { int size
; int center
; } NrrdAxis
;
4 typedef struct { int dim
; NrrdAxis axis
[10]; } Nrrd
;
5 typedef struct { } NrrdKernel
;
6 typedef struct { const NrrdKernel
*kernel
[10]; int samples
[10]; } Info
;
9 foo (Nrrd
*nout
, Nrrd
*nin
, const NrrdKernel
*kernel
, const double *parm
,
10 const int *samples
, const double *scalings
)
14 for (d
=0; d
<nin
->dim
; d
++)
16 info
->kernel
[d
] = kernel
;
18 info
->samples
[d
] = samples
[d
];
21 center
= _nrrdCenter(nin
->axis
[d
].center
);
22 if (nrrdCenterCell
== center
)
23 info
->samples
[d
] = nin
->axis
[d
].size
*scalings
[d
];
25 info
->samples
[d
] = (nin
->axis
[d
].size
- 1)*scalings
[d
] + 1;