|
From: Gordon K. <kin...@us...> - 2004-04-01 19:41:35
|
Update of /cvsroot/teem/teem/src/nrrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22810 Modified Files: axis.c enumsNrrd.c nrrdEnums.h Log Message: fixed nrrdKind list to handle all 8 kinds of 2D and 3D tensors Index: axis.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/axis.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** axis.c 30 Mar 2004 19:25:09 -0000 1.7 --- axis.c 1 Apr 2004 19:29:34 -0000 1.8 *************** *** 91,94 **** --- 91,95 ---- break; case nrrdKindComplex: + case nrrdKind2Vector: ret = 2; break; *************** *** 102,115 **** ret = 4; break; ! case nrrdKind6Tensor: ret = 6; break; ! case nrrdKind7Tensor: ret = 7; break; ! case nrrdKind9Tensor: ! case nrrdKind9Matrix: ret = 9; break; default: fprintf(stderr, "%s: PANIC: nrrdKind %d not implemented!\n", me, kind); --- 103,130 ---- ret = 4; break; ! case nrrdKind2DSymTensor: ! ret = 3; ! break; ! case nrrdKind2DMaskedSymTensor: ! ret = 4; ! break; ! case nrrdKind2DTensor: ! ret = 4; ! break; ! case nrrdKind2DMaskedTensor: ! ret = 5; ! break; ! case nrrdKind3DSymTensor: ret = 6; break; ! case nrrdKind3DMaskedSymTensor: ret = 7; break; ! case nrrdKind3DTensor: ret = 9; break; + case nrrdKind3DMaskedTensor: + ret = 10; + break; default: fprintf(stderr, "%s: PANIC: nrrdKind %d not implemented!\n", me, kind); Index: nrrdEnums.h =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/nrrdEnums.h,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** nrrdEnums.h 31 Mar 2004 17:56:48 -0000 1.44 --- nrrdEnums.h 1 Apr 2004 19:29:35 -0000 1.45 *************** *** 183,204 **** enum { nrrdKindUnknown, ! nrrdKindDomain, /* 1: "It makes sense to resample along here" */ ! nrrdKindList, /* 2: "It makes NO sense to resample along here" */ ! nrrdKindStub, /* 3: axis with one sample */ ! nrrdKindScalar, /* 4: same as a stub */ ! nrrdKindComplex, /* 5: real and imaginary components of a number */ ! nrrdKind3Color, /* 6: ANY 3-component color value */ ! nrrdKind4Color, /* 7: ANY 4-component color value */ ! nrrdKind3Vector, /* 8: any 3-vector */ ! nrrdKind3Normal, /* 9: 3-vectors which are assumed normalized */ ! nrrdKind4Vector, /* 10: any 4-vector */ ! nrrdKind6Tensor, /* 11: the 6 unique elements of a symmetric 3x3 tensor */ ! nrrdKind7Tensor, /* 12: some scalar "confidence" or "valid" value, and ! the 6 unique elements of a symmetric 3x3 tensor */ ! nrrdKind9Tensor, /* 13: all 9 elements of a 3x3 tensor */ ! nrrdKind9Matrix, /* 14: all 9 elements of a 3x3 matrix */ nrrdKindLast }; ! #define NRRD_KIND_MAX 14 /* --- 183,208 ---- enum { nrrdKindUnknown, ! nrrdKindDomain, /* 1: "Yes, you can resample me" */ ! nrrdKindList, /* 2: "No, it is goofy to resample me" */ ! nrrdKindStub, /* 3: axis with one sample (a placeholder) */ ! nrrdKindScalar, /* 4: effectively, same as a stub */ ! nrrdKindComplex, /* 5: real and imaginary components */ ! nrrdKind2Vector, /* 6: 2 component vector */ ! nrrdKind3Color, /* 7: ANY 3-component color value */ ! nrrdKind4Color, /* 8: ANY 4-component color value */ ! nrrdKind3Vector, /* 9: 3 component vector */ ! nrrdKind3Normal, /* 10: 3 component vector, assumed normalized */ ! nrrdKind4Vector, /* 11: 4 component vector */ ! nrrdKind2DSymTensor, /* 12: Txx Txy Tyy */ ! nrrdKind2DMaskedSymTensor, /* 13: mask Txx Txy Tyy */ ! nrrdKind2DTensor, /* 14: Txx Txy Tyx Tyy */ ! nrrdKind2DMaskedTensor, /* 15: mask Txx Txy Tyx Tyy */ ! nrrdKind3DSymTensor, /* 16: Txx Txy Txz Tyy Tyz Tzz */ ! nrrdKind3DMaskedSymTensor, /* 17: mask Txx Txy Txz Tyy Tyz Tzz */ ! nrrdKind3DTensor, /* 18: Txx Txy Txz Tyx Tyy Tyz Tzx Tzy Tzz */ ! nrrdKind3DMaskedTensor, /* 19: mask Txx Txy Txz Tyx Tyy Tyz Tzx Tzy Tzz */ nrrdKindLast }; ! #define NRRD_KIND_MAX 19 /* Index: enumsNrrd.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/enumsNrrd.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** enumsNrrd.c 30 Mar 2004 19:25:09 -0000 1.32 --- enumsNrrd.c 1 Apr 2004 19:29:34 -0000 1.33 *************** *** 272,275 **** --- 272,296 ---- /* ------------------------ nrrdKind ------------------------- */ + /* + nrrdKindDomain, 1: "Yes, you can resample me" + nrrdKindList, 2: "No, it is goofy to resample me" + nrrdKindStub, 3: axis with one sample (a placeholder) + nrrdKindScalar, 4: effectively, same as a stub + nrrdKindComplex, 5: real and imaginary components + nrrdKind2Vector, 6: 2 component vector + nrrdKind3Color, 7: ANY 3-component color value + nrrdKind4Color, 8: ANY 4-component color value + nrrdKind3Vector, 9: 3 component vector + nrrdKind3Normal, 10: 3 component vector, assumed normalized + nrrdKind4Vector, 11: 4 component vector + nrrdKind2DSymTensor, 12: Txx Txy Tyy + nrrdKind2DMaskedSymTensor, 13: mask Txx Txy Tyy + nrrdKind2DTensor, 14: Txx Txy Tyx Tyy + nrrdKind2DMaskedTensor, 15: mask Txx Txy Tyx Tyy + nrrdKind3DSymTensor, 16: Txx Txy Txz Tyy Tyz Tzz + nrrdKind3DMaskedSymTensor, 17: mask Txx Txy Txz Tyy Tyz Tzz + nrrdKind3DTensor, 18: Txx Txy Txz Tyx Tyy Tyz Tzx Tzy Tzz + nrrdKind3DMaskedTensor, 19: mask Txx Txy Txz Tyx Tyy Tyz Tzx Tzy Tzz + */ char *************** *** 281,292 **** "scalar", "complex", "3-color", "4-color", "3-vector", "3-normal", ! "6-tensor", ! "7-tensor", ! "9-tensor", ! "9-matrix" }; --- 302,319 ---- "scalar", "complex", + "2-vector", "3-color", "4-color", "3-vector", "3-normal", ! "4-vector", ! "2D-symmetric-tensor", ! "2D-masked-symmetric-tensor", ! "2D-tensor", ! "2D-masked-tensor", ! "3D-symmetric-tensor", ! "3D-masked-symmetric-tensor", ! "3D-tensor", ! "3D-masked-tensor" }; *************** *** 295,311 **** "unknown kind", "a domain variable of the function which the nrrd samples", ! "a list of attributes; it makes no sense to resample along these", "a place-holder axis with a single sample", "axis used to indicate that the nrrd contains a scalar value", "real and imaginary parts of a value", "any 3-component color value", "any 4-component color value", ! "any 3-element vector", "a 3-element vector which is assumed normalized", ! "any 4-element vector", ! "6 unique elements of a symmetric tensor", ! "\"confidence\" plus 6 unique elements of a symmetric tensor", ! "9 elements of a 3x3 tensor", ! "9 elements of a 3x3 matrix" }; --- 322,343 ---- "unknown kind", "a domain variable of the function which the nrrd samples", ! "some list of attributes; it makes no sense to resample along these", "a place-holder axis with a single sample", "axis used to indicate that the nrrd contains a scalar value", "real and imaginary parts of a value", + "a 2-component vector", "any 3-component color value", "any 4-component color value", ! "a 3-element vector", "a 3-element vector which is assumed normalized", ! "a 4-element vector", ! "3 elements of 2D symmetric tensor: Txx Txy Tyy", ! "mask plus 3 elements of 2D symmetric tensor: mask Txx Txy Tyy", ! "4 elements of general 2D tensor: Txx Txy Tyx Tyy", ! "mask plus 4 elements of general 2D tensor: mask Txx Txy Tyx Tyy", ! "6 elements of 3D symmetric tensor: Txx Txy Txz Tyy Tyz Tzz", ! "mask plus 6 elements of 3D symmetric tensor: mask Txx Txy Txz Tyy Tyz Tzz", ! "9 elements of general 3D tensor: Txx Txy Txz Tyx Tyy Tyz Tzx Tzy Tzz", ! "mask plus 9 elements of general 3D tensor: mask Txx Txy Txz Tyx Tyy Tyz Tzx Tzy Tzz" }; *************** *** 317,328 **** "scalar", "complex", "3-color", "3color", "4-color", "4color", "3-vector", "3vector", "3-normal", "3normal", ! "6-tensor", "6tensor", ! "7-tensor", "7tensor", ! "9-tensor", "9tensor", ! "9-matrix", "9matrix", "" }; --- 349,366 ---- "scalar", "complex", + "2-vector", "2vector", "3-color", "3color", "4-color", "4color", "3-vector", "3vector", "3-normal", "3normal", ! "4-vector", "4vector", ! "2D-sym-tensor", "2Dsymtensor", ! "2D-mask-sym-tensor", "2Dmasksymtensor", ! "2D-tensor", "2Dtensor", ! "2D-mask-tensor", "2Dmasktensor", ! "3D-sym-tensor", "3Dsymtensor", ! "3D-mask-sym-tensor", "3Dmasksymtensor", ! "3D-tensor", "3Dtensor", ! "3D-mask-tensor", "3Dmasktensor", "" }; *************** *** 335,346 **** nrrdKindScalar, nrrdKindComplex, nrrdKind3Color, nrrdKind3Color, nrrdKind4Color, nrrdKind4Color, nrrdKind3Vector, nrrdKind3Vector, nrrdKind3Normal, nrrdKind3Normal, ! nrrdKind6Tensor, nrrdKind6Tensor, ! nrrdKind7Tensor, nrrdKind7Tensor, ! nrrdKind9Tensor, nrrdKind9Tensor, ! nrrdKind9Matrix, nrrdKind9Matrix }; --- 373,390 ---- nrrdKindScalar, nrrdKindComplex, + nrrdKind2Vector, nrrdKind3Color, nrrdKind3Color, nrrdKind4Color, nrrdKind4Color, nrrdKind3Vector, nrrdKind3Vector, nrrdKind3Normal, nrrdKind3Normal, ! nrrdKind4Vector, nrrdKind4Vector, ! nrrdKind2DSymTensor, nrrdKind2DSymTensor, ! nrrdKind2DMaskedSymTensor, nrrdKind2DMaskedSymTensor, ! nrrdKind2DTensor, nrrdKind2DTensor, ! nrrdKind2DMaskedTensor, nrrdKind2DMaskedTensor, ! nrrdKind3DSymTensor, nrrdKind3DSymTensor, ! nrrdKind3DMaskedSymTensor, nrrdKind3DMaskedSymTensor, ! nrrdKind3DTensor, nrrdKind3DTensor, ! nrrdKind3DMaskedTensor, nrrdKind3DMaskedTensor }; |