You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(19) |
Nov
(45) |
Dec
(80) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(58) |
Feb
(127) |
Mar
(74) |
Apr
(34) |
May
(117) |
Jun
(14) |
Jul
(26) |
Aug
(13) |
Sep
(1) |
Oct
(38) |
Nov
(13) |
Dec
(5) |
| 2005 |
Jan
(108) |
Feb
(134) |
Mar
(54) |
Apr
(133) |
May
(16) |
Jun
(54) |
Jul
(128) |
Aug
(99) |
Sep
(157) |
Oct
(182) |
Nov
(236) |
Dec
(212) |
| 2006 |
Jan
(86) |
Feb
(76) |
Mar
(121) |
Apr
(27) |
May
(7) |
Jun
(1) |
Jul
(6) |
Aug
(28) |
Sep
(1) |
Oct
(27) |
Nov
(5) |
Dec
|
| 2007 |
Jan
(32) |
Feb
(22) |
Mar
(22) |
Apr
(11) |
May
(3) |
Jun
(12) |
Jul
(11) |
Aug
(9) |
Sep
(37) |
Oct
(4) |
Nov
(9) |
Dec
(51) |
| 2008 |
Jan
(7) |
Feb
(31) |
Mar
(46) |
Apr
(31) |
May
(5) |
Jun
(27) |
Jul
(12) |
Aug
(5) |
Sep
(13) |
Oct
(24) |
Nov
(112) |
Dec
(15) |
| 2009 |
Jan
(6) |
Feb
(103) |
Mar
(66) |
Apr
(9) |
May
(8) |
Jun
(1) |
Jul
(20) |
Aug
(9) |
Sep
(2) |
Oct
(81) |
Nov
(88) |
Dec
(30) |
| 2010 |
Jan
(65) |
Feb
(57) |
Mar
(22) |
Apr
(12) |
May
(4) |
Jun
(12) |
Jul
(43) |
Aug
(6) |
Sep
(6) |
Oct
(4) |
Nov
(6) |
Dec
(3) |
| 2011 |
Jan
(10) |
Feb
(27) |
Mar
(11) |
Apr
(9) |
May
(69) |
Jun
(73) |
Jul
(67) |
Aug
(116) |
Sep
(40) |
Oct
(11) |
Nov
(34) |
Dec
(19) |
| 2012 |
Jan
|
Feb
(4) |
Mar
(28) |
Apr
(18) |
May
(9) |
Jun
(7) |
Jul
(4) |
Aug
(155) |
Sep
(264) |
Oct
(172) |
Nov
(15) |
Dec
(40) |
| 2013 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
(20) |
Jul
(76) |
Aug
(67) |
Sep
(49) |
Oct
(27) |
Nov
(3) |
Dec
(3) |
| 2014 |
Jan
(7) |
Feb
(7) |
Mar
(16) |
Apr
|
May
(4) |
Jun
(1) |
Jul
(18) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2015 |
Jan
(6) |
Feb
(5) |
Mar
(3) |
Apr
(23) |
May
(5) |
Jun
|
Jul
(2) |
Aug
(4) |
Sep
|
Oct
|
Nov
(2) |
Dec
(4) |
| 2016 |
Jan
(2) |
Feb
(7) |
Mar
(2) |
Apr
(1) |
May
(14) |
Jun
(3) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(3) |
| 2017 |
Jan
(6) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(12) |
Sep
(6) |
Oct
|
Nov
(3) |
Dec
|
| 2018 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2019 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(8) |
Oct
|
Nov
(2) |
Dec
(25) |
| 2020 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(53) |
Nov
(33) |
Dec
|
| 2021 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
(5) |
| 2022 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(93) |
Aug
(206) |
Sep
(39) |
Oct
(19) |
Nov
(11) |
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(150) |
Jul
(124) |
Aug
(14) |
Sep
(5) |
Oct
|
Nov
(1) |
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(62) |
Aug
|
Sep
(7) |
Oct
|
Nov
(7) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
(14) |
May
(3) |
Jun
|
Jul
|
Aug
(76) |
Sep
(214) |
Oct
(6) |
Nov
|
Dec
|
|
From: Gordon K. <kin...@us...> - 2004-06-23 01:42:23
|
Update of /cvsroot/teem/teem/src/nrrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7917 Modified Files: enumsNrrd.c Log Message: fixed bug in parsing of nrrdKind airEnum strings Index: enumsNrrd.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/enumsNrrd.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** enumsNrrd.c 9 Apr 2004 19:47:25 -0000 1.35 --- enumsNrrd.c 23 Jun 2004 01:42:14 -0000 1.36 *************** *** 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", "6-tensor", ! "3D-mask-sym-tensor", "3Dmasksymtensor", "7-tensor", ! "3D-tensor", "3Dtensor", "9-tensor", ! "3D-mask-tensor", "3Dmasktensor", "" }; --- 349,366 ---- "scalar", "complex", ! "2-vector", ! "3-color", ! "4-color", ! "3-vector", ! "3-normal", ! "4-vector", ! "2D-symmetric-tensor", "2D-sym-tensor", ! "2D-masked-symmetric-tensor", "2D-masked-sym-tensor", ! "2D-tensor", ! "2D-masked-tensor", ! "3D-symmetric-tensor", "3D-sym-tensor", ! "3D-masked-symmetric-tensor", "3D-masked-sym-tensor", ! "3D-tensor", ! "3D-masked-tensor", "" }; *************** *** 374,391 **** nrrdKindComplex, nrrdKind2Vector, ! nrrdKind3Color, nrrdKind3Color, ! nrrdKind4Color, nrrdKind4Color, ! nrrdKind3Vector, nrrdKind3Vector, ! nrrdKind3Normal, nrrdKind3Normal, ! nrrdKind4Vector, nrrdKind4Vector, nrrdKind2DSymTensor, nrrdKind2DSymTensor, nrrdKind2DMaskedSymTensor, nrrdKind2DMaskedSymTensor, ! nrrdKind2DTensor, nrrdKind2DTensor, ! nrrdKind2DMaskedTensor, nrrdKind2DMaskedTensor, ! nrrdKind3DSymTensor, nrrdKind3DSymTensor, nrrdKind3DSymTensor, nrrdKind3DMaskedSymTensor, nrrdKind3DMaskedSymTensor, ! nrrdKind3DMaskedSymTensor, ! nrrdKind3DTensor, nrrdKind3DTensor, nrrdKind3DTensor, ! nrrdKind3DMaskedTensor, nrrdKind3DMaskedTensor }; --- 374,390 ---- nrrdKindComplex, nrrdKind2Vector, ! nrrdKind3Color, ! nrrdKind4Color, ! nrrdKind3Vector, ! nrrdKind3Normal, ! nrrdKind4Vector, nrrdKind2DSymTensor, nrrdKind2DSymTensor, nrrdKind2DMaskedSymTensor, nrrdKind2DMaskedSymTensor, ! nrrdKind2DTensor, ! nrrdKind2DMaskedTensor, ! nrrdKind3DSymTensor, nrrdKind3DSymTensor, nrrdKind3DMaskedSymTensor, nrrdKind3DMaskedSymTensor, ! nrrdKind3DTensor, ! nrrdKind3DMaskedTensor, }; *************** *** 582,585 **** --- 581,585 ---- "variance", "SD", + "skew", "histo-min", "histo-max", *************** *** 609,612 **** --- 609,613 ---- "variance of values", "standard deviation of values", + "skew of values", "minimum of histogrammed values", "maximum of histogrammed values", *************** *** 636,639 **** --- 637,641 ---- "variance", "var", "SD", "stdv", + "skew", "histo-min", "histo-max", *************** *** 663,666 **** --- 665,669 ---- nrrdMeasureVariance, nrrdMeasureVariance, nrrdMeasureSD, nrrdMeasureSD, + nrrdMeasureSkew, nrrdMeasureHistoMin, nrrdMeasureHistoMax, |
|
From: Gordon K. <kin...@us...> - 2004-06-23 00:53:50
|
Update of /cvsroot/teem/teem/src/limn/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31809/test Added Files: plot.c Log Message: basic plotting ability, eventually to add as unu plot --- NEW FILE: plot.c --- /* teem: Gordon Kindlmann's research software Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 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 as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. 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 the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "../limn.h" char *info = ("Plot!"); typedef struct { FILE *file; double psc; double bbox[4]; double maxX, maxY; /* set by plotPreamble */ } plotPS; typedef struct { double axisThick; /* these are allocated per-graph BY HEST */ double *graphThick, *graphGray, *dotDiameter, *dotGray; /* also hest-allocated */ char *axisHorzLabel, *axisVertLabel; double dotInnerDiameterFraction; double axisOrig[2]; double dbox[4]; } plotParm; #define PPS_X(x) AIR_AFFINE(pps->bbox[0], (x), pps->bbox[2], 0, pps->maxX) #define PPS_Y(y) AIR_AFFINE(pps->bbox[1], (y), pps->bbox[3], 0, pps->maxY) #define PPS_S(s) AIR_DELTA(pps->bbox[1], (s), pps->bbox[3], 0, pps->maxY) void plotPreamble(plotPS *pps, plotParm *pparm) { pps->maxX = pps->psc*(pps->bbox[2] - pps->bbox[0]); pps->maxY = pps->psc*(pps->bbox[3] - pps->bbox[1]); fprintf(pps->file, "%%!PS-Adobe-2.0 EPSF-2.0\n"); fprintf(pps->file, "%%%%Creator: plot\n"); fprintf(pps->file, "%%%%Pages: 1\n"); fprintf(pps->file, "%%%%BoundingBox: 0 0 %d %d\n", (int)(pps->maxX), (int)(pps->maxY)); fprintf(pps->file, "%%%%EndComments\n"); fprintf(pps->file, "%%%%EndProlog\n"); fprintf(pps->file, "%%%%Page: 1 1\n"); fprintf(pps->file, "gsave\n"); fprintf(pps->file, "0 0 moveto\n"); fprintf(pps->file, "%g 0 lineto\n", pps->maxX); fprintf(pps->file, "%g %g lineto\n", pps->maxX, pps->maxY); fprintf(pps->file, "0 %g lineto\n", pps->maxY); fprintf(pps->file, "closepath\n"); fprintf(pps->file, "clip\n"); fprintf(pps->file, "gsave newpath\n"); fprintf(pps->file, "1 setlinejoin\n"); fprintf(pps->file, "1 setlinecap\n"); fprintf(pps->file, "/M {moveto} bind def\n"); fprintf(pps->file, "/L {lineto} bind def\n"); fprintf(pps->file, "/W {setlinewidth} bind def\n"); fprintf(pps->file, "/F {fill} bind def\n"); fprintf(pps->file, "/S {stroke} bind def\n"); fprintf(pps->file, "/CP {closepath} bind def\n"); fprintf(pps->file, "/RGB {setrgbcolor} bind def\n"); fprintf(pps->file, "/Gr {setgray} bind def\n"); fprintf(pps->file, "\n"); fprintf(pps->file, "0 setlinecap\n"); return; } void plotWidth(plotPS *pps, plotParm *pparm, double width) { fprintf(pps->file, "%g W\n", pps->psc*width); return; } void plotGray(plotPS *pps, plotParm *pparm, double gray) { fprintf(pps->file, "%g Gr\n", gray); return; } void plotLine(plotPS *pps, plotParm *pparm, double width, double x0, double y0, double x1, double y1) { fprintf(pps->file, "%g W\n", pps->psc*width); fprintf(pps->file, "%g %g M\n", PPS_X(x0), PPS_Y(y0)); fprintf(pps->file, "%g %g L S\n", PPS_X(x1), PPS_Y(y1)); return; } void plotLabel(plotPS *pps, plotParm *pparm, double x, double y, char *str) { fprintf(pps->file, "%g %g M (%s) show\n", PPS_X(x), PPS_Y(y), str); return; } void plotAxes(plotPS *pps, plotParm *pparm, Nrrd *ndata) { double axX, axY; axX = AIR_AFFINE(ndata->axis[1].min, pparm->axisOrig[0], ndata->axis[1].max, pps->bbox[0], pps->bbox[2]); axY = AIR_AFFINE(pparm->dbox[1], pparm->axisOrig[1], pparm->dbox[3], pps->bbox[1], pps->bbox[3]); plotGray(pps, pparm, 0); plotLine(pps, pparm, pparm->axisThick, axX, pps->bbox[1], axX, pps->bbox[3]); plotLine(pps, pparm, pparm->axisThick, pps->bbox[0], axY, pps->bbox[2], axY); if (strlen(pparm->axisHorzLabel) || strlen(pparm->axisVertLabel)) { fprintf(pps->file, "/Helvetica findfont 20 scalefont setfont\n"); if (strlen(pparm->axisHorzLabel)) { plotLabel(pps, pparm, pps->bbox[2], axY, pparm->axisHorzLabel); } if (strlen(pparm->axisVertLabel)) { plotLabel(pps, pparm, axX, pps->bbox[3], pparm->axisVertLabel); } } } void plotGraph(plotPS *pps, plotParm *pparm, Nrrd **ndata, int nidx) { int ii, npts; double xx, yy, *data, val; if (!( pparm->graphThick[nidx] > 0 )) { return; } data = (double *)(ndata[nidx]->data); npts = ndata[nidx]->axis[1].size; plotGray(pps, pparm, pparm->graphGray[nidx]); fprintf(pps->file, "%g W\n", pps->psc*pparm->graphThick[nidx]); for (ii=0; ii<npts; ii++) { val = data[ii]; xx = AIR_AFFINE(0, ii, npts-1, ndata[nidx]->axis[1].min, ndata[nidx]->axis[1].max); xx = AIR_AFFINE(pparm->dbox[0], xx, pparm->dbox[2], pps->bbox[0], pps->bbox[2]); yy = AIR_AFFINE(pparm->dbox[1], val, pparm->dbox[3], pps->bbox[1], pps->bbox[3]); fprintf(pps->file, "%g %g %s\n", PPS_X(xx), PPS_Y(yy), ii ? "L" : "M"); } fprintf(pps->file, "S\n"); } void plotDots(plotPS *pps, plotParm *pparm, Nrrd **ndata, int nidx) { int ii, npts; double xx, yy, orad, irad, *data, val; if (!( pparm->dotDiameter[nidx] > 0 )) { return; } fprintf(pps->file, "gsave\n"); plotWidth(pps, pparm, 0); data = (double *)(ndata[nidx]->data); npts = ndata[nidx]->axis[1].size; orad = pparm->dotDiameter[nidx]/2; irad = pparm->dotInnerDiameterFraction*orad; for (ii=0; ii<npts; ii++) { val = data[ii]; xx = AIR_AFFINE(0, ii, npts-1, ndata[nidx]->axis[1].min, ndata[nidx]->axis[1].max); xx = AIR_AFFINE(pparm->dbox[0], xx, pparm->dbox[2], pps->bbox[0], pps->bbox[2]); yy = AIR_AFFINE(pparm->dbox[1], val, pparm->dbox[3], pps->bbox[1], pps->bbox[3]); plotGray(pps, pparm, pparm->dotGray[nidx]); fprintf(pps->file, "%g %g %g 0 360 arc closepath fill\n", PPS_X(xx), PPS_Y(yy), PPS_S(orad)); if (irad) { plotGray(pps, pparm, 1.0); fprintf(pps->file, "%g %g %g 0 360 arc closepath fill\n", PPS_X(xx), PPS_Y(yy), PPS_S(irad)); } } fprintf(pps->file, "grestore\n"); } void plotEpilog(plotPS *pps, plotParm *pparm) { fprintf(pps->file, "grestore\n"); fprintf(pps->file, "grestore\n"); fprintf(pps->file, "%%%%Trailer\n"); return; } int main(int argc, char *argv[]) { char *me, *err, *outS; hestOpt *hopt=NULL; airArray *mop; int numGrth, numDtdi, numGrgr, numDtgr, numNrrd, ni; plotPS pps; plotParm pparm; Nrrd **_ndata, **ndata; mop = airMopNew(); me = argv[0]; hestOptAdd(&hopt, "i", "data", airTypeOther, 1, -1, &_ndata, NULL, "input nrrd containing data to plot", &numNrrd, NULL, nrrdHestNrrd); hestOptAdd(&hopt, "dbox", "minX minY maxX maxY", airTypeDouble, 4, 4, pparm.dbox, NULL, "bounding box, in data space"); hestOptAdd(&hopt, "bbox", "minX minY maxX maxY", airTypeDouble, 4, 4, pps.bbox, NULL, "bounding box, in graph space"); hestOptAdd(&hopt, "psc", "PS scale", airTypeDouble, 1, 1, &(pps.psc), "300", "scaling from graph space to PostScript points"); hestOptAdd(&hopt, "grth", "graph thickness", airTypeDouble, 1, -1, &(pparm.graphThick), "0.01", "thickness of line for graph, or \"0\" for no graph line", &numGrth); hestOptAdd(&hopt, "grgr", "graph gray", airTypeDouble, 1, -1, &(pparm.graphGray), "0", "grayscale to use for graph", &numGrgr); hestOptAdd(&hopt, "dtdi", "dot diameter", airTypeDouble, 1, -1, &(pparm.dotDiameter), "0.1", "radius of dot drawn at data points, or \"0\" for no dots", &numDtdi); hestOptAdd(&hopt, "dtgr", "dot gray", airTypeDouble, 1, -1, &(pparm.dotGray), "0", "grayscale to use for dots", &numDtgr); hestOptAdd(&hopt, "dtid", "dot inner diam frac", airTypeDouble, 1, 1, &(pparm.dotInnerDiameterFraction), "0.0", "fractional radius of white dot drawn within dot"); hestOptAdd(&hopt, "axth", "axis thickness", airTypeDouble, 1, 1, &(pparm.axisThick), "0.01", "thickness of lines for axes"); hestOptAdd(&hopt, "axor", "axis origin", airTypeDouble, 2, 2, &(pparm.axisOrig), "0 0", "origin of lines for axes, in data space"); hestOptAdd(&hopt, "axhl", "horiz axis label", airTypeString, 1, 1, &(pparm.axisHorzLabel), "", "label on horizontal axis"); hestOptAdd(&hopt, "axvl", "vert axis label", airTypeString, 1, 1, &(pparm.axisVertLabel), "", "label on vertical axis"); hestOptAdd(&hopt, "o", "output PS", airTypeString, 1, 1, &outS, "out.ps", "output file to render postscript into"); hestParseOrDie(hopt, argc-1, argv+1, NULL, me, info, AIR_TRUE, AIR_TRUE, AIR_TRUE); airMopAdd(mop, hopt, (airMopper)hestOptFree, airMopAlways); airMopAdd(mop, hopt, (airMopper)hestParseFree, airMopAlways); if (!( numGrth == numDtdi && numDtdi == numGrgr && numGrgr == numDtgr )) { fprintf(stderr, "%s: number of arguments given to grth (%d), dtdi (%d), " "grgr (%d), dtgr (%d) not all equal\n", me, numGrth, numDtdi, numGrgr, numDtgr); airMopError(mop); return 1; } if (!( numNrrd == numGrth )) { fprintf(stderr, "%s: number of nrrds (%d) != number graph options (%d)\n", me, numNrrd, numGrth); airMopError(mop); return 1; } /* check nrrds */ for (ni=0; ni<numNrrd; ni++) { if (!( (1 == _ndata[ni]->dim || 2 == _ndata[ni]->dim) && nrrdTypeBlock != _ndata[ni]->type )) { fprintf(stderr, "%s: input nrrd must be 1-D or 2-D array of scalars", me); airMopError(mop); return 1; } } ndata = (Nrrd**)calloc(numNrrd, sizeof(Nrrd *)); airMopAdd(mop, ndata, airFree, airMopAlways); for (ni=0; ni<numNrrd; ni++) { ndata[ni] = nrrdNew(); airMopAdd(mop, ndata[ni], (airMopper)nrrdNuke, airMopAlways); if (nrrdConvert(ndata[ni], _ndata[ni], nrrdTypeDouble)) { airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways); fprintf(stderr, "%s: couldn't convert input %d to %s:\n%s\n", me, ni, airEnumStr(nrrdType, nrrdTypeDouble), err); airMopError(mop); return 1; } if (1 == ndata[ni]->dim) { if (nrrdAxesInsert(ndata[ni], ndata[ni], 0)) { airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways); fprintf(stderr, "%s: couldn't insert axis 0 on nrrd %d:\n%s\n", me, ni, err); airMopError(mop); return 1; } } /* currently assuming node centering */ if (!AIR_EXISTS(ndata[ni]->axis[1].min)) { ndata[ni]->axis[1].min = 0; } if (!AIR_EXISTS(ndata[ni]->axis[1].max)) { ndata[ni]->axis[1].max = ndata[ni]->axis[1].size-1; } } if (!(pps.file = airFopen(outS, stdout, "wb"))) { fprintf(stderr, "%s: couldn't open output file\n", me); airMopError(mop); return 1; } airMopAdd(mop, pps.file, (airMopper)airFclose, airMopAlways); plotPreamble(&pps, &pparm); plotAxes(&pps, &pparm, ndata[0]); for (ni=0; ni<numNrrd; ni++) { plotGraph(&pps, &pparm, ndata, ni); plotDots(&pps, &pparm, ndata, ni); } plotEpilog(&pps, &pparm); airMopOkay(mop); return 0; } |
|
From: Gordon K. <kin...@us...> - 2004-06-23 00:53:50
|
Update of /cvsroot/teem/teem/src/limn In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31809 Modified Files: GNUmakefile Log Message: basic plotting ability, eventually to add as unu plot Index: GNUmakefile =================================================================== RCS file: /cvsroot/teem/teem/src/limn/GNUmakefile,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** GNUmakefile 10 May 2004 19:18:35 -0000 1.19 --- GNUmakefile 23 Jun 2004 00:53:41 -0000 1.20 *************** *** 51,55 **** splineMisc.o splineMethods.o splineEval.o enumsLimn.o $(L).TESTS = test/map test/light test/tcam test/tps test/tspline test/tbc \ ! test/tcamanim test/soid test/off2eps test/triimg #### #### --- 51,55 ---- splineMisc.o splineMethods.o splineEval.o enumsLimn.o $(L).TESTS = test/map test/light test/tcam test/tps test/tspline test/tbc \ ! test/tcamanim test/soid test/off2eps test/triimg test/plot #### #### |
|
From: Gordon K. <kin...@us...> - 2004-06-07 19:22:15
|
Update of /cvsroot/teem/NrrdIO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22842 Modified Files: GNUmakefile pre-GNUmakefile Log Message: formatting perfectionism Index: pre-GNUmakefile =================================================================== RCS file: /cvsroot/teem/NrrdIO/pre-GNUmakefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pre-GNUmakefile 26 May 2004 13:37:51 -0000 1.5 --- pre-GNUmakefile 7 Jun 2004 19:21:39 -0000 1.6 *************** *** 47,51 **** $(warning * needs to be set to the directory containing the)\ $(warning * src and include directories of the Teem source)\ ! $(warning * distribution. *)\ $(warning *)\ $(error Make quitting)) --- 47,51 ---- $(warning * needs to be set to the directory containing the)\ $(warning * src and include directories of the Teem source)\ ! $(warning * distribution.)\ $(warning *)\ $(error Make quitting)) Index: GNUmakefile =================================================================== RCS file: /cvsroot/teem/NrrdIO/GNUmakefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GNUmakefile 26 May 2004 13:24:30 -0000 1.5 --- GNUmakefile 7 Jun 2004 19:21:27 -0000 1.6 *************** *** 37,41 **** ### run ranlib on libraries created via ar ### ! RANLIB = ### Assuming NrrdIO will be built with zlib enabled (due to "-DTEEM_ZLIB=1" --- 37,41 ---- ### run ranlib on libraries created via ar ### ! RANLIB = ranlib ### Assuming NrrdIO will be built with zlib enabled (due to "-DTEEM_ZLIB=1" |
|
From: Gordon K. <kin...@us...> - 2004-05-26 17:10:11
|
Update of /cvsroot/teem/teem/src/limn In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6811/limn Modified Files: TODO.txt Log Message: a surprisingly large amount of things are NOT YET DONE Index: TODO.txt =================================================================== RCS file: /cvsroot/teem/teem/src/limn/TODO.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TODO.txt 17 Sep 2003 02:12:06 -0000 1.4 --- TODO.txt 26 May 2004 17:10:00 -0000 1.5 *************** *** 1,3 **** postscript generation of 1D data plots - - camera paths, and other general animation stuff --- 1 ---- |
|
From: Gordon K. <kin...@us...> - 2004-05-26 17:10:11
|
Update of /cvsroot/teem/teem/src/unrrdu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6811/unrrdu Modified Files: TODO.txt Log Message: a surprisingly large amount of things are NOT YET DONE Index: TODO.txt =================================================================== RCS file: /cvsroot/teem/teem/src/unrrdu/TODO.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** TODO.txt 30 Oct 2003 21:35:25 -0000 1.17 --- TODO.txt 26 May 2004 17:10:01 -0000 1.18 *************** *** 3,8 **** make "unu make" into a nrrd function - unu minmax takes multiple arguments - enable the unu 2op and 3op operations that output integers to save the output as, say, signed char, instead of float. This is different --- 3,6 ---- *************** *** 13,18 **** ----- teem 1.5 cut-off ----- - unu squeeze (like matlab) - figure out why I was getting a MIO (memory in use) error with unu resample when I had the bug in nrrdAlloc_nva (where the --- 11,14 ---- |
|
From: Gordon K. <kin...@us...> - 2004-05-26 17:10:10
|
Update of /cvsroot/teem/teem/src/gage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6811/gage Modified Files: TODO.txt Log Message: a surprisingly large amount of things are NOT YET DONE Index: TODO.txt =================================================================== RCS file: /cvsroot/teem/teem/src/gage/TODO.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** TODO.txt 28 Jul 2003 18:20:03 -0000 1.11 --- TODO.txt 26 May 2004 17:10:00 -0000 1.12 *************** *** 1,4 **** - test gageContextCopy - add flags for explicitly specifying gmax, hmax, vrange --- 1,2 ---- |
|
From: Gordon K. <kin...@us...> - 2004-05-26 17:10:10
|
Update of /cvsroot/teem/teem/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6811 Modified Files: TODO.txt Log Message: a surprisingly large amount of things are NOT YET DONE Index: TODO.txt =================================================================== RCS file: /cvsroot/teem/teem/src/TODO.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** TODO.txt 18 Dec 2003 01:00:16 -0000 1.16 --- TODO.txt 26 May 2004 17:10:00 -0000 1.17 *************** *** 1,3 **** ! DESTROY the airType* enum! I wasted quite awhile debugging a problem caused by: if (nrrdAlloc(nout, airTypeFloat, 3, size[0], size[1], size[2])) { ... Do you see the problem? Grrr. --- 1,3 ---- ! DESTROY the airType* enum! I wasted quite awhile debugging a problem caused by: if (nrrdAlloc(nout, airTypeFloat, 3, size[0], size[1], size[2])) { ... Do you see the problem? Grrr. *************** *** 28,34 **** bin: create "segprobe" analog to vprobe and pprobe - todo: making volume datasets - todo: nhdrs for volvis.org - todo: figure out shared libraries on cygwin. todo: Test that shared libraries work everywhere they should. --- 28,31 ---- *************** *** 51,56 **** unrrdu: standardize hest framework for doing unu/gkms/tend style programs - mrender: deal with vectors - air: make airOneLine return number of bytes read; current return of string length is entirely redundant with return of strlen() --- 48,51 ---- |
|
From: Gordon K. <kin...@us...> - 2004-05-26 13:42:08
|
Update of /cvsroot/teem/teem/src/air In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27257/air Modified Files: air.h Log Message: excluded airDrand48 stuff from NrrdIO Index: air.h =================================================================== RCS file: /cvsroot/teem/teem/src/air/air.h,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** air.h 12 May 2004 11:08:55 -0000 1.42 --- air.h 26 May 2004 13:41:55 -0000 1.43 *************** *** 300,303 **** --- 300,305 ---- TEEM_API int airExists_d(double d); + /* ---- BEGIN non-NrrdIO */ + typedef struct { airULLong a; /* Factor in congruential formula. */ *************** *** 314,317 **** --- 316,321 ---- TEEM_API double airDrand48(); + /* ---- END non-NrrdIO */ + /* ******** airType |
|
From: Gordon K. <kin...@us...> - 2004-05-26 13:38:02
|
Update of /cvsroot/teem/NrrdIO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26413 Modified Files: pre-GNUmakefile Log Message: better warning message Index: pre-GNUmakefile =================================================================== RCS file: /cvsroot/teem/NrrdIO/pre-GNUmakefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pre-GNUmakefile 26 May 2004 13:35:40 -0000 1.4 --- pre-GNUmakefile 26 May 2004 13:37:51 -0000 1.5 *************** *** 44,50 **** $(if $(TEEM_SRC_ROOT),,\ $(warning *)\ ! $(warning * Environment variable TEEM_SRC_ROOT not set. This *)\ ! $(warning * needs to be set to the directory containing the *)\ ! $(warning * src and include directories of the Teem source *)\ $(warning * distribution. *)\ $(warning *)\ --- 44,50 ---- $(if $(TEEM_SRC_ROOT),,\ $(warning *)\ ! $(warning * Environment variable TEEM_SRC_ROOT not set. This)\ ! $(warning * needs to be set to the directory containing the)\ ! $(warning * src and include directories of the Teem source)\ $(warning * distribution. *)\ $(warning *)\ |
|
From: Gordon K. <kin...@us...> - 2004-05-26 13:35:50
|
Update of /cvsroot/teem/NrrdIO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25953 Modified Files: pre-GNUmakefile Log Message: better warning message Index: pre-GNUmakefile =================================================================== RCS file: /cvsroot/teem/NrrdIO/pre-GNUmakefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pre-GNUmakefile 26 May 2004 12:52:21 -0000 1.3 --- pre-GNUmakefile 26 May 2004 13:35:40 -0000 1.4 *************** *** 44,50 **** $(if $(TEEM_SRC_ROOT),,\ $(warning *)\ ! $(warning * Environment variable TEEM_SRC_ROOT not set. This needs to be *)\ ! $(warning * set to the directory containing the src and include directories *)\ ! $(warning * of the Teem source distribution.)\ $(warning *)\ $(error Make quitting)) --- 44,51 ---- $(if $(TEEM_SRC_ROOT),,\ $(warning *)\ ! $(warning * Environment variable TEEM_SRC_ROOT not set. This *)\ ! $(warning * needs to be set to the directory containing the *)\ ! $(warning * src and include directories of the Teem source *)\ ! $(warning * distribution. *)\ $(warning *)\ $(error Make quitting)) |
|
From: Gordon K. <kin...@us...> - 2004-05-26 13:24:40
|
Update of /cvsroot/teem/NrrdIO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23909 Modified Files: GNUmakefile Log Message: normalized variable setting Index: GNUmakefile =================================================================== RCS file: /cvsroot/teem/NrrdIO/GNUmakefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GNUmakefile 26 May 2004 13:23:23 -0000 1.4 --- GNUmakefile 26 May 2004 13:24:30 -0000 1.5 *************** *** 25,29 **** PLATFORM_DEFS = \ -DTEEM_DIO=0 \ ! -DTEEM_32BIT=0 \ -DTEEM_ENDIAN=4321 \ -DTEEM_QNANHIBIT=0 \ --- 25,29 ---- PLATFORM_DEFS = \ -DTEEM_DIO=0 \ ! -DTEEM_32BIT=1 \ -DTEEM_ENDIAN=4321 \ -DTEEM_QNANHIBIT=0 \ *************** *** 32,41 **** ### Any architecture-specific flags to cc ### ! CCFLAGS = -64 ### This also has to be set per-architecture- whether or not we need to ### run ranlib on libraries created via ar ### ! RANLIB = ### Assuming NrrdIO will be built with zlib enabled (due to "-DTEEM_ZLIB=1" --- 32,41 ---- ### Any architecture-specific flags to cc ### ! CCFLAGS = ### This also has to be set per-architecture- whether or not we need to ### run ranlib on libraries created via ar ### ! RANLIB = ### Assuming NrrdIO will be built with zlib enabled (due to "-DTEEM_ZLIB=1" |
|
From: Gordon K. <kin...@us...> - 2004-05-26 13:23:34
|
Update of /cvsroot/teem/NrrdIO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23706 Modified Files: GNUmakefile Log Message: added CCFLAGS arguments Index: GNUmakefile =================================================================== RCS file: /cvsroot/teem/NrrdIO/GNUmakefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GNUmakefile 26 May 2004 13:18:28 -0000 1.3 --- GNUmakefile 26 May 2004 13:23:23 -0000 1.4 *************** *** 25,37 **** PLATFORM_DEFS = \ -DTEEM_DIO=0 \ ! -DTEEM_32BIT=1 \ -DTEEM_ENDIAN=4321 \ ! -DTEEM_QNANHIBIT=1 \ -DTEEM_BIGBITFIELD=1 ### This also has to be set per-architecture- whether or not we need to ### run ranlib on libraries created via ar ### ! RANLIB = ranlib ### Assuming NrrdIO will be built with zlib enabled (due to "-DTEEM_ZLIB=1" --- 25,41 ---- PLATFORM_DEFS = \ -DTEEM_DIO=0 \ ! -DTEEM_32BIT=0 \ -DTEEM_ENDIAN=4321 \ ! -DTEEM_QNANHIBIT=0 \ -DTEEM_BIGBITFIELD=1 + ### Any architecture-specific flags to cc + ### + CCFLAGS = -64 + ### This also has to be set per-architecture- whether or not we need to ### run ranlib on libraries created via ar ### ! RANLIB = ### Assuming NrrdIO will be built with zlib enabled (due to "-DTEEM_ZLIB=1" *************** *** 57,66 **** ### %.o : %.c ! cc -O2 $(PLATFORM_DEFS) -DTEEM_ZLIB=1 $(ZLIB_IPATH) -c $^ -o $@ ### this creates the sampleIO program ### sampleIO : sampleIO.c ! cc -O2 $(PLATFORM_DEFS) -DTEEM_ZLIB=1 $(ZLIB_IPATH) \ $^ -o $@ -L. -lNrrdIO $(ZLIB_LPATH) -lz -lm --- 61,71 ---- ### %.o : %.c ! cc -O2 $(CCFLAGS) $(PLATFORM_DEFS) \ ! -DTEEM_ZLIB=1 $(ZLIB_IPATH) -c $^ -o $@ ### this creates the sampleIO program ### sampleIO : sampleIO.c ! cc -O2 $(CCFLAGS) $(PLATFORM_DEFS) -DTEEM_ZLIB=1 $(ZLIB_IPATH) \ $^ -o $@ -L. -lNrrdIO $(ZLIB_LPATH) -lz -lm |
|
From: Gordon K. <kin...@us...> - 2004-05-26 13:18:40
|
Update of /cvsroot/teem/NrrdIO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22797 Modified Files: GNUmakefile Log Message: added RANLIB variable Index: GNUmakefile =================================================================== RCS file: /cvsroot/teem/NrrdIO/GNUmakefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GNUmakefile 26 May 2004 12:52:21 -0000 1.2 --- GNUmakefile 26 May 2004 13:18:28 -0000 1.3 *************** *** 30,33 **** --- 30,38 ---- -DTEEM_BIGBITFIELD=1 + ### This also has to be set per-architecture- whether or not we need to + ### run ranlib on libraries created via ar + ### + RANLIB = ranlib + ### Assuming NrrdIO will be built with zlib enabled (due to "-DTEEM_ZLIB=1" ### on the source compilation, below), these (may) need to be set to help *************** *** 47,51 **** libNrrdIO.a : $(patsubst %.c,%.o,$(shell cat NrrdIO_Srcs.txt)) ar ru $@ $^ ! ranlib $@ ### Compiling the source files will also have some platform-specific stuff --- 52,56 ---- libNrrdIO.a : $(patsubst %.c,%.o,$(shell cat NrrdIO_Srcs.txt)) ar ru $@ $^ ! $(if $(RANLIB),$(RANLIB) $@,) ### Compiling the source files will also have some platform-specific stuff |
|
From: Gordon K. <kin...@us...> - 2004-05-26 13:10:33
|
Update of /cvsroot/teem/NrrdIO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20969 Modified Files: NrrdIO.h simple.c Log Message: updates! Index: NrrdIO.h =================================================================== RCS file: /cvsroot/teem/NrrdIO/NrrdIO.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NrrdIO.h 26 May 2004 12:52:21 -0000 1.3 --- NrrdIO.h 26 May 2004 13:10:19 -0000 1.4 *************** *** 1542,1546 **** /* simple.c */ TEEM_API const char *nrrdBiffKey; - TEEM_API const Nrrd **nrrdCNPP(Nrrd **nin, int N); TEEM_API int nrrdPeripheralInit(Nrrd *nrrd); TEEM_API int nrrdPeripheralCopy(Nrrd *nout, const Nrrd *nin); --- 1542,1545 ---- Index: simple.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/simple.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** simple.c 26 May 2004 12:52:21 -0000 1.2 --- simple.c 26 May 2004 13:10:19 -0000 1.3 *************** *** 39,62 **** /* - ******** nrrdCNPP - ** - ** As far as I can tell, a function like this is unfortunately - ** necessary to pass a <Nrrd**> to a function expecting a - ** <const Nrrd**> (a "CNPP"). This function just creates a new - ** array of the right type and copies all the pointers into it. - */ - const Nrrd ** - nrrdCNPP(Nrrd **nin, int N) { - const Nrrd **ret; - int i; - - ret = (const Nrrd **)calloc(N, sizeof(Nrrd *)); - for (i=0; i<N; i++) { - ret[i] = nin[i]; - } - return ret; - } - - /* ******** nrrdPeripheralInit ** --- 39,42 ---- |
|
From: Gordon K. <kin...@us...> - 2004-05-26 13:09:42
|
Update of /cvsroot/teem/teem/src/nrrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20776 Modified Files: nrrd.h simple.c Log Message: never needed this Index: nrrd.h =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/nrrd.h,v retrieving revision 1.140 retrieving revision 1.141 diff -C2 -d -r1.140 -r1.141 *** nrrd.h 26 May 2004 02:06:44 -0000 1.140 --- nrrd.h 26 May 2004 13:09:32 -0000 1.141 *************** *** 544,548 **** /* simple.c */ TEEM_API const char *nrrdBiffKey; - TEEM_API const Nrrd **nrrdCNPP(Nrrd **nin, int N); TEEM_API int nrrdPeripheralInit(Nrrd *nrrd); TEEM_API int nrrdPeripheralCopy(Nrrd *nout, const Nrrd *nin); --- 544,547 ---- Index: simple.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/simple.c,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** simple.c 13 Mar 2004 20:03:10 -0000 1.60 --- simple.c 26 May 2004 13:09:32 -0000 1.61 *************** *** 28,51 **** /* - ******** nrrdCNPP - ** - ** As far as I can tell, a function like this is unfortunately - ** necessary to pass a <Nrrd**> to a function expecting a - ** <const Nrrd**> (a "CNPP"). This function just creates a new - ** array of the right type and copies all the pointers into it. - */ - const Nrrd ** - nrrdCNPP(Nrrd **nin, int N) { - const Nrrd **ret; - int i; - - ret = (const Nrrd **)calloc(N, sizeof(Nrrd *)); - for (i=0; i<N; i++) { - ret[i] = nin[i]; - } - return ret; - } - - /* ******** nrrdPeripheralInit ** --- 28,31 ---- |
|
From: Gordon K. <kin...@us...> - 2004-05-26 13:02:28
|
Update of /cvsroot/teem/NrrdIO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18974 Added Files: privateAir.h Log Message: added this --- NEW FILE: privateAir.h --- #include "teemEndian.h" #include "teemQnanhibit.h" #include "teemBigbitfield.h" /* ** _airFloat, _airDouble ** ** these unions facilitate converting amonst ** i: unsigned integral type ** c: (sign,exp,frac) triples of unsigned integral components ** v: the floating point numbers these bit-patterns represent */ typedef union { unsigned int i; struct { #if TEEM_ENDIAN == 1234 unsigned int frac : 23; unsigned int exp : 8; unsigned int sign : 1; #else unsigned int sign : 1; unsigned int exp : 8; unsigned int frac : 23; #endif } c; float v; } _airFloat; typedef union { airULLong i; #if TEEM_BIGBITFIELD == 1 /* #ifndef __sparc */ struct { # if TEEM_ENDIAN == 1234 airULLong frac : 52; unsigned int exp : 11; unsigned int sign : 1; # else unsigned int sign : 1; unsigned int exp : 11; airULLong frac : 52; # endif } c; #endif /* these next two members are used for printing in airFPFprintf_d */ struct { /* access to whole double as two unsigned ints */ #if TEEM_ENDIAN == 1234 unsigned int half0 : 32; unsigned int half1 : 32; #else unsigned int half1 : 32; unsigned int half0 : 32; #endif } h; struct { /* access to fraction with two unsigned ints */ #if TEEM_ENDIAN == 1234 unsigned int frac0 : 32; unsigned int frac1 : 20; unsigned int exp : 11; unsigned int sign : 1; #else unsigned int sign : 1; unsigned int exp : 11; unsigned int frac1 : 20; unsigned int frac0 : 32; #endif } c2; double v; } _airDouble; |
Update of /cvsroot/teem/NrrdIO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16718 Modified Files: 000-README.txt 754.c GNUmakefile NrrdIO.h NrrdIO_Srcs.txt accessors.c array.c arraysNrrd.c axis.c biffbiff.c comment.c defaultsNrrd.c dio.c encoding.c encodingAscii.c encodingBzip2.c encodingGzip.c encodingHex.c encodingRaw.c endianAir.c endianNrrd.c enum.c enumsNrrd.c format.c formatEPS.c formatNRRD.c formatPNG.c formatPNM.c formatText.c formatVTK.c gzio.c keyvalue.c methodsNrrd.c miscAir.c mop.c parseAir.c parseNrrd.c pre-GNUmakefile preamble.c privateNrrd.h read.c reorder.c sampleIO.c sane.c simple.c string.c teem32bit.h teemBigbitfield.h teemDio.h teemEndian.h teemPng.h teemQnanhibit.h write.c Log Message: bringing this up-to-date with teem 1.7 (or 1.7.1?) Index: teemBigbitfield.h =================================================================== RCS file: /cvsroot/teem/NrrdIO/teemBigbitfield.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** teemBigbitfield.h 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- teemBigbitfield.h 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: sane.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/sane.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sane.c 14 Feb 2004 20:26:33 -0000 1.2 --- sane.c 26 May 2004 12:52:21 -0000 1.3 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: sampleIO.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/sampleIO.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** sampleIO.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- sampleIO.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: teemPng.h =================================================================== RCS file: /cvsroot/teem/NrrdIO/teemPng.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** teemPng.h 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- teemPng.h 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: format.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/format.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** format.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- format.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: axis.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/axis.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** axis.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- axis.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, *************** *** 35,39 **** void ! _nrrdAxisInfoInit(NrrdAxis *axis) { if (axis) { --- 35,39 ---- void ! _nrrdAxisInfoInit(NrrdAxisInfo *axis) { if (axis) { *************** *** 41,47 **** axis->spacing = AIR_NAN; axis->min = axis->max = AIR_NAN; ! AIR_FREE(axis->label); ! AIR_FREE(axis->unit); axis->center = nrrdCenterUnknown; } } --- 41,48 ---- axis->spacing = AIR_NAN; axis->min = axis->max = AIR_NAN; ! axis->label = airFree(axis->label); ! axis->unit = airFree(axis->unit); axis->center = nrrdCenterUnknown; + axis->kind = nrrdKindUnknown; } } *************** *** 51,55 **** nrrdAxisInfo *axis; ! axis = calloc(1, sizeof(NrrdAxis)); axis->label = NULL; axis->unit = NULL; --- 52,56 ---- nrrdAxisInfo *axis; ! axis = calloc(1, sizeof(NrrdAxisInfo)); axis->label = NULL; axis->unit = NULL; *************** *** 60,70 **** } ! NrrdAxis * ! nrrdAxisInfoNix(NrrdAxis *axis) { if (axis) { ! AIR_FREE(axis->label); ! AIR_FREE(axis->unit); ! AIR_FREE(axis); } return NULL; --- 61,71 ---- } ! NrrdAxisInfo * ! nrrdAxisInfoNix(NrrdAxisInfo *axis) { if (axis) { ! axis->label = airFree(axis->label); ! axis->unit = airFree(axis->unit); ! axis = airFree(axis); } return NULL; *************** *** 74,79 **** /* ------------------------------------------------------------ */ void ! _nrrdAxisInfoCopy(NrrdAxis *dest, const NrrdAxis *src, int bitflag) { if (!(NRRD_AXIS_INFO_SIZE_BIT & bitflag)) { --- 75,168 ---- /* ------------------------------------------------------------ */ + + /* + ******** nrrdKindSize + ** + ** returns suggested size (length) of an axis with the given kind, or, + ** 0 if there is no suggested size, or the kind was invalid + */ + int + nrrdKindSize(int kind) { + char me[]="nrrdKindSize"; + int ret; + + if (!( AIR_IN_OP(nrrdKindUnknown, kind, nrrdKindLast) )) { + /* they gave us invalid or unknown kind */ + return 0; + } + + switch (kind) { + case nrrdKindDomain: + case nrrdKindList: + ret = 0; + break; + case nrrdKindStub: + case nrrdKindScalar: + ret = 1; + break; + case nrrdKindComplex: + case nrrdKind2Vector: + ret = 2; + break; + case nrrdKind3Color: + case nrrdKind3Vector: + case nrrdKind3Normal: + ret = 3; + break; + case nrrdKind4Color: + case nrrdKind4Vector: + 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); + exit(1); + } + + return ret; + } + + int + _nrrdKindAltered(int kindIn) { + int kindOut; + + if (nrrdStateKindNoop) { + kindOut = nrrdKindUnknown; + } else { + if (nrrdKindDomain == kindIn + || nrrdKindList == kindIn) { + kindOut = kindIn; + } else { + kindOut = nrrdKindUnknown; + } + } + return kindOut; + } + void ! _nrrdAxisInfoCopy(NrrdAxisInfo *dest, const NrrdAxisInfo *src, int bitflag) { if (!(NRRD_AXIS_INFO_SIZE_BIT & bitflag)) { *************** *** 92,98 **** dest->center = src->center; } if (!(NRRD_AXIS_INFO_LABEL_BIT & bitflag)) { if (dest->label != src->label) { ! AIR_FREE(dest->label); dest->label = airStrdup(src->label); } --- 181,190 ---- dest->center = src->center; } + if (!(NRRD_AXIS_INFO_KIND_BIT & bitflag)) { + dest->kind = src->kind; + } if (!(NRRD_AXIS_INFO_LABEL_BIT & bitflag)) { if (dest->label != src->label) { ! dest->label = airFree(dest->label); dest->label = airStrdup(src->label); } *************** *** 100,104 **** if (!(NRRD_AXIS_INFO_UNIT_BIT & bitflag)) { if (dest->unit != src->unit) { ! AIR_FREE(dest->unit); dest->unit = airStrdup(src->unit); } --- 192,196 ---- if (!(NRRD_AXIS_INFO_UNIT_BIT & bitflag)) { if (dest->unit != src->unit) { ! dest->unit = airFree(dest->unit); dest->unit = airStrdup(src->unit); } *************** *** 195,204 **** nrrd->axis[d].center = info.I[d]; break; case nrrdAxisInfoLabel: ! AIR_FREE(nrrd->axis[d].label); nrrd->axis[d].label = airStrdup(info.CP[d]); break; case nrrdAxisInfoUnit: ! AIR_FREE(nrrd->axis[d].unit); nrrd->axis[d].unit = airStrdup(info.CP[d]); break; --- 287,299 ---- nrrd->axis[d].center = info.I[d]; break; + case nrrdAxisInfoKind: + nrrd->axis[d].kind = info.I[d]; + break; case nrrdAxisInfoLabel: ! nrrd->axis[d].label = airFree(nrrd->axis[d].label); nrrd->axis[d].label = airStrdup(info.CP[d]); break; case nrrdAxisInfoUnit: ! nrrd->axis[d].unit = airFree(nrrd->axis[d].unit); nrrd->axis[d].unit = airStrdup(info.CP[d]); break; *************** *** 237,240 **** --- 332,336 ---- break; case nrrdAxisInfoCenter: + case nrrdAxisInfoKind: info.I[d] = va_arg(ap, int); /* *************** *** 315,318 **** --- 411,417 ---- info.I[d] = nrrd->axis[d].center; break; + case nrrdAxisInfoKind: + info.I[d] = nrrd->axis[d].kind; + break; case nrrdAxisInfoLabel: /* note airStrdup()! */ *************** *** 362,365 **** --- 461,465 ---- break; case nrrdAxisInfoCenter: + case nrrdAxisInfoKind: *((int*)ptr) = info.I[d]; /* printf("!%s: got int[%d] = %d\n", *************** *** 416,420 **** /* ! ******** nrrdAxisPos() ** ** given a nrrd, an axis, and a (floating point) index space position, --- 516,520 ---- /* ! ******** nrrdAxisInfoPos() ** ** given a nrrd, an axis, and a (floating point) index space position, *************** *** 425,429 **** */ double ! nrrdAxisPos(const Nrrd *nrrd, int ax, double idx) { int center, size; double min, max; --- 525,529 ---- */ double ! nrrdAxisInfoPos(const Nrrd *nrrd, int ax, double idx) { int center, size; double min, max; *************** *** 441,445 **** /* ! ******** nrrdAxisIdx() ** ** given a nrrd, an axis, and a (floating point) world space position, --- 541,545 ---- /* ! ******** nrrdAxisInfoIdx() ** ** given a nrrd, an axis, and a (floating point) world space position, *************** *** 450,454 **** */ double ! nrrdAxisIdx(const Nrrd *nrrd, int ax, double pos) { int center, size; double min, max; --- 550,554 ---- */ double ! nrrdAxisInfoIdx(const Nrrd *nrrd, int ax, double pos) { int center, size; double min, max; *************** *** 466,470 **** /* ! ******** nrrdAxisPosRange() ** ** given a nrrd, an axis, and two (floating point) index space positions, --- 566,570 ---- /* ! ******** nrrdAxisInfoPosRange() ** ** given a nrrd, an axis, and two (floating point) index space positions, *************** *** 473,479 **** */ void ! nrrdAxisPosRange(double *loP, double *hiP, ! const Nrrd *nrrd, int ax, ! double loIdx, double hiIdx) { int center, size, flip = 0; double min, max, tmp; --- 573,579 ---- */ void ! nrrdAxisInfoPosRange(double *loP, double *hiP, ! const Nrrd *nrrd, int ax, ! double loIdx, double hiIdx) { int center, size, flip = 0; double min, max, tmp; *************** *** 507,511 **** /* ! ******** nrrdAxisIdxRange() ** ** given a nrrd, an axis, and two (floating point) world space positions, --- 607,611 ---- /* ! ******** nrrdAxisInfoIdxRange() ** ** given a nrrd, an axis, and two (floating point) world space positions, *************** *** 524,530 **** */ void ! nrrdAxisIdxRange(double *loP, double *hiP, ! const Nrrd *nrrd, int ax, ! double loPos, double hiPos) { int center, size, flip = 0; double min, max, tmp; --- 624,630 ---- */ void ! nrrdAxisInfoIdxRange(double *loP, double *hiP, ! const Nrrd *nrrd, int ax, ! double loPos, double hiPos) { int center, size, flip = 0; double min, max, tmp; *************** *** 563,567 **** void ! nrrdAxisSpacingSet(Nrrd *nrrd, int ax) { int sign; double min, max, tmp; --- 663,667 ---- void ! nrrdAxisInfoSpacingSet(Nrrd *nrrd, int ax) { int sign; double min, max, tmp; *************** *** 595,599 **** void ! nrrdAxisMinMaxSet(Nrrd *nrrd, int ax, int defCenter) { int center; double spacing; --- 695,699 ---- void ! nrrdAxisInfoMinMaxSet(Nrrd *nrrd, int ax, int defCenter) { int center; double spacing; Index: NrrdIO_Srcs.txt =================================================================== RCS file: /cvsroot/teem/NrrdIO/NrrdIO_Srcs.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** NrrdIO_Srcs.txt 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- NrrdIO_Srcs.txt 26 May 2004 12:52:21 -0000 1.2 *************** *** 1 **** ! 754.c mop.c array.c parseAir.c dio.c sane.c endianAir.c string.c enum.c miscAir.c biffbiff.c privateNrrd.h accessors.c defaultsNrrd.c enumsNrrd.c arraysNrrd.c methodsNrrd.c reorder.c axis.c simple.c comment.c keyvalue.c endianNrrd.c parseNrrd.c gzio.c read.c write.c format.c formatNRRD.c encoding.c encodingRaw.c encodingAscii.c encodingHex.c encodingGzip.c encodingBzip2.c formatEPS.c formatPNG.c formatPNM.c formatText.c formatVTK.c --- 1 ---- ! 754.c mop.c array.c parseAir.c dio.c sane.c endianAir.c string.c enum.c miscAir.c biffbiff.c accessors.c defaultsNrrd.c enumsNrrd.c arraysNrrd.c methodsNrrd.c reorder.c axis.c simple.c comment.c keyvalue.c endianNrrd.c parseNrrd.c gzio.c read.c write.c format.c formatNRRD.c encoding.c encodingRaw.c encodingAscii.c encodingHex.c encodingGzip.c encodingBzip2.c formatEPS.c formatPNG.c formatPNM.c formatText.c formatVTK.c Index: privateNrrd.h =================================================================== RCS file: /cvsroot/teem/NrrdIO/privateNrrd.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** privateNrrd.h 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- privateNrrd.h 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,34 **** - /* - NrrdIO: stand-alone code for basic nrrd functionality - Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah - - These source files have been copied and/or modified from teem, - Gordon Kindlmann's research software; <http://teem.sourceforge.net>. - Teem is licensed under the GNU Lesser Public License. The - non-copyleft licensing defined here applies to only the source files - in the NrrdIO distribution (not the rest of teem), and only to the - files originating with NrrdIO (not analogous files in teem). - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any - damages arising from the use of this software. - - Permission is granted to anyone to use this software for any - purpose, including commercial applications, and to alter it and - redistribute it freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source distribution. - */ - #ifndef NRRD_PRIVATE_HAS_BEEN_INCLUDED - #define NRRD_PRIVATE_HAS_BEEN_INCLUDED #ifdef _WIN32 --- 1,3 ---- *************** *** 118,124 **** /* axis.c */ ! extern void _nrrdAxisInfoCopy(NrrdAxis *dest, const NrrdAxis *src, int bitflag); ! extern void _nrrdAxisInfoInit(NrrdAxis *axis); extern int _nrrdCenter(int center); extern int _nrrdCenter2(int center, int def); --- 87,94 ---- /* axis.c */ ! extern int _nrrdKindAltered(int kindIn); ! extern void _nrrdAxisInfoCopy(NrrdAxisInfo *dest, const NrrdAxisInfo *src, int bitflag); ! extern void _nrrdAxisInfoInit(NrrdAxisInfo *axis); extern int _nrrdCenter(int center); extern int _nrrdCenter2(int center, int def); *************** *** 155,158 **** --- 125,129 ---- extern int _nrrdSizeCheck(int dim, const int *size, int useBiff); extern void _nrrdTraverse(Nrrd *nrrd); + extern int _nrrdCopyShallow (Nrrd *nout, const Nrrd *nin); #if TEEM_ZLIB *************** *** 176,178 **** #endif - #endif /* NRRD_PRIVATE_HAS_BEEN_INCLUDED */ --- 147,148 ---- Index: mop.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/mop.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** mop.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- mop.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: formatEPS.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/formatEPS.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** formatEPS.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- formatEPS.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: preamble.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/preamble.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** preamble.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- preamble.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: encodingBzip2.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/encodingBzip2.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** encodingBzip2.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- encodingBzip2.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: gzio.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/gzio.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gzio.c 21 Dec 2003 06:40:51 -0000 1.1.1.1 --- gzio.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, *************** *** 567,571 **** return 1; } ! AIR_FREE(s->msg); if (s->stream.state != NULL) { if (s->mode == 'w') { --- 567,571 ---- return 1; } ! s->msg = airFree(s->msg); if (s->stream.state != NULL) { if (s->mode == 'w') { *************** *** 584,590 **** biffAdd(NRRD, err); } ! AIR_FREE(s->inbuf); ! AIR_FREE(s->outbuf); ! AIR_FREE(s); return error != Z_OK; } --- 584,590 ---- biffAdd(NRRD, err); } ! s->inbuf = airFree(s->inbuf); ! s->outbuf = airFree(s->outbuf); ! s = airFree(s); return error != Z_OK; } Index: methodsNrrd.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/methodsNrrd.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** methodsNrrd.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- methodsNrrd.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, *************** *** 39,46 **** if (nio) { ! AIR_FREE(nio->path); ! AIR_FREE(nio->base); ! AIR_FREE(nio->dataFN); ! AIR_FREE(nio->line); nio->lineLen = 0; nio->pos = 0; --- 39,46 ---- if (nio) { ! nio->path = airFree(nio->path); ! nio->base = airFree(nio->base); ! nio->dataFN = airFree(nio->dataFN); ! nio->line = airFree(nio->line); nio->lineLen = 0; nio->pos = 0; *************** *** 88,97 **** NrrdIoState * nrrdIoStateNix (NrrdIoState *nio) { ! ! AIR_FREE(nio->path); ! AIR_FREE(nio->base); ! AIR_FREE(nio->dataFN); ! AIR_FREE(nio->line); ! AIR_FREE(nio); /* the NrrdIoState never owned nio->oldData; we don't free it */ return NULL; --- 88,97 ---- NrrdIoState * nrrdIoStateNix (NrrdIoState *nio) { ! ! nio->path = airFree(nio->path); ! nio->base = airFree(nio->base); ! nio->dataFN = airFree(nio->dataFN); ! nio->line = airFree(nio->line); ! nio = airFree(nio); /* the NrrdIoState never owned nio->oldData; we don't free it */ return NULL; *************** *** 117,121 **** if (nrrd) { ! AIR_FREE(nrrd->data); nrrd->type = nrrdTypeUnknown; nrrd->dim = 0; --- 117,121 ---- if (nrrd) { ! nrrd->data = airFree(nrrd->data); nrrd->type = nrrdTypeUnknown; nrrd->dim = 0; *************** *** 125,129 **** } ! AIR_FREE(nrrd->content); nrrd->blockSize = 0; nrrd->oldMin = nrrd->oldMax = AIR_NAN; --- 125,129 ---- } ! nrrd->content = airFree(nrrd->content); nrrd->blockSize = 0; nrrd->oldMin = nrrd->oldMax = AIR_NAN; *************** *** 201,208 **** if (nrrd) { ! AIR_FREE(nrrd->content); /* HEY: this is a symptom of some stupidity, no? */ for (i=0; i<NRRD_DIM_MAX; i++) { ! AIR_FREE(nrrd->axis[i].label); } nrrdCommentClear(nrrd); --- 201,208 ---- if (nrrd) { ! nrrd->content = airFree(nrrd->content); /* HEY: this is a symptom of some stupidity, no? */ for (i=0; i<NRRD_DIM_MAX; i++) { ! nrrd->axis[i].label = airFree(nrrd->axis[i].label); } nrrdCommentClear(nrrd); *************** *** 210,214 **** nrrdKeyValueClear(nrrd); nrrd->kvpArr = airArrayNix(nrrd->kvpArr); ! AIR_FREE(nrrd); } return NULL; --- 210,214 ---- nrrdKeyValueClear(nrrd); nrrd->kvpArr = airArrayNix(nrrd->kvpArr); ! nrrd = airFree(nrrd); } return NULL; *************** *** 226,230 **** if (nrrd) { ! AIR_FREE(nrrd->data); nrrdInit(nrrd); } --- 226,230 ---- if (nrrd) { ! nrrd->data = airFree(nrrd->data); nrrdInit(nrrd); } *************** *** 357,360 **** --- 357,415 ---- /* + ** _nrrdCopyShallow + ** + ** Similar to nrrdCopy, but the data itself is not copied. nout->data + ** and nout->data will share a pointer to the data. This should be + ** used with extreem caution, because there is no pointer magic to + ** make sure the data is not freed twice. + */ + int + _nrrdCopyShallow (Nrrd *nout, const Nrrd *nin) { + char me[]="_nrrdCopyShallow", err[AIR_STRLEN_MED]; + Nrrd *ntmp; + airArray *mop; + + if (!(nin && nout)) { + sprintf(err, "%s: got NULL pointer", me); + biffAdd(NRRD, err); return 1; + } + + /* We're not using nrrdNew() because it allocates new airArray's for + comments (cmtArr) and key/value pairs (kvpArr), which we do not + need here, and which we don't want to have to explicitly delete */ + ntmp = (Nrrd*)(calloc(1, sizeof(Nrrd))); + if (!ntmp) { + sprintf(err, "%s: error allocating temporary nrrd.", me); + biffAdd(NRRD, err); return 1; + } + /* Since we should never have copied the data, or allocated new meta-data, + we want to make sure that we don't delete it here. */ + mop = airMopNew(); + airMopAdd(mop, ntmp, airFree, airMopAlways); + + /* Shallow copy the contents of the nrrd. It's OK if this is not a + deep copy (i.e. all the axis info), because nrrdCopy will do this + for us. This is only to facilitate setting the data pointer to + NULL which will cause nrrdCopy to not copy the data. */ + memcpy(ntmp, nin, sizeof(Nrrd)); + + /* Setting this to NULL will cause nrrdCopy to not copy the data */ + ntmp->data = NULL; + + if (nrrdCopy(nout, ntmp)) { + sprintf(err, "%s: couldn't copy to output", me); + biffAdd(NRRD, err); + airMopError(mop); + return 1; + } + + /* Share the data pointer */ + nout->data = nin->data; + + airMopOkay(mop); + return 0; + } + + /* ******** nrrdCopy ** *************** *** 395,403 **** /* someone is trying to copy structs without data, fine fine fine */ nout->data = NULL; } nrrdAxisInfoCopy(nout, nin, NULL, NRRD_AXIS_INFO_NONE); /* HEY: shouldn't this be handled with nrrdPeripheralCopy() */ ! AIR_FREE(nout->content); nout->content = airStrdup(nin->content); if (nin->content && !nout->content) { --- 450,465 ---- /* someone is trying to copy structs without data, fine fine fine */ nout->data = NULL; + /* We need to make sure to copy important stuff like type, dim, + and sizes, as this information is not copied elsewhere. If we + did have non-NULL data, this information would be set in + nrrdAlloc_nva() called by nrrdMaybeAlloc_nva() above. */ + nout->type = nin->type; + nout->dim = nin->dim; + nrrdAxisInfoSet_nva(nout, nrrdAxisInfoSize, size); } nrrdAxisInfoCopy(nout, nin, NULL, NRRD_AXIS_INFO_NONE); /* HEY: shouldn't this be handled with nrrdPeripheralCopy() */ ! nout->content = airFree(nout->content); nout->content = airStrdup(nin->content); if (nin->content && !nout->content) { *************** *** 470,474 **** nrrd->type = type; ! AIR_FREE(nrrd->data); nrrd->dim = dim; if (_nrrdSizeCheck(dim, size, AIR_TRUE)) { --- 532,536 ---- nrrd->type = type; ! nrrd->data = airFree(nrrd->data); nrrd->dim = dim; if (_nrrdSizeCheck(dim, size, AIR_TRUE)) { Index: pre-GNUmakefile =================================================================== RCS file: /cvsroot/teem/NrrdIO/pre-GNUmakefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pre-GNUmakefile 13 Feb 2004 02:47:49 -0000 1.2 --- pre-GNUmakefile 26 May 2004 12:52:21 -0000 1.3 *************** *** 1,5 **** # # NrrdIO: stand-alone code for basic nrrd functionality ! # Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah # # These source files have been copied and/or modified from teem, --- 1,5 ---- # # NrrdIO: stand-alone code for basic nrrd functionality ! # Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah # # These source files have been copied and/or modified from teem, *************** *** 38,59 **** ### This file is the single place where the required teem source files ### are listed. Once the NrrdIO source distribution is created, this ! ### GNU makefile is completely moot. TEEM_ROOT must be set in order ! ### to locate the teem source. ! ! $(if $(TEEM_ROOT),,\ ! $(warning *)\ ! $(warning * Environment variable TEEM_ROOT not set.)\ ! $(warning *)\ ! $(error Make quitting)) ! $(if $(wildcard $(TEEM_ROOT)/src/air/*.c),,\ $(warning *)\ ! $(warning * Environment variable TEEM_ROOT=$(TEEM_ROOT) not correctly set:)\ ! $(warning * Must directory containing "src", "include", etc. of teem)\ $(warning *)\ $(error Make quitting)) ### The following sources are pretty much stubs, to create the symbols, ! ### but not the functionality, of different formats and the bzip2 encoding. ### As such, they are NOT copied from teem but are made for NrrdIO. ### --- 38,55 ---- ### This file is the single place where the required teem source files ### are listed. Once the NrrdIO source distribution is created, this ! ### GNU makefile is completely moot. TEEM_SRC_ROOT must be set in order ! ### to locate the teem source. We use this instead of TEEM_ROOT to avoid ! ### conflict with teem's own make system ! $(if $(TEEM_SRC_ROOT),,\ $(warning *)\ ! $(warning * Environment variable TEEM_SRC_ROOT not set. This needs to be *)\ ! $(warning * set to the directory containing the src and include directories *)\ ! $(warning * of the Teem source distribution.)\ $(warning *)\ $(error Make quitting)) ### The following sources are pretty much stubs, to create the symbols, ! ### but not the functionality of different formats and the bzip2 encoding. ### As such, they are NOT copied from teem but are made for NrrdIO. ### *************** *** 75,79 **** NEED_BIFF = biff/biffbiff.c NEED_NRRD = $(addprefix nrrd/, \ - privateNrrd.h \ accessors.c defaultsNrrd.c enumsNrrd.c arraysNrrd.c methodsNrrd.c \ reorder.c axis.c simple.c comment.c keyvalue.c endianNrrd.c \ --- 71,74 ---- *************** *** 81,86 **** encoding.c encodingRaw.c encodingAscii.c encodingHex.c encodingGzip.c) NEED_SRCS = $(NEED_AIR) $(NEED_BIFF) $(NEED_NRRD) ! NEED_HDRS = air/air.h biff/biff.h \ $(addprefix nrrd/, nrrdDefines.h nrrdEnums.h nrrdMacros.h nrrd.h) ### Building NrrdIO requires the teem*.h headers, and the processed sources --- 76,82 ---- encoding.c encodingRaw.c encodingAscii.c encodingHex.c encodingGzip.c) NEED_SRCS = $(NEED_AIR) $(NEED_BIFF) $(NEED_NRRD) ! NEED_PUB_HDRS = air/air.h biff/biff.h \ $(addprefix nrrd/, nrrdDefines.h nrrdEnums.h nrrdMacros.h nrrd.h) + NEED_PRIV_HDRS = air/privateAir.h nrrd/privateNrrd.h ### Building NrrdIO requires the teem*.h headers, and the processed sources *************** *** 88,101 **** ### .PHONY: all ! all: $(TEEM_HDRS) $(NEED_SRCS) NrrdIO.h NrrdIO_Srcs.txt ### NrrdIO.h is basically the result of cat'ing together all the ! ### teem headers in $(NEED_HDRS), but we do need to unteem. ### ! $(NEED_HDRS): ! tail +19 $(TEEM_ROOT)/src/$@ | perl unteem.pl > $(notdir $@) ! NrrdIO.h: $(NEED_HDRS) ! cat preamble.c $(notdir $(NEED_HDRS)) > NrrdIO.h ! rm -f $(notdir $(NEED_HDRS)) ### NrrdIO_Srcs.txt is a list of all the source files that must be --- 84,99 ---- ### .PHONY: all ! all: $(TEEM_HDRS) $(NEED_SRCS) $(NEED_PRIV_HDRS) NrrdIO.h NrrdIO_Srcs.txt ### NrrdIO.h is basically the result of cat'ing together all the ! ### teem headers in $(NEED_HDRS), but we do need to "unteem" them. ### ! $(NEED_PUB_HDRS) $(NEED_PRIV_HDRS): ! tail +19 $(TEEM_SRC_ROOT)/src/$@ \ ! | perl unteem.pl \ ! | grep -v HAS_BEEN_INCLUDED > $(notdir $@) ! NrrdIO.h: $(NEED_PUB_HDRS) ! cat preamble.c $(notdir $(NEED_PUB_HDRS)) > NrrdIO.h ! rm -f $(notdir $(NEED_PUB_HDRS)) ### NrrdIO_Srcs.txt is a list of all the source files that must be *************** *** 108,112 **** ### teem/%.h: ! tail +19 $(TEEM_ROOT)/include/$(notdir $@) \ | cat preamble.c - > $(notdir $@) --- 106,110 ---- ### teem/%.h: ! tail +19 $(TEEM_SRC_ROOT)/include/$(notdir $@) \ | cat preamble.c - > $(notdir $@) *************** *** 116,127 **** ### %.h %.c: ! tail +19 $(TEEM_ROOT)/src/$@ \ | cat preamble.c - \ ! | perl unteem.pl > $(notdir $@) ### To start from scratch ### clean: ! rm -f $(notdir $(TEEM_HDRS) $(NEED_SRCS)) NrrdIO.h NrrdIO_srcs.txt ! ! --- 114,127 ---- ### %.h %.c: ! tail +19 $(TEEM_SRC_ROOT)/src/$@ \ | cat preamble.c - \ ! | perl unteem.pl \ ! | grep -v HAS_BEEN_INCLUDED > $(notdir $@) ### To start from scratch ### clean: ! rm -f $(notdir $(TEEM_HDRS) $(NEED_SRCS) \ ! $(NEED_PUB_HDRS) $(NEED_PRIV_HDRS)) \ ! NrrdIO.h NrrdIO_srcs.txt \ ! *.o libNrrdIO.a sampleIO Index: formatPNM.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/formatPNM.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** formatPNM.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- formatPNM.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: GNUmakefile =================================================================== RCS file: /cvsroot/teem/NrrdIO/GNUmakefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** GNUmakefile 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- GNUmakefile 26 May 2004 12:52:21 -0000 1.2 *************** *** 25,31 **** PLATFORM_DEFS = \ -DTEEM_DIO=0 \ ! -DTEEM_32BIT=0 \ -DTEEM_ENDIAN=4321 \ ! -DTEEM_QNANHIBIT=0 \ -DTEEM_BIGBITFIELD=1 --- 25,31 ---- PLATFORM_DEFS = \ -DTEEM_DIO=0 \ ! -DTEEM_32BIT=1 \ -DTEEM_ENDIAN=4321 \ ! -DTEEM_QNANHIBIT=1 \ -DTEEM_BIGBITFIELD=1 *************** *** 46,60 **** ### libNrrdIO.a : $(patsubst %.c,%.o,$(shell cat NrrdIO_Srcs.txt)) ! ar ru -o $@ $^ ### Compiling the source files will also have some platform-specific stuff ### %.o : %.c ! cc -O2 -64 $(PLATFORM_DEFS) -DTEEM_ZLIB=1 $(ZLIB_IPATH) -c $^ -o $@ ### this creates the sampleIO program ### sampleIO : sampleIO.c ! cc -O2 -64 $(PLATFORM_DEFS) -DTEEM_ZLIB=1 $(ZLIB_IPATH) \ $^ -o $@ -L. -lNrrdIO $(ZLIB_LPATH) -lz -lm --- 46,61 ---- ### libNrrdIO.a : $(patsubst %.c,%.o,$(shell cat NrrdIO_Srcs.txt)) ! ar ru $@ $^ ! ranlib $@ ### Compiling the source files will also have some platform-specific stuff ### %.o : %.c ! cc -O2 $(PLATFORM_DEFS) -DTEEM_ZLIB=1 $(ZLIB_IPATH) -c $^ -o $@ ### this creates the sampleIO program ### sampleIO : sampleIO.c ! cc -O2 $(PLATFORM_DEFS) -DTEEM_ZLIB=1 $(ZLIB_IPATH) \ $^ -o $@ -L. -lNrrdIO $(ZLIB_LPATH) -lz -lm Index: enum.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/enum.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** enum.c 14 Feb 2004 20:26:33 -0000 1.2 --- enum.c 26 May 2004 12:52:21 -0000 1.3 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: teemEndian.h =================================================================== RCS file: /cvsroot/teem/NrrdIO/teemEndian.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** teemEndian.h 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- teemEndian.h 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: defaultsNrrd.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/defaultsNrrd.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** defaultsNrrd.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- defaultsNrrd.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, *************** *** 64,67 **** --- 64,68 ---- /* there is no sane reason to change this default initialization */ int nrrdStateKeyValueReturnInternalPointers = AIR_FALSE; + int nrrdStateKindNoop = AIR_TRUE; /* should the acceptance (or not) of malformed NRRD header fields Index: encodingGzip.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/encodingGzip.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** encodingGzip.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- encodingGzip.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: encodingAscii.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/encodingAscii.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** encodingAscii.c 21 Dec 2003 06:40:51 -0000 1.1.1.1 --- encodingAscii.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: accessors.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/accessors.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** accessors.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- accessors.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: formatVTK.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/formatVTK.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** formatVTK.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- formatVTK.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: encodingRaw.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/encodingRaw.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** encodingRaw.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- encodingRaw.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: array.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/array.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** array.c 21 Dec 2003 06:40:51 -0000 1.1.1.1 --- array.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: 754.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/754.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 754.c 21 Dec 2003 06:40:51 -0000 1.1.1.1 --- 754.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, *************** *** 31,34 **** --- 31,35 ---- #include "NrrdIO.h" + #include "privateAir.h" #include "teemEndian.h" #include "teemQnanhibit.h" *************** *** 49,118 **** #endif - /* - ** _airFloat, _airDouble - ** - ** these unions facilitate converting amonst - ** i: unsigned integral type - ** c: (sign,exp,frac) triples of unsigned integral components - ** v: the floating point numbers these bit-patterns represent - */ - typedef union { - unsigned int i; - struct { - #if TEEM_ENDIAN == 1234 - unsigned int frac : 23; - unsigned int exp : 8; - unsigned int sign : 1; - #else - unsigned int sign : 1; - unsigned int exp : 8; - unsigned int frac : 23; - #endif - } c; - float v; - } _airFloat; - - typedef union { - airULLong i; - #if TEEM_BIGBITFIELD == 1 - /* #ifndef __sparc */ - struct { - # if TEEM_ENDIAN == 1234 - airULLong frac : 52; - unsigned int exp : 11; - unsigned int sign : 1; - # else - unsigned int sign : 1; - unsigned int exp : 11; - airULLong frac : 52; - # endif - } c; - #endif - /* these next two members are used for printing in airFPFprintf_d */ - struct { /* access to whole double as two unsigned ints */ - #if TEEM_ENDIAN == 1234 - unsigned int half0 : 32; - unsigned int half1 : 32; - #else - unsigned int half1 : 32; - unsigned int half0 : 32; - #endif - } h; - struct { /* access to fraction with two unsigned ints */ - #if TEEM_ENDIAN == 1234 - unsigned int frac0 : 32; - unsigned int frac1 : 20; - unsigned int exp : 11; - unsigned int sign : 1; - #else - unsigned int sign : 1; - unsigned int exp : 11; - unsigned int frac1 : 20; - unsigned int frac0 : 32; - #endif - } c2; - double v; - } _airDouble; - /* ** The hex numbers in braces are examples of C's "initial member of a union" --- 50,53 ---- Index: endianAir.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/endianAir.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** endianAir.c 21 Dec 2003 06:40:51 -0000 1.1.1.1 --- endianAir.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: biffbiff.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/biffbiff.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** biffbiff.c 21 Dec 2003 06:40:51 -0000 1.1.1.1 --- biffbiff.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: teemDio.h =================================================================== RCS file: /cvsroot/teem/NrrdIO/teemDio.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** teemDio.h 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- teemDio.h 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: formatText.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/formatText.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** formatText.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- formatText.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: dio.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/dio.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** dio.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- dio.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: endianNrrd.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/endianNrrd.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** endianNrrd.c 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- endianNrrd.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: teem32bit.h =================================================================== RCS file: /cvsroot/teem/NrrdIO/teem32bit.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** teem32bit.h 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- teem32bit.h 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, Index: 000-README.txt =================================================================== RCS file: /cvsroot/teem/NrrdIO/000-README.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 000-README.txt 21 Dec 2003 06:40:52 -0000 1.1.1.1 --- 000-README.txt 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003 University of Utah These source files have been copied and/or modified from teem, Index: enumsNrrd.c =================================================================== RCS file: /cvsroot/teem/NrrdIO/enumsNrrd.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** enumsNrrd.c 21 Dec 2003 06:40:51 -0000 1.1.1.1 --- enumsNrrd.c 26 May 2004 12:52:21 -0000 1.2 *************** *** 1,5 **** /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, --- 1,5 ---- /* NrrdIO: stand-alone code for basic nrrd functionality ! Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah These source files have been copied and/or modified from teem, *************** *** 281,322 **** nrrdCenter = &_nrrdCenter_enum; ! /* ------------------------ nrrdAxisInfo ------------------------- */ char ! _nrrdAxisInfoStr[NRRD_AXIS_INFO_MAX+1][AIR_STRLEN_SMALL] = { ! "(unknown_axis_info)", ! "size", ! "spacing", ! "min", ! "max", ! "center", ! "label", ! "unit" }; char ! _nrrdAxisInfoDesc[NRRD_AXIS_INFO_MAX+1][AIR_STRLEN_MED] = { ! "unknown axis info", ! "number of samples along axis", ! "spacing between samples", ! "minimum position in \"world\" space associated with axis", ! "maximum position in \"world\" space associated with axis", ! "centering style for samples along this axis", ! "short description of space or value spanned by axis", ! "units in which sample spacing is measured" }; airEnum ! _nrrdAxisInfo = { ! "axis_info", ! NRRD_AXIS_INFO_MAX, ! _nrrdAxisInfoStr, NULL, ! _nrrdAxisInfoDesc, ! NULL, NULL, ! AIR_TRUE }; airEnum * ! nrrdAxisInfo = &_nrrdAxisInfo; ! /* ------------------------ nrrdField ------------------------- */ --- 281,416 ---- nrrdCenter = &_nrrdCenter_enum; ! /* ------------------------ 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 ! _nrrdKindStr[NRRD_KIND_MAX+1][AIR_STRLEN_SMALL] = { ! "(unknown_kind)", ! "domain", ! "list", ! "stub", ! "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" }; char ! _nrrdKindDesc[NRRD_KIND_MAX+1][AIR_STRLEN_MED] = { ! "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" ! }; ! ! char ! _nrrdKindStr_Eqv[][AIR_STRLEN_SMALL] = { ! "domain", ! "list", ! "stub", ! "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", "6-tensor", ! "3D-mask-sym-tensor", "3Dmasksymtensor", "7-tensor", ! "3D-tensor", "3Dtensor", "9-tensor", ! "3D-mask-tensor", "3Dmasktensor", ! "" ! }; ! ! int ! _nrrdKindVal_Eqv[] = { ! nrrdKindDomain, ! nrrdKindList, ! nrrdKindStub, ! nrrdKindScalar, ! nrrdKindComplex, ! nrrdKind2Vector, ! nrrdKind3Color, nrrdKind3Color, ! nrrdKind4Color, nrrdKind4Color, ! nrrdKind3Vector, nrrdKind3Vector, ! nrrdKind3Normal, nrrdKind3Normal, ! nrrdKind4Vector, nrrdKind4Vector, ! nrrdKind2DSymTensor, nrrdKind2DSymTensor, ! nrrdKind2DMaskedSymTensor, nrrdKind2DMaskedSymTensor, ! nrrdKind2DTensor, nrrdKind2DTensor, ! nrrdKind2DMaskedTensor, nrrdKind2DMaskedTensor, ! nrrdKind3DSymTensor, nrrdKind3DSymTensor, nrrdKind3DSymTensor, ! nrrdKind3DMaskedSymTensor, nrrdKind3DMaskedSymTensor, ! nrrdKind3DMaskedSymTensor, ! nrrdKind3DTensor, nrrdKind3DTensor, nrrdKind3DTensor, ! nrrdKind3DMaskedTensor, nrrdKind3DMaskedTensor }; airEnum ! _nrrdKind_enum = { ! "kind", ! NRRD_KIND_MAX, ! _nrrdKindStr, NULL, ! _nrrdKindDesc, ! _nrrdKindStr_Eqv, _nrrdKindVal_Eqv, ! AIR_FALSE }; airEnum * ! nrrdKind = &_nrrdKind_enum; ! /* ------------------------ nrrdField ------------------------- */ *************** *** 335,338 **** --- 429,433 ---- "axis maxs", "centers", + "kinds", "labels", "units", *************** *** 363,366 **** --- 458,462 ---- "list of maximum positions associated with each axis", "list of sample centerings for each axis", + "list of kinds for each axis", "list of short descriptions for each axis", "list of units in which each axes' spacing is measured", *******... [truncated message content] |
|
From: Gordon K. <kin...@us...> - 2004-05-26 11:09:46
|
Update of /cvsroot/teem/teem/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30477 Modified Files: GNUmakefile Log Message: added -rpath for linking executables with shared libraries on irix and linux, and -install_name for making dylibs on darwin Index: GNUmakefile =================================================================== RCS file: /cvsroot/teem/teem/src/GNUmakefile,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** GNUmakefile 26 May 2004 02:29:46 -0000 1.54 --- GNUmakefile 26 May 2004 11:09:34 -0000 1.55 *************** *** 187,191 **** ## ifneq (undefined,$(origin TEEM_LINK_SHARED)) ! BIN_CFLAGS += $(SHARED_CFLAG) else BIN_CFLAGS += $(STATIC_CFLAG) --- 187,193 ---- ## ifneq (undefined,$(origin TEEM_LINK_SHARED)) ! # If we ever have absolutify-this-path working, then having an ! # absolute TEEM_DEST path is no longer a pre-requisite ! BIN_CFLAGS += $(SHARED_CFLAG) $(if $(TEEM_DEST),$(if $(SHARED_RPATH),$(SHARED_RPATH)$(LDEST),),) else BIN_CFLAGS += $(STATIC_CFLAG) |
|
From: Gordon K. <kin...@us...> - 2004-05-26 11:09:46
|
Update of /cvsroot/teem/teem/src/make In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30477/make Modified Files: darwin.mk irix6.mk linux.mk template.mk Log Message: added -rpath for linking executables with shared libraries on irix and linux, and -install_name for making dylibs on darwin Index: darwin.mk =================================================================== RCS file: /cvsroot/teem/teem/src/make/darwin.mk,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** darwin.mk 26 May 2004 02:31:49 -0000 1.9 --- darwin.mk 26 May 2004 11:09:35 -0000 1.10 *************** *** 32,37 **** SHARED_CFLAG = SHARED_LDFLAG = -dynamic -dynamiclib -fno-common ! # there is a space at the end of the following! ! SHARED_LINK_NAME = -install_name ARCH_CFLAG = -Wall --- 32,36 ---- SHARED_CFLAG = SHARED_LDFLAG = -dynamic -dynamiclib -fno-common ! SHARED_INSTALL_NAME = -install_name ARCH_CFLAG = -Wall Index: irix6.mk =================================================================== RCS file: /cvsroot/teem/teem/src/make/irix6.mk,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** irix6.mk 18 Sep 2003 05:32:21 -0000 1.20 --- irix6.mk 26 May 2004 11:09:35 -0000 1.21 *************** *** 21,25 **** --- 21,27 ---- TEEM_LITTER = so_locations TEEM_SHEXT = so + SHARED_LINK_NAME = -rpath TEEM_CPP_ERROR_DIE = -diag_error 1035 + SHARED_RPATH = -rpath OPT_CFLAG ?= -O2 Index: template.mk =================================================================== RCS file: /cvsroot/teem/teem/src/make/template.mk,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** template.mk 26 May 2004 02:36:04 -0000 1.20 --- template.mk 26 May 2004 11:09:35 -0000 1.21 *************** *** 120,130 **** ifdef TEEM_SHEXT $(ODEST)/lib$(L).$(TEEM_SHEXT) : $(call objs.dev,$(L)) ! $(LD) -o $@ \ ! $(if $(TEEM_DEST),$(if $(SHARED_LINK_NAME),$(SHARED_LINK_NAME)$(TEEM_DEST)/lib/lib$(_L).$(TEEM_SHEXT),),) $(LDFLAGS) $(LPATH) $^ $(call link,$(call need,$(_L))) $(call xtern.Lpath,$($(_L).meneed)) $(call xtern.link,$($(_L).meneed)) endif ## comments on madness above: ! ## - if both TEEM_DEST and (architecture-specific) SHARED_LINK_NAME are set, ! ## then add SHARED_LINK_NAME flag to the link command making the shared lib ## - ... $(LDFLAGS) $(LPATH) ... ## - all architectures: add "-l<lib>" for all <lib> that this lib relies on --- 120,129 ---- ifdef TEEM_SHEXT $(ODEST)/lib$(L).$(TEEM_SHEXT) : $(call objs.dev,$(L)) ! $(LD) -o $@ $(if $(TEEM_DEST),$(if $(SHARED_INSTALL_NAME), $(SHARED_INSTALL_NAME) $(TEEM_DEST)/lib/lib$(_L).$(TEEM_SHEXT),),) $(LDFLAGS) $(LPATH) $^ $(call link,$(call need,$(_L))) $(call xtern.Lpath,$($(_L).meneed)) $(call xtern.link,$($(_L).meneed)) endif ## comments on madness above: ! ## - if both TEEM_DEST and (architecture-specific) SHARED_INSTALL_NAME are set, ! ## then add SHARED_INSTALL_NAME flag to the link command making the shared lib ## - ... $(LDFLAGS) $(LPATH) ... ## - all architectures: add "-l<lib>" for all <lib> that this lib relies on Index: linux.mk =================================================================== RCS file: /cvsroot/teem/teem/src/make/linux.mk,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** linux.mk 26 May 2004 02:34:36 -0000 1.25 --- linux.mk 26 May 2004 11:09:35 -0000 1.26 *************** *** 25,30 **** SHARED_CFLAG = -Wl,-Bdynamic SHARED_LDFLAG = -shared ! # there is no space at the end of the following! ! SHARED_LINK_NAME = -Wl,-rpath -Wl, TEEM_ENDIAN = 1234 --- 25,29 ---- SHARED_CFLAG = -Wl,-Bdynamic SHARED_LDFLAG = -shared ! SHARED_RPATH = -Wl,-rpath -Wl, TEEM_ENDIAN = 1234 |
|
From: Gordon K. <kin...@us...> - 2004-05-26 02:36:14
|
Update of /cvsroot/teem/teem/src/make In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17640/make Modified Files: template.mk Log Message: transitive linking on shared libraries Index: template.mk =================================================================== RCS file: /cvsroot/teem/teem/src/make/template.mk,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** template.mk 27 Jul 2003 09:31:20 -0000 1.19 --- template.mk 26 May 2004 02:36:04 -0000 1.20 *************** *** 53,56 **** --- 53,63 ---- $(L)/% : _L := $(L) + ## added this to enable _L when the target is not explicitly a library + ## but, for example, an individually named binary. This may subsume the + ## the definition above, but it doesn't hurt to have both. + ## + $(call libs.inst,$(L)) : _L := $(L) + + ## not sure why these are needed- version 3.78.1 on a solaris box ## definately needed the last one, while others didn't *************** *** 113,119 **** ifdef TEEM_SHEXT $(ODEST)/lib$(L).$(TEEM_SHEXT) : $(call objs.dev,$(L)) ! $(LD) -o $@ $(LDFLAGS) $(LPATH) $^ endif ## maybebanner.(L)(obj) returns "echo ..." to show a library banner ## progress indicator, but only if obj is the first object in $(L).OBJS. --- 120,135 ---- ifdef TEEM_SHEXT $(ODEST)/lib$(L).$(TEEM_SHEXT) : $(call objs.dev,$(L)) ! $(LD) -o $@ \ ! $(if $(TEEM_DEST),$(if $(SHARED_LINK_NAME),$(SHARED_LINK_NAME)$(TEEM_DEST)/lib/lib$(_L).$(TEEM_SHEXT),),) $(LDFLAGS) $(LPATH) $^ $(call link,$(call need,$(_L))) $(call xtern.Lpath,$($(_L).meneed)) $(call xtern.link,$($(_L).meneed)) endif + ## comments on madness above: + ## - if both TEEM_DEST and (architecture-specific) SHARED_LINK_NAME are set, + ## then add SHARED_LINK_NAME flag to the link command making the shared lib + ## - ... $(LDFLAGS) $(LPATH) ... + ## - all architectures: add "-l<lib>" for all <lib> that this lib relies on + ## - all architectures: add -L<path> and -l<lib> for external libraries that + ## this library could depend on + ## maybebanner.(L)(obj) returns "echo ..." to show a library banner ## progress indicator, but only if obj is the first object in $(L).OBJS. *************** *** 158,162 **** $(LDEST)/lib$(L).$(TEEM_SHEXT) : $(LDEST)/% : $(ODEST)/% $(CP) $< $@; $(CHMOD) 755 $@ - $(if $(RANLIB),$(RANLIB) $@,) $(if $(SIGH),$(SLEEP) $(SIGH); touch $@) endif --- 174,177 ---- |
|
From: Gordon K. <kin...@us...> - 2004-05-26 02:34:47
|
Update of /cvsroot/teem/teem/src/make In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17343/make Modified Files: linux.mk Log Message: perhaps got transitive linking on linux Index: linux.mk =================================================================== RCS file: /cvsroot/teem/teem/src/make/linux.mk,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** linux.mk 20 Dec 2003 07:57:35 -0000 1.24 --- linux.mk 26 May 2004 02:34:36 -0000 1.25 *************** *** 25,28 **** --- 25,30 ---- SHARED_CFLAG = -Wl,-Bdynamic SHARED_LDFLAG = -shared + # there is no space at the end of the following! + SHARED_LINK_NAME = -Wl,-rpath -Wl, TEEM_ENDIAN = 1234 |
|
From: Gordon K. <kin...@us...> - 2004-05-26 02:34:12
|
Update of /cvsroot/teem/teem/src/make In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17289/make Modified Files: externals.mk Log Message: typo in comments Index: externals.mk =================================================================== RCS file: /cvsroot/teem/teem/src/make/externals.mk,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** externals.mk 2 Oct 2003 17:42:05 -0000 1.13 --- externals.mk 26 May 2004 02:34:03 -0000 1.14 *************** *** 37,42 **** ## file is <zlib.h>. ## ! ## Arch-specific .mk files may need to set TEEM_ZLIB.IPATH and ! ## TEEM_ZLIB.LPATH to "-I<path>" and "-L<path>" for the compile and ## link lines, respectively. ZLIB.LINK = -lz --- 37,42 ---- ## file is <zlib.h>. ## ! ## Arch-specific .mk files may need to set TEEM_ZLIB_IPATH and ! ## TEEM_ZLIB_LPATH to "-I<path>" and "-L<path>" for the compile and ## link lines, respectively. ZLIB.LINK = -lz |
|
From: Gordon K. <kin...@us...> - 2004-05-26 02:32:50
|
Update of /cvsroot/teem/teem/src/make In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17105/make Modified Files: errorCheck.mk Log Message: added reasonable test on whether TEEM_DEST is an absolute path Index: errorCheck.mk =================================================================== RCS file: /cvsroot/teem/teem/src/make/errorCheck.mk,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** errorCheck.mk 20 Dec 2003 08:23:15 -0000 1.9 --- errorCheck.mk 26 May 2004 02:32:41 -0000 1.10 *************** *** 105,106 **** --- 105,115 ---- $(error Make quitting))) + checkTeemDest = $(if $(TEEM_DEST),\ + $(if $(filter-out /%,$(TEEM_DEST)),\ + $(warning *)\ + $(warning *)\ + $(warning * TEEM_DEST must be an absolute path (not $(TEEM_DEST)))\ + $(warning *)\ + $(warning *)\ + $(error Make quitting)\ + ),) |
|
From: Gordon K. <kin...@us...> - 2004-05-26 02:31:58
|
Update of /cvsroot/teem/teem/src/make In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16934/make Modified Files: darwin.mk Log Message: added ability to make shared (.dylib) libraries Index: darwin.mk =================================================================== RCS file: /cvsroot/teem/teem/src/make/darwin.mk,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** darwin.mk 18 Sep 2003 05:32:21 -0000 1.8 --- darwin.mk 26 May 2004 02:31:49 -0000 1.9 *************** *** 20,24 **** # we'll figure out shared libraries eventually... ! TEEM_SHEXT = AR = libtool --- 20,24 ---- # we'll figure out shared libraries eventually... ! TEEM_SHEXT = dylib AR = libtool *************** *** 26,33 **** RANLIB = ranlib OPT_CFLAG ?= -O2 STATIC_CFLAG = SHARED_CFLAG = ! SHARED_LDFLAG = ARCH_CFLAG = -Wall ARCH_LDFLAG = --- 26,38 ---- RANLIB = ranlib + LD = gcc + OPT_CFLAG ?= -O2 STATIC_CFLAG = SHARED_CFLAG = ! SHARED_LDFLAG = -dynamic -dynamiclib -fno-common ! # there is a space at the end of the following! ! SHARED_LINK_NAME = -install_name ! ARCH_CFLAG = -Wall ARCH_LDFLAG = |