|
From: <kin...@us...> - 2025-08-16 14:04:49
|
Revision: 7291
http://sourceforge.net/p/teem/code/7291
Author: kindlmann
Date: 2025-08-16 14:04:46 +0000 (Sat, 16 Aug 2025)
Log Message:
-----------
synching with source
Modified Paths:
--------------
teem/trunk/python/cffi/cdef/cdef_air.h
teem/trunk/python/cffi/cdef/cdef_alan.h
teem/trunk/python/cffi/cdef/cdef_bane.h
teem/trunk/python/cffi/cdef/cdef_biff.h
teem/trunk/python/cffi/cdef/cdef_coil.h
teem/trunk/python/cffi/cdef/cdef_dye.h
teem/trunk/python/cffi/cdef/cdef_echo.h
teem/trunk/python/cffi/cdef/cdef_elf.h
teem/trunk/python/cffi/cdef/cdef_ell.h
teem/trunk/python/cffi/cdef/cdef_gage.h
teem/trunk/python/cffi/cdef/cdef_hest.h
teem/trunk/python/cffi/cdef/cdef_hoover.h
teem/trunk/python/cffi/cdef/cdef_limn.h
teem/trunk/python/cffi/cdef/cdef_meet.h
teem/trunk/python/cffi/cdef/cdef_mite.h
teem/trunk/python/cffi/cdef/cdef_moss.h
teem/trunk/python/cffi/cdef/cdef_nrrd.h
teem/trunk/python/cffi/cdef/cdef_pull.h
teem/trunk/python/cffi/cdef/cdef_push.h
teem/trunk/python/cffi/cdef/cdef_seek.h
teem/trunk/python/cffi/cdef/cdef_ten.h
teem/trunk/python/cffi/cdef/cdef_tijk.h
teem/trunk/python/cffi/cdef/cdef_unrrdu.h
Modified: teem/trunk/python/cffi/cdef/cdef_air.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_air.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_air.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -18,9 +18,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
/* ---- BEGIN non-NrrdIO */
/* ---- END non-NrrdIO */
@@ -286,9 +285,10 @@
** the different kinds of floating point number afforded by IEEE 754,
** and the values returned by airFPClass_f().
**
-** The values probably won't agree with those in #include's like
+** The numeric enum values probably won't agree with those in #include's like
** ieee.h, ieeefp.h, fp_class.h. This is because IEEE 754 hasn't
-** defined standard values for these, so everyone does it differently.
+** defined standard values for these, so everyone does it differently
+** (or at least that was so around AD 2000 when this code was born)
**
** This enum uses underscores (against Teem convention) to help
** legibility while also conforming to the spirit of the somewhat
@@ -295,20 +295,19 @@
** standard naming conventions
*/
enum {
- airFP_Unknown, /* 0: nobody knows */
- airFP_SNAN, /* 1: signalling NaN */
- airFP_QNAN, /* 2: quiet NaN */
- airFP_POS_INF, /* 3: positive infinity */
- airFP_NEG_INF, /* 4: negative infinity */
- airFP_POS_NORM, /* 5: positive normalized non-zero */
- airFP_NEG_NORM, /* 6: negative normalized non-zero */
- airFP_POS_DENORM, /* 7: positive denormalized non-zero */
- airFP_NEG_DENORM, /* 8: negative denormalized non-zero */
- airFP_POS_ZERO, /* 9: +0.0, positive zero */
- airFP_NEG_ZERO, /* 10: -0.0, negative zero */
+ airFP_Unknown, /* 0: nobody knows */
+ airFP_NAN, /* 1: (quiet) NaN */
+ airFP_POS_INF, /* 2: positive infinity */
+ airFP_NEG_INF, /* 3: negative infinity */
+ airFP_POS_NORM, /* 4: positive normalized non-zero */
+ airFP_NEG_NORM, /* 5: negative normalized non-zero */
+ airFP_POS_DENORM, /* 6: positive denormalized non-zero */
+ airFP_NEG_DENORM, /* 7: negative denormalized non-zero */
+ airFP_POS_ZERO, /* 8: +0.0, positive zero */
+ airFP_NEG_ZERO, /* 9: -0.0, negative zero */
airFP_Last /* after the last valid one */
};
-#define AIR_FP_MAX 10
+#define AIR_FP_MAX 9
/* 754.c: IEEE-754 related stuff values */
typedef union {
unsigned int i;
@@ -319,7 +318,6 @@
double d;
} airDouble;
extern const airEnum *const airFPClass_ae;
-extern const unsigned int airMyQNaNHiBit;
extern float airFPPartsToVal_f(unsigned int sign,
unsigned int expo,
unsigned int mant);
@@ -340,8 +338,7 @@
extern int airFPClass_d(double val);
extern void airFPFprintf_f(FILE *file, float val);
extern void airFPFprintf_d(FILE *file, double val);
-extern const airFloat airFloatQNaN;
-extern const airFloat airFloatSNaN;
+extern const airFloat airFloatNaN;
extern const airFloat airFloatPosInf;
extern const airFloat airFloatNegInf;
extern float airNaN(void);
@@ -479,17 +476,14 @@
airInsane_NaNExists, /* 4: AIR_EXISTS(NaN) was true */
airInsane_ExistsBad, /* 5: AIR_EXISTS of some finite values was false */
airInsane_FltDblFPClass, /* 6: double -> float assignment messed up the
- airFPClass_f() of the value */
- airInsane_QNaNHiBit, /* 7: airMyQNaNHiBit is wrong */
- airInsane_AIR_NAN, /* 8: airFPClass_f(AIR_QNAN) wrong
- (no longer checking on problematic SNAN) */
- airInsane_dio, /* 9: airMyDio set to something invalid */
- airInsane_UCSize, /* 10: unsigned char isn't 8 bits */
- airInsane_FISize, /* 11: sizeof(float), sizeof(int) not 4 */
- airInsane_DLSize, /* 12: sizeof(double), sizeof(airLLong) not 8 */
+ airFPClass_f() of the value */
+ airInsane_AIR_NAN, /* 7: airFPClass_f(AIR_NAN) wrong */
+ airInsane_UCSize, /* 8: unsigned char isn't 8 bits */
+ airInsane_FISize, /* 9: sizeof(float), sizeof(int) not 4 */
+ airInsane_DLSize, /* 10: sizeof(double), sizeof(airLLong) not 8 */
airInsane_last
};
-#define AIR_INSANE_MAX 12
+#define AIR_INSANE_MAX 10
extern const char *airInsaneErr(int insane);
extern int airSanity(void);
/* miscAir.c */
@@ -568,38 +562,6 @@
extern unsigned int airCRC32(const unsigned char *data, size_t len, size_t unit,
int swap);
/* ---- END non-NrrdIO */
-/* dio.c */
-/*
-******** airNoDio enum
-**
-** reasons for why direct I/O won't be used with a particular
-** file/pointer combination
-*/
-enum {
- airNoDio_okay, /* 0: actually, you CAN do direct I/O */
- airNoDio_arch, /* 1: Teem thinks this architecture can't do it */
- airNoDio_format, /* 2: Teem thinks given data file format can't use it */
- airNoDio_std, /* 3: DIO isn't possible for std{in|out|err} */
- airNoDio_fd, /* 4: couldn't get underlying file descriptor */
- airNoDio_dioinfo, /* 5: calling fcntl() to get direct I/O info failed */
- airNoDio_small, /* 6: requested size is too small */
- airNoDio_size, /* 7: requested size not a multiple of d_miniosz */
- airNoDio_ptr, /* 8: pointer not multiple of d_mem */
- airNoDio_fpos, /* 9: current file position not multiple of d_miniosz */
- airNoDio_setfl, /* 10: fcntl(fd, SETFL, FDIRECT) failed */
- airNoDio_test, /* 11: couldn't memalign() even a small bit of memory */
- airNoDio_disable, /* 12: someone disabled it with airDisableDio */
- airNoDio_last
-};
-#define AIR_NODIO_MAX 12
-extern const char *airNoDioErr(int noDio);
-extern const int airMyDio;
-extern int airDisableDio;
-extern void airDioInfo(int *align, int *min, int *max, int fd);
-extern int airDioTest(int fd, const void *ptr, size_t size);
-extern void *airDioMalloc(size_t size, int fd);
-extern size_t airDioRead(int fd, void *ptr, size_t size);
-extern size_t airDioWrite(int fd, const void *ptr, size_t size);
/* mop.c: clean-up utilities */
enum {
airMopNever,
@@ -659,9 +621,9 @@
** as arguments in Teem macros normally are
*/
/*
-******** AIR_ENDIAN, AIR_QNANHIBIT, AIR_DIO
+******** AIR_ENDIAN
**
-** These reflect particulars of hardware which we're running on. The
+** This reflects particulars of hardware which we're running on. The
** difference from the things starting with TEEM_ is that the TEEM_
** values are for passing architecture-specific to compilation of source
** files, and thes AIR_ variables are for advertising that information
@@ -668,7 +630,7 @@
** to anyone linking against air (or Teem) and including air.h.
*/
/*
-******** AIR_NAN, AIR_QNAN, AIR_SNAN, AIR_POS_INF, AIR_NEG_INF
+******** AIR_NAN, AIR_POS_INF, AIR_NEG_INF
**
** its nice to have these values available without the cost of a
** function call.
Modified: teem/trunk/python/cffi/cdef/cdef_alan.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_alan.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_alan.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -17,9 +17,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
#define ALAN_THREAD_MAX 256
enum {
Modified: teem/trunk/python/cffi/cdef/cdef_bane.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_bane.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_bane.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -17,9 +17,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
/*
******** #define BANE_PARM_NUM
Modified: teem/trunk/python/cffi/cdef/cdef_biff.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_biff.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_biff.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -17,9 +17,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
/* ---- BEGIN non-NrrdIO */
/* ---- END non-NrrdIO */
Modified: teem/trunk/python/cffi/cdef/cdef_coil.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_coil.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_coil.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -17,9 +17,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
/* NOTE: there are various types that should be unsigned instead of
** signed; it may be a priority to fix this at a later date
Modified: teem/trunk/python/cffi/cdef/cdef_dye.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_dye.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_dye.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -17,9 +17,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
enum {
dyeSpaceUnknown, /* 0: nobody knows */
Modified: teem/trunk/python/cffi/cdef/cdef_echo.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_echo.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_echo.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -17,9 +17,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
/* NOTE: this library has not undergone the changes as other Teem
libraries in order to make sure that array lengths and indices
Modified: teem/trunk/python/cffi/cdef/cdef_elf.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_elf.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_elf.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -15,9 +15,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
/* glyphElf.c */
extern const int elfPresent;
Modified: teem/trunk/python/cffi/cdef/cdef_ell.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_ell.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_ell.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -17,9 +17,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
/*
******** ell_quadratic_root* enum
Modified: teem/trunk/python/cffi/cdef/cdef_gage.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_gage.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_gage.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -17,9 +17,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
/*
** GAGE_DERIV_MAX is the maximum derivative that gage knows how to
Modified: teem/trunk/python/cffi/cdef/cdef_hest.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_hest.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_hest.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -17,9 +17,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
/*
******** hestSource* enum
Modified: teem/trunk/python/cffi/cdef/cdef_hoover.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_hoover.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_hoover.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -17,9 +17,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
#define HOOVER_THREAD_MAX 512
/*
Modified: teem/trunk/python/cffi/cdef/cdef_limn.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_limn.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_limn.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -17,9 +17,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
#define LIMN_LIGHT_NUM 8
/*
Modified: teem/trunk/python/cffi/cdef/cdef_meet.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_meet.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_meet.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -6,7 +6,7 @@
/* =========== meet.h =========== */
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2023 University of Chicago
+ Copyright (C) 2009--2025 University of Chicago
Copyright (C) 2005--2008 Gordon Kindlmann
Copyright (C) 1998--2004 University of Utah
This library is free software; you can redistribute it and/or modify it under the terms
@@ -17,9 +17,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
/* TEEM_LIB_LIST */
/* enumall.c: (not really a descriptive filename) */
Modified: teem/trunk/python/cffi/cdef/cdef_mite.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_mite.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_mite.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -17,9 +17,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
/*
******** mite_t
Modified: teem/trunk/python/cffi/cdef/cdef_moss.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_moss.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_moss.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -17,9 +17,8 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
/* NOTE: this library has not undergone the changes as other Teem
libraries in order to make sure that array lengths and indices
Modified: teem/trunk/python/cffi/cdef/cdef_nrrd.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_nrrd.h 2025-08-16 13:36:57 UTC (rev 7290)
+++ teem/trunk/python/cffi/cdef/cdef_nrrd.h 2025-08-16 14:04:46 UTC (rev 7291)
@@ -3,10 +3,10 @@
teem/nrrd.h, generated by build_teem.py to declare the nrrd API to
CFFI, within its many limitations, specifically lacking a C pre-processor
(so no #include directives, and only certain #defines). */
- /* =========== nrrdEnums.h =========== */
+ /* =========== nrrd.h =========== */
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2023 University of Chicago
+ Copyright (C) 2009--2025 University of Chicago
Copyright (C) 2005--2008 Gordon Kindlmann
Copyright (C) 1998--2004 University of Utah
This library is free software; you can redistribute it and/or modify it under the terms
@@ -17,790 +17,12 @@
This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-/*******
-******** NONE of these enums should have values set explicitly in their
-******** definition. The values should simply start at 0 (for Unknown)
-******** and increase one integer per value. The _nrrdCheckEnums()
-******** sanity check assumes this, and there is no reason to use
-******** explicit values for any of the enums.
-*******/
-/*
-******** nrrdIoState* enum
-**
-** the various things it makes sense to get and set in nrrdIoState struct
-** via nrrdIoStateGet and nrrdIoStateSet
-** BUT HEY are those functions actually used (as opposed to directly reading
-** or setting fields in the nio)? GLK honestly forgot about those functions
-** until working on adding nio->moreThanFloatInText
-*/
-enum {
- nrrdIoStateUnknown,
- nrrdIoStateDetachedHeader,
- nrrdIoStateBareText,
- nrrdIoStateMoreThanFloatInText,
- nrrdIoStateCharsPerLine,
- nrrdIoStateValsPerLine,
- nrrdIoStateSkipData,
- nrrdIoStateKeepNrrdDataFileOpen,
- nrrdIoStateZlibLevel,
- nrrdIoStateZlibStrategy,
- nrrdIoStateBzip2BlockSize,
- nrrdIoStateLast
-};
-/*
-******** nrrdFormatType* enum
-**
-** the different file formats which nrrd supports
-*/
-enum {
- nrrdFormatTypeUnknown,
- nrrdFormatTypeNRRD, /* 1: basic nrrd format (associated with any of
- the magics starting with "NRRD") */
- nrrdFormatTypePNM, /* 2: PNM image */
- nrrdFormatTypePNG, /* 3: PNG image */
- nrrdFormatTypeVTK, /* 4: VTK Structured Points datasets (v1.0 and 2.0) */
- nrrdFormatTypeText, /* 5: ASCII text for 2D arrays, which may or may
- not be bare (i.e. just numbers, no header
- lines that start with "#") according
- to NrrdIoState->bareText */
- nrrdFormatTypeEPS, /* 6: Encapsulated PostScript (write-only) */
- nrrdFormatTypeLast
-};
-#define NRRD_FORMAT_TYPE_MAX 6
-/*
-******** nrrdBoundary* enum
-**
-** when resampling, how to deal with the ends of a scanline
-*/
-enum {
- nrrdBoundaryUnknown,
- nrrdBoundaryPad, /* 1: fill with some user-specified value */
- nrrdBoundaryBleed, /* 2: copy the last/first value out as needed */
- nrrdBoundaryWrap, /* 3: wrap-around */
- nrrdBoundaryWeight, /* 4: normalize the weighting on the existing samples;
- ONLY sensible for a strictly positive kernel
- which integrates to unity (as in blurring) */
- nrrdBoundaryMirror, /* 5: mirror folding */
- nrrdBoundaryLast
-};
-#define NRRD_BOUNDARY_MAX 5
-/*
-******** nrrdType* enum
-**
-** all the different types, identified by integer
-**
-** 18 July 03: After some consternation, GLK decided to set
-** nrrdTypeUnknown and nrrdTypeDefault to the same thing, with the
-** reasoning that the only times that nrrdTypeDefault is used is when
-** controlling an *output* type (the type of "nout"), or rather,
-** choosing not to control an output type. As output types must be
-** known, there is no confusion between being unset/unknown (invalid)
-** and being simply default.
-*/
-enum {
- nrrdTypeUnknown = 0, /* 0: signifies "type is unset/unknown" */
- nrrdTypeDefault = 0, /* 0: signifies "determine output type for me" */
- nrrdTypeChar, /* 1: signed 1-byte integer */
- nrrdTypeUChar, /* 2: unsigned 1-byte integer */
- nrrdTypeShort, /* 3: signed 2-byte integer */
- nrrdTypeUShort, /* 4: unsigned 2-byte integer */
- nrrdTypeInt, /* 5: signed 4-byte integer */
- nrrdTypeUInt, /* 6: unsigned 4-byte integer */
- nrrdTypeLLong, /* 7: signed 8-byte integer */
- nrrdTypeULLong, /* 8: unsigned 8-byte integer */
- nrrdTypeFloat, /* 9: 4-byte floating point */
- nrrdTypeDouble, /* 10: 8-byte floating point */
- nrrdTypeBlock, /* 11: size user defined at run time; MUST BE LAST */
- nrrdTypeLast
-};
-#define NRRD_TYPE_MAX 11
-/*
-******** nrrdEncodingType enum
-**
-** how data might be encoded into a bytestream
-*/
-enum {
- nrrdEncodingTypeUnknown,
- nrrdEncodingTypeRaw, /* 1: same as memory layout (modulo endianness) */
- nrrdEncodingTypeAscii, /* 2: decimal values are spelled out in ascii */
- nrrdEncodingTypeHex, /* 3: hexidecimal (two chars per byte) */
- nrrdEncodingTypeGzip, /* 4: gzip'ed raw data */
- nrrdEncodingTypeBzip2, /* 5: bzip2'ed raw data */
- nrrdEncodingTypeZRL, /* 6: zero run-length compresion */
- nrrdEncodingTypeLast
-};
-#define NRRD_ENCODING_TYPE_MAX 6
-/*
-******** nrrdZlibStrategy enum
-**
-** how gzipped data is compressed
-*/
-enum {
- nrrdZlibStrategyUnknown,
- nrrdZlibStrategyDefault, /* 1: default (Huffman + string match) */
- nrrdZlibStrategyHuffman, /* 2: Huffman only */
- nrrdZlibStrategyFiltered, /* 3: specialized for filtered data */
- nrrdZlibStrategyLast
-};
-#define NRRD_ZLIB_STRATEGY_MAX 3
-/*
-******** nrrdCenter enum
-**
-** node-centered vs. cell-centered
-*/
-enum {
- nrrdCenterUnknown, /* 0: no centering known for this axis */
- nrrdCenterNode, /* 1: samples at corners of things
- (how "voxels" are usually imagined)
- |\______/|\______/|\______/|
- X X X X */
- nrrdCenterCell, /* 2: samples at middles of things
- (characteristic of histogram bins)
- \___|___/\___|___/\___|___/
- X X X */
- nrrdCenterLast
-};
-#define NRRD_CENTER_MAX 2
-/*
-******** nrrdKind enum
-**
-** For describing the information along one axis of an array. This is
-** most important for clarifying the representation of non-scalar
-** data, in order to distinguish between axes that are genuine image
-** domain axes, and axes that exist just to store the multiple
-** attributes per sample. One could argue that this information
-** should be per-array and not per-axis, but you still have to
-** indicate which one of the axes is the attribute axis. And, if you
-** have, say, the gradient of RGB colors, you want the per-pixel 3x3
-** array to have those two attribute axes tagged accordingly.
-**
-** More of these may be added in the future, such as when nrrd
-** supports bricking. Since nrrd is never going to be in the business
-** of manipulating the kind information or supporting kind-specific
-** semantics, there can be proliferation of nrrdKinds, provided
-** pointless redundancy is avoided.
-**
-** There is a relationship between some of these (nrrdKindSpace is a
-** specific nrrdKindDomain), but currently there is no effort to
-** record this meta-kind information.
-**
-** Keep in sync:
-** enumsNrrd.c: nrrdKind airEnum
-** axis.c: nrrdKindSize()
-** axis.c: _nrrdKindAltered()
-**
-** NOTE: The nrrdKindSize() function returns the valid size for these.
-**
-*/
-enum {
- nrrdKindUnknown,
- nrrdKindDomain, /* 1: any image domain */
- nrrdKindSpace, /* 2: a spatial domain */
- nrrdKindTime, /* 3: a temporal domain */
- /* -------------------------- end domain kinds */
- /* -------------------------- begin range kinds */
- nrrdKindList, /* 4: any list of values, non-resample-able */
- nrrdKindPoint, /* 5: coords of a point */
- nrrdKindVector, /* 6: coeffs of (contravariant) vector */
- nrrdKindCovariantVector, /* 7: coeffs of covariant vector (eg gradient) */
- nrrdKindNormal, /* 8: coeffs of unit-length covariant vector */
- /* -------------------------- end arbitrary size kinds */
- /* -------------------------- begin size-specific kinds */
- nrrdKindStub, /* 9: axis with one sample (a placeholder) */
- nrrdKindScalar, /* 10: effectively, same as a stub */
- nrrdKindComplex, /* 11: real and imaginary components */
- nrrdKind2Vector, /* 12: 2 component vector */
- nrrdKind3Color, /* 13: ANY 3-component color value */
- nrrdKindRGBColor, /* 14: RGB, no colorimetry */
- nrrdKindHSVColor, /* 15: HSV, no colorimetry */
- nrrdKindXYZColor, /* 16: perceptual primary colors */
- nrrdKind4Color, /* 17: ANY 4-component color value */
- nrrdKindRGBAColor, /* 18: RGBA, no colorimetry */
- nrrdKind3Vector, /* 19: 3-component vector */
- nrrdKind3Gradient, /* 20: 3-component covariant vector */
- nrrdKind3Normal, /* 21: 3-component covector, assumed normalized */
- nrrdKind4Vector, /* 22: 4-component vector */
- nrrdKindQuaternion, /* 23: (w,x,y,z), not necessarily normalized */
- nrrdKind2DSymMatrix, /* 24: Mxx Mxy Myy */
- nrrdKind2DMaskedSymMatrix, /* 25: mask Mxx Mxy Myy */
- nrrdKind2DMatrix, /* 26: Mxx Mxy Myx Myy */
- nrrdKind2DMaskedMatrix, /* 27: mask Mxx Mxy Myx Myy */
- nrrdKind3DSymMatrix, /* 28: Mxx Mxy Mxz Myy Myz Mzz */
- nrrdKind3DMaskedSymMatrix, /* 29: mask Mxx Mxy Mxz Myy Myz Mzz */
- nrrdKind3DMatrix, /* 30: Mxx Mxy Mxz Myx Myy Myz Mzx Mzy Mzz */
- nrrdKind3DMaskedMatrix, /* 31: mask Mxx Mxy Mxz Myx Myy Myz Mzx Mzy Mzz */
- nrrdKindLast
-};
-#define NRRD_KIND_MAX 31
-/*
-******** nrrdAxisInfo enum
-**
-** the different pieces of per-axis information recorded in a nrrd
-*/
-/* clang-format off */
-enum {
- nrrdAxisInfoUnknown,
- nrrdAxisInfoSize, /* 1: number of samples along axis */
- nrrdAxisInfoSpacing, /* 2: spacing between samples */
- nrrdAxisInfoThickness, /* 3: thickness of sample region */
- nrrdAxisInfoMin, /* 4: min pos. assoc. w/ 1st sample */
- nrrdAxisInfoMax, /* 5: max pos. assoc. w/ last sample */
- nrrdAxisInfoSpaceDirection, /* 6: inter-sample vector in "space" */
- nrrdAxisInfoCenter, /* 7: cell vs. node */
- nrrdAxisInfoKind, /* 8: from the nrrdKind* enum */
- nrrdAxisInfoLabel, /* 9: string describing the axis */
- nrrdAxisInfoUnits, /* 10: from the nrrdUnit* enum */
- nrrdAxisInfoLast
-};
-#define NRRD_AXIS_INFO_MAX 10
-#define NRRD_AXIS_INFO_NONE 0
-/*
-******** nrrdBasicInfo enum
-**
-** the non-per-axis (or per-array) pieces of information that could
-** meaningfully be copied between nrrds (hence the void *data is not
-** included).
-**
-** "Basic" is named after the "basic field specifications" described
-** in the NRRD file format definition
-*/
-enum {
- nrrdBasicInfoUnknown,
- nrrdBasicInfoData, /* 1 */
- nrrdBasicInfoType, /* 2 */
- nrrdBasicInfoBlocksize, /* 3 */
- nrrdBasicInfoDimension, /* 4 */
- nrrdBasicInfoContent, /* 5 */
- nrrdBasicInfoSampleUnits, /* 6 */
- nrrdBasicInfoSpace, /* 7 */
- nrrdBasicInfoSpaceDimension, /* 8 */
- nrrdBasicInfoSpaceUnits, /* 9 */
- nrrdBasicInfoSpaceOrigin, /* 10 */
- nrrdBasicInfoMeasurementFrame, /* 11 */
- nrrdBasicInfoOldMin, /* 12 */
- nrrdBasicInfoOldMax, /* 13 */
- nrrdBasicInfoComments, /* 14 */
- nrrdBasicInfoKeyValuePairs, /* 15 */
- nrrdBasicInfoLast
-};
-#define NRRD_BASIC_INFO_MAX 15
-#define NRRD_BASIC_INFO_NONE 0
-/* clang-format on */
-/*
-******** nrrdField enum
-**
-** the various fields we can parse in a NRRD header
-**
-** other things which must be kept in sync:
-** arraysNrrd.c:
-** _nrrdFieldValidInImage[]
-** _nrrdFieldOnePerAxis[]
-** _nrrdFieldValidInText[]
-** _nrrdFieldRequired[]
-** parseNrrd.c:
-** _nrrdReadNrrdParseInfo[]
-** enumsNrrd.c:
-** nrrdField definition
-** simple.c:
-** _nrrdFieldCheck[]
-** write.c:
-** _nrrdFieldInteresting()
-** _nrrdSprintFieldInfo()
-** to some extent, in this file:
-** nrrdAxisInfo and nrrdBasicInfo enums
-** axis.c (for per-axis info):
-** _nrrdAxisInfoCopy()
-** methodsNrrd.c:
-** lots of functions, but you knew that . . .
-*/
-enum {
- nrrdField_unknown,
- nrrdField_comment, /* 1 */
- nrrdField_content, /* 2 */
- nrrdField_number, /* 3 */
- nrrdField_type, /* 4 */
- nrrdField_block_size, /* 5 */
- nrrdField_dimension, /* 6 */
- nrrdField_space, /* 7 */
- nrrdField_space_dimension, /* 8 */
- nrrdField_sizes, /* 9 ----- begin per-axis ----- */
- nrrdField_spacings, /* 10 */
- nrrdField_thicknesses, /* 11 */
- nrrdField_axis_mins, /* 12 */
- nrrdField_axis_maxs, /* 13 */
- nrrdField_space_directions, /* 14 */
- nrrdField_centers, /* 15 */
- nrrdField_kinds, /* 16 */
- nrrdField_labels, /* 17 */
- nrrdField_units, /* 18 ------ end per-axis ------ */
- nrrdField_min, /* 19 */
- nrrdField_max, /* 20 */
- nrrdField_old_min, /* 21 */
- nrrdField_old_max, /* 22 */
- nrrdField_endian, /* 23 */
- nrrdField_encoding, /* 24 */
- nrrdField_line_skip, /* 25 */
- nrrdField_byte_skip, /* 26 */
- nrrdField_keyvalue, /* 27 */
- nrrdField_sample_units, /* 28 */
- nrrdField_space_units, /* 29 */
- nrrdField_space_origin, /* 30 */
- nrrdField_measurement_frame, /* 31 */
- nrrdField_data_file, /* 32 */
- nrrdField_last
-};
-#define NRRD_FIELD_MAX 32
-/*
-******** nrrdHasNonExist* enum
-**
-** oh look, I'm violating my rules outline above for how the enum values
-** should be ordered. The reason for this is that its just too bizarro to
-** have the logical value of both nrrdHasNonExistFalse and nrrdHasNonExistTrue
-** to be (in C) true. For instance, nrrdHasNonExist() should be able to
-** return a value from this enum which also functions in a C expressions as
-** the expected boolean value. If for some reason (outide the action of
-** nrrdHasNonExist(), nrrdHasNonExistUnknown is interpreted as true, that's
-** probably harmlessly conservative. Time will tell.
-*/
-enum {
- nrrdHasNonExistFalse, /* 0: no non-existent values were seen */
- nrrdHasNonExistTrue, /* 1: some non-existent values were seen */
- nrrdHasNonExistOnly, /* 2: NOTHING BUT non-existent values were seen */
- nrrdHasNonExistUnknown, /* 3 */
- nrrdHasNonExistLast
-};
-#define NRRD_HAS_NON_EXIST_MAX 3
-/*
-******** nrrdSpace* enum
-**
-** Identifies the space in which which the origin and direction
-** vectors have their coordinates measured. When a direction is named
-** here (like "Left" or "Anterior"), that implies a basis vector that
-** points in that direction, along which that coordinate becomes *larger*
-** (this is the opposite of MetaIO, for example).
-**
-** All of these spaces have a well-defined expected dimension, as
-** determined by nrrdSpaceDimension(), and setting a nrrd to be in
-** such a space, by nrrdSpaceSet(), will automatically set nrrd->spaceDim.
-**
-** The first six spaces here are PATIENT-ORIENTED spaces, which are
-** properly speaking aligned with the patient, and not the scanner
-** itself. But nrrdSpaceScannerXYZ and nrrdSpaceScannerXYZTime are
-** DEVICE-ORIENTED spaces, irrespective of the patient, used in a
-** previous version of the DICOM standard. When the two spaces are
-** lined up with normal patient orientation in the scanner,
-** nrrdSpaceScannerXYZ is the same as nrrdSpaceLeftPosteriorSuperior.
-** To quote Part 3 (Information Object Definitions) of the DICOM spec
-** (page 275): "If a patient lies parallel to the ground, face-up on
-** the table, with his feet-to-head direction same as the
-** front-to-back direction of the imaging equipment, the direction of
-** the axes of this patient based coordinate system and the equipment
-** based coordinate system in previous versions of this Standard will
-** coincide."
-**
-** Keep in sync:
-** enumsNrrd.c: nrrdSpace airEnum
-** simple.c: int nrrdSpaceDimension(int space)
-*/
-enum {
- nrrdSpaceUnknown,
- nrrdSpaceRightUp, /* 1: 2-D, oriented like upper right
- Cartesian quadrant, number I */
- nrrdSpaceRightDown, /* 2: 2-D, oriented like raster
- coordinates */
- nrrdSpaceRightAnteriorSuperior, /* 3: NIFTI-1 (right-handed) */
- nrrdSpaceLeftAnteriorSuperior, /* 4: standard Analyze (left-handed) */
- nrrdSpaceLeftPosteriorSuperior, /* 5: DICOM 3.0 (right-handed) */
- nrrdSpaceRightAnteriorSuperiorTime, /* 6: */
- nrrdSpaceLeftAnteriorSuperiorTime, /* 7: */
- nrrdSpaceLeftPosteriorSuperiorTime, /* 8: */
- nrrdSpaceScannerXYZ, /* 9: ACR/NEMA 2.0 (pre-DICOM 3.0) */
- nrrdSpaceScannerXYZTime, /* 10: */
- nrrdSpace3DRightHanded, /* 11: */
- nrrdSpace3DLeftHanded, /* 12: */
- nrrdSpace3DRightHandedTime, /* 13: */
- nrrdSpace3DLeftHandedTime, /* 14: */
- nrrdSpaceLast
-};
-#define NRRD_SPACE_MAX 14
-/*
-******** nrrdSpacingStatus* enum
-**
-** a way of describing how spacing information is known or not known for a
-** given axis, as determined by nrrdSpacingCalculate
-*/
-enum {
- nrrdSpacingStatusUnknown, /* 0: nobody knows,
- or invalid axis choice */
- nrrdSpacingStatusNone, /* 1: neither axis->spacing nor
- axis->spaceDirection is set */
- nrrdSpacingStatusScalarNoSpace, /* 2: axis->spacing set,
- w/out space info */
- nrrdSpacingStatusScalarWithSpace, /* 3: axis->spacing set, but there *is*
- space info, which means the spacing
- does *not* live in the surrounding
- space */
- nrrdSpacingStatusDirection, /* 4: axis->spaceDirection set, and
- measured according to surrounding
- space */
- nrrdSpacingStatusLast
-};
-#define NRRD_SPACING_STATUS_MAX 4
-/*
-******** nrrdOriginStatus* enum
-**
-** how origin information was or was not computed by nrrdOriginCalculate
-*/
-enum {
- nrrdOriginStatusUnknown, /* 0: nobody knows, or invalid parms */
- nrrdOriginStatusDirection, /* 1: chosen axes have spaceDirections */
- nrrdOriginStatusNoMin, /* 2: axis->min doesn't exist */
- nrrdOriginStatusNoMaxOrSpacing, /* 3: axis->max or ->spacing doesn't exist */
- nrrdOriginStatusOkay, /* 4: all is well */
- nrrdOriginStatusLast
-};
/* ---- BEGIN non-NrrdIO */
-/*
-******** nrrdFormatPNGsRGBIntent* enum
-**
-** indicates values of PNG_sRGB_INTENT_, for the sRGB chunk of PNG,
-** or indicates not knowing it. This is unusual because the unknown
-** value is -1, not 0, and the #define is for NUM, not MAX. The 0,1,2,3
-** values of the intents copy how they're represented in ICC profiles,
-** which apparently png.h copies in turn; see
-** http://www.libpng.org/pub/png/book/chapter10.html
-*/
-enum {
- nrrdFormatPNGsRGBIntentUnknown = -1, /* -1: nobody knows */
- nrrdFormatPNGsRGBIntentPerceptual, /* 0: PNG_sRGB_INTENT_PERCEPTUAL */
- nrrdFormatPNGsRGBIntentRelative, /* 1: PNG_sRGB_INTENT_RELATIVE */
- nrrdFormatPNGsRGBIntentSaturation, /* 2: PNG_sRGB_INTENT_SATURATION */
- nrrdFormatPNGsRGBIntentAbsolute, /* 3: PNG_sRGB_INTENT_ABSOLUTE */
- nrrdFormatPNGsRGBIntentNone, /* 4: do not indicate intent */
- nrrdFormatPNGsRGBIntentLast
-};
-#define NRRD_FORMAT_PNG_SRGB_INTENT_NUM 5
-/*
-******** nrrdOrientationHave* enum
-**
-** ways of describing how much information about the orientation
-** we have
-*/
-enum {
- nrrdOrientationHaveUnknown, /* 0 */
- nrrdOrientationHaveNothing, /* 1 */
- nrrdOrientationHaveSpacing, /* 2 */
- nrrdOrientationHaveMinSpacing, /* 3 */
- nrrdOrientationHaveMinMax, /* 4 */
- nrrdOrientationHaveDirections, /* 5 */
- nrrdOrientationHaveOriginDirections, /* 6 */
- nrrdOrientationHaveLast
-};
-#define NRRD_ORIENTATION_HAVE_MAX 6
-/*
-******** nrrdMeasure enum
-**
-** ways to "measure" some portion of the array
-** NEEDS TO BE IN SYNC WITH:
-** - nrrdMeasure airEnum in enumsNrrd.c
-** - nrrdMeasureLine function array in measure.c
-*/
-enum {
- nrrdMeasureUnknown,
- nrrdMeasureMin, /* 1: smallest value */
- nrrdMeasureMax, /* 2: biggest value */
- nrrdMeasureMean, /* 3: average of values */
- nrrdMeasureMedian, /* 4: value at 50th percentile */
- nrrdMeasureMode, /* 5: most common value */
- nrrdMeasureProduct, /* 6: product of all values */
- nrrdMeasureSum, /* 7: sum of all values */
- nrrdMeasureL1, /* 8 */
- nrrdMeasureL2, /* 9 */
- nrrdMeasureL4, /* 10 */
- nrrdMeasureNormalizedL2, /* 11 */
- nrrdMeasureRootMeanSquare, /* 12 */
- nrrdMeasureLinf, /* 13 */
- nrrdMeasureVariance, /* 14 */
- nrrdMeasureSD, /* 15: standard deviation */
- nrrdMeasureCoV, /* 16: coefficient of variation */
- nrrdMeasureSkew, /* 17: skew */
- nrrdMeasureLineSlope, /* 18: slope of line of best fit */
- nrrdMeasureLineIntercept, /* 19: y-intercept of line of best fit */
- nrrdMeasureLineError, /* 20: error of line fitting */
- /*
- ** the nrrduMeasureHisto* measures interpret the array as a
- ** histogram of some implied value distribution
- */
- nrrdMeasureHistoMin, /* 21 */
- nrrdMeasureHistoMax, /* 22 */
- nrrdMeasureHistoMean, /* 23 */
- nrrdMeasureHistoMedian, /* 24 */
- nrrdMeasureHistoMode, /* 25 */
- nrrdMeasureHistoProduct, /* 26 */
- nrrdMeasureHistoSum, /* 27 */
- nrrdMeasureHistoL2, /* 28 */
- nrrdMeasureHistoVariance, /* 29 */
- nrrdMeasureHistoSD, /* 30 */
- nrrdMeasureLast
-};
-#define NRRD_MEASURE_MAX 30
-/*
-******** nrrdBlind8BitRange
-**
-** whether or not to blindly say that the range of 8-bit data is
-** [0,255] (uchar) or [SCHAR_MIN,SCHAR_MAX] (signed char)
-*/
-enum {
- nrrdBlind8BitRangeUnknown, /* 0 */
- nrrdBlind8BitRangeTrue, /* 1: blindly use the widest extrema (e.g.,
- [0-255] for uchar, regardless of what's
- really present in the data values */
- nrrdBlind8BitRangeFalse, /* 2: use the exact value range in the data */
- nrrdBlind8BitRangeState, /* 3: defer to nrrdStateBlind8BitMinMax */
- nrrdBlind8BitRangeLast
-};
-#define NRRD_BLIND_8BIT_RANGE_MAX 3
-/*
-******** nrrdUnaryOp enum
-**
-** for unary operations on nrrds
-*/
-enum {
- nrrdUnaryOpUnknown,
- nrrdUnaryOpNegative, /* 1 */
- nrrdUnaryOpReciprocal, /* 2 */
- nrrdUnaryOpSin, /* 3 */
- nrrdUnaryOpCos, /* 4 */
- nrrdUnaryOpTan, /* 5 */
- nrrdUnaryOpAsin, /* 6 */
- nrrdUnaryOpAcos, /* 7 */
- nrrdUnaryOpAtan, /* 8 */
- nrrdUnaryOpExp, /* 9 */
- nrrdUnaryOpLog, /* 10 */
- nrrdUnaryOpLog2, /* 11 */
- nrrdUnaryOpLog10, /* 12 */
- nrrdUnaryOpLog1p, /* 13 */
- nrrdUnaryOpExpm1, /* 14 */
- nrrdUnaryOpSqrt, /* 15 */
- nrrdUnaryOpCbrt, /* 16 */
- nrrdUnaryOpErf, /* 17 */
- nrrdUnaryOpNerf, /* 18 */
- nrrdUnaryOpCeil, /* 19 */
- nrrdUnaryOpFloor, /* 20 */
- nrrdUnaryOpRoundUp, /* 21 */
- nrrdUnaryOpRoundDown, /* 22 */
- nrrdUnaryOpAbs, /* 23 */
- nrrdUnaryOpSgn, /* 24 */
- nrrdUnaryOpExists, /* 25 */
- nrrdUnaryOpRand, /* 26 */
- nrrdUnaryOpNormalRand, /* 27 */
- nrrdUnaryOpIf, /* 28 */
- nrrdUnaryOpZero, /* 29 */
- nrrdUnaryOpOne, /* 30 */
- nrrdUnaryOpTauOfSigma, /* 31 */
- nrrdUnaryOpSigmaOfTau, /* 32 */
- nrrdUnaryOpLast
-};
-#define NRRD_UNARY_OP_MAX 32
-/*
-******** nrrdBinaryOp enum
-**
-** for binary operations on nrrds
-*/
-enum {
- nrrdBinaryOpUnknown,
- nrrdBinaryOpAdd, /* 1 */
- nrrdBinaryOpSubtract, /* 2 */
- nrrdBinaryOpMultiply, /* 3 */
- nrrdBinaryOpDivide, /* 4 */
- nrrdBinaryOpPow, /* 5 */
- nrrdBinaryOpSgnPow, /* 6 */
- nrrdBinaryOpFlippedSgnPow, /* 7 */
- nrrdBinaryOpMod, /* 8 */
- nrrdBinaryOpFmod, /* 9 */
- nrrdBinaryOpAtan2, /* 10 */
- nrrdBinaryOpMin, /* 11 */
- nrrdBinaryOpMax, /* 12 */
- nrrdBinaryOpLT, /* 13 */
- nrrdBinaryOpLTE, /* 14 */
- nrrdBinaryOpGT, /* 15 */
- nrrdBinaryOpGTE, /* 16 */
- nrrdBinaryOpCompare, /* 17 */
- nrrdBinaryOpEqual, /* 18 */
- nrrdBinaryOpNotEqual, /* 19 */
- nrrdBinaryOpExists, /* 20 */
- nrrdBinaryOpIf, /* 21 */
- nrrdBinaryOpNormalRandScaleAdd, /* 22 */
- nrrdBinaryOpRicianRand, /* 23 */
- /* Adding these is a bit of a hack- whether or not to clamp to the
- representational range of an output integer type should really be an
- argument to the arithmetic functions, but this allows it be done
- without any API change */
- nrrdBinaryOpAddClamp, /* 24 */
- nrrdBinaryOpSubtractClamp, /* 25 */
- nrrdBinaryOpMultiplyClamp, /* 26 */
- nrrdBinaryOpULPDistance, /* 27 */
- nrrdBinaryOpLast
-};
-#define NRRD_BINARY_OP_MAX 27
-/*
-******** nrrdTernaryOp
-**
-** for ternary operations on nrrds
-*/
-enum {
- nrrdTernaryOpUnknown,
- nrrdTernaryOpAdd, /* 1 */
- nrrdTernaryOpMultiply, /* 2 */
- nrrdTernaryOpMin, /* 3 */
- nrrdTernaryOpMinSmooth, /* 4 */
- nrrdTernaryOpMax, /* 5 */
- nrrdTernaryOpMaxSmooth, /* 6 */
- nrrdTernaryOpLTSmooth, /* 7 */
- nrrdTernaryOpGTSmooth, /* 8 */
- nrrdTernaryOpClamp, /* 9 */
- nrrdTernaryOpIfElse, /* 10 */
- nrrdTernaryOpLerp, /* 11 */
- nrrdTernaryOpExists, /* 12 */
- nrrdTernaryOpInOpen, /* 13 */
- nrrdTernaryOpInClosed, /* 14 */
- nrrdTernaryOpGaussian, /* 15 */
- nrrdTernaryOpRician, /* 16 */
- nrrdTernaryOpLast
-};
-#define NRRD_TERNARY_OP_MAX 16
-/*
-******** nrrdFFTWPlanRigor
-**
-** Different levels of rigor in FFTW planning
-*/
-enum {
- nrrdFFTWPlanRigorUnknown,
- nrrdFFTWPlanRigorEstimate, /* 1 */
- nrrdFFTWPlanRigorMeasure, /* 2 */
- nrrdFFTWPlanRigorPatient, /* 3 */
- nrrdFFTWPlanRigorExhaustive, /* 4 */
- nrrdFFTWPlanRigorLast
-};
-#define NRRD_FFTW_PLAN_RIGOR_MAX 4
-/*
-******** nrrdResampleNonExistent
-**
-** different ways that nrrdResample should handle non-existent values
-*/
-enum {
- nrrdResampleNonExistentUnknown,
- nrrdResampleNonExistentNoop, /* 1 */
- nrrdResampleNonExistentRenormalize, /* 2 */
- nrrdResampleNonExistentWeight, /* 3 */
- nrrdResampleNonExistentLast
-};
-#define NRRD_RESAMPLE_NON_EXISTENT_MAX 3
-/*
-******** nrrdMetaDataCanonicalVersion
-**
-** different strategies for putting meta-data into a canonical form
-*/
-enum {
- nrrdMetaDataCanonicalVersionUnknown,
- nrrdMetaDataCanonicalVersionAlpha, /* 1 */
- nrrdMetaDataCanonicalVersionLast
-};
-#define NRRD_META_DATA_CANONICAL_VERSION_MAX 1
/* ---- END non-NrrdIO */
-
-
-/* =========== nrrdDefines.h =========== */
/*
- Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2023 University of Chicago
- Copyright (C) 2005--2008 Gordon Kindlmann
- Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or modify it under the terms
- of the GNU Lesser General Public License (LGPL) as published by the Free Software
- Foundation; either version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also include exceptions to
- the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
-*/
-/* feel free to set these to higher values and recompile */
-#define NRRD_DIM_MAX 16
-/* Max array dimension (nrrd->dim) */
-#define NRRD_SPACE_DIM_MAX 8
-/* Max dimension of "space" around array
- (nrrd->spaceDim) */
-/* HEY: should this be renamed -> MAXNUM ? Would be more consistent
- with other Teem pound-define names */
-#define NRRD_KERNEL_PARMS_NUM 8
-/* max # arguments to a kernel- this is weird: it
- isn't the max of any of the NrrdKernels defined
- by the nrrd library (that is more like 3), but
- is the max number of parms of any NrrdKernel
- used by anyone using Teem, such as in gage.
- Enforcing one global max simplifies
- implementation. */
-/*
-** For the 64-bit integer types (not standard except in C99), we used
-** to try to use the names for the _MIN and _MAX values which are used
-** in C99 (as well as gcc) such as LLONG_MAX, or those used on SGI
-** such as LONGLONG_MAX. However, since the tests (in nrrdSanity)
-** were re-written to detect overflow based on manipulation of
-** specific values, we might as well also define the _MIN and _MAX in
-** terms of explicit values (which agree with those defined by C99).
-*/
-/*
-** Chances are, you shouldn't mess with these
-*/
-/* ---- BEGIN non-NrrdIO */
-/* suffix string that indicates percentile-based min/max */
-/* ---- END non-NrrdIO */
-#define NRRD_FILENAME_INCR 32
-#define NRRD_COMMENT_INCR 16
-#define NRRD_KEYVALUE_INCR 32
-/* this is designed to be robust against the
- mungling that xv does, but no promises for
- any other image programs */
-/* this is the key used for getting nrrd
- fields into/out of png comments */
-/* this is the key used for getting nrrd
- comments into/out of png comments */
-/* how to represent something unknown in a
- field of the nrrd header, when it being
- unknown is not an error */
-/* like NRRD_UNKNOWN, but with an air of
- certainty */
-
-
-/* =========== nrrd.h =========== */
-/*
- Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2023 University of Chicago
- Copyright (C) 2005--2008 Gordon Kindlmann
- Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or modify it under the terms
- of the GNU Lesser General Public License (LGPL) as published by the Free Software
- Foundation; either version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also include exceptions to
- the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with
- this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA 02110-1301 USA
-*/
-/* ---- BEGIN non-NrrdIO */
-/* ---- END non-NrrdIO */
-/*
******** NrrdAxisInfo struct
**
** all the information which can sensibly be associated with
@@ -963,8 +185,7 @@
int isImage, /* this format is intended solely for "2D" images, which
controls the invocation of nrrdAxesInsert()
if nrrdStateGrayscaleImage3D */
- readable, /* we can read as well as write this format */
- usesDIO; /* this format can use Direct IO */
+ readable; /* we can read as well as write this format */
/* tests if this format is currently available in this build */
int (*available)(void);
/* (for writing) returns non-zero if a given filename could likely be
@@ -2230,3 +1451,778 @@
extern int nrrdKernelParm0IsScale(const NrrdKernel *kern);
extern const NrrdKernel *nrrdKernelDerivative(const NrrdKernel *kern);
/* ---- END non-NrrdIO */
+
+
+/* =========== nrrdEnums.h =========== */
+/*
+ Teem: Tools to process and visualize scientific data and images
+ Copyright (C) 2009--2023 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
+*/
+/*******
+******** NONE of these enums should have values set explicitly in their
+******** definition. The values should simply start at 0 (for Unknown)
+******** and increase one integer per value. The _nrrdCheckEnums()
+******** sanity check assumes this, and there is no reason to use
+******** explicit values for any of the enums.
+*******/
+/*
+******** nrrdIoState* enum
+**
+** the various things it makes sense to get and set in nrrdIoState struct
+** via nrrdIoStateGet and nrrdIoStateSet
+** BUT HEY are those functions actually used (as opposed to directly reading
+** or setting fields in the nio)? GLK honestly forgot about those functions
+** until working on adding nio->moreThanFloatInText
+*/
+enum {
+ nrrdIoStateUnknown,
+ nrrdIoStateDetachedHeader,
+ nrrdIoStateBareText,
+ nrrdIoStateMoreThanFloatInText,
+ nrrdIoStateCharsPerLine,
+ nrrdIoStateValsPerLine,
+ nrrdIoStateSkipData,
+ nrrdIoStateKeepNrrdDataFileOpen,
+ nrrdIoStateZlibLevel,
+ nrrdIoStateZl...
[truncated message content] |