diff -Naur volpack-1.0b3/examples/Makefile volpack-1.0b3-ijt-mods/examples/Makefile --- volpack-1.0b3/examples/Makefile Wed Dec 31 16:00:00 1969 +++ volpack-1.0b3-ijt-mods/examples/Makefile Wed Mar 2 22:35:02 2005 @@ -0,0 +1,117 @@ +# Generated automatically from Makefile.in by configure. +# +# Makefile for VolPack example programs. If it has the name "Makefile.in" +# then it is a template for a Makefile; to generate the actual Makefile, +# run "./configure", which is a configuration script generated by the +# "autoconf" program (constructs like "@foo@" will get replaced in the +# actual Makefile). +# +# Copyright (c) 1994 The Board of Trustees of The Leland Stanford +# Junior University. All rights reserved. +# +# Permission to use, copy, modify and distribute this software and its +# documentation for any purpose is hereby granted without fee, provided +# that the above copyright notice and this permission notice appear in +# all copies of this software and that you do not sell the software. +# Commercial licensing is available by contacting the author. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# Author: +# Phil Lacroute +# Computer Systems Laboratory +# Electrical Engineering Dept. +# Stanford University +# + +# shell to use for executing make commands +SHELL = /bin/sh + +########################################################################### +# Options that can be changed by the user. +########################################################################### + +# ANSI-C prototypes: use the first line to let the #ifdef's in +# volpack.h guess if your compiler supports prototypes, use the +# second line to disable prototypes, or use the third line to +# enable prototypes +PROTO_FLAG = +#PROTO_FLAG = -DNO_PROTOTYPE +#PROTO_FLAG = -DANSI_C + +# optional compiler flags: use the first line for full optimization +# (configure will try to choose flags for your system), or use the +# second for no optimization; the other lines are for various levels +# of debugging +CCOPT_FLAGS = $(OFLAGS) +#CCOPT_FLAGS = +#CCOPT_FLAGS = -DASSERTIONS -Wall -g + +# directory containing volpack +VOLPACK = .. + +# include files for volpack +VPINCL = -I$(VOLPACK) + +# library for volpack +VPLIB = $(VOLPACK)/libvolpack.a + +########################################################################### +# Options that are changed by the configure script. These should +# probably not be editted by hand. +########################################################################### + +# pathname for the C compiler +CC = cc + +# compiler options +AC_FLAGS = -DHAVE_CONFIG_H + +# system-dependent options based on system name passed to configure; +# this macro is for options that should always be included (even for +# compiles with optimization turned off); configure can fill +# this in automatically if you supply a recognized system name +MFLAGS = + +# system-dependent options based on system name passed to configure; +# this macro is for optimization options only; configure can fill +# this in automatically if you supply a recognized system name +OFLAGS = + +########################################################################### +# Nothing beyond this point should need to be changed by the user. +########################################################################### + +CFLAGS = -I. ${VPINCL} ${AC_FLAGS} ${CCOPT_FLAGS} ${MFLAGS} ${PROTO_FLAG} +LIBS = ${VPLIB} -lm + +all: makevolume makeoctree classifyvolume rendervolume scalevolume + +makevolume: makevolume.c volume.h $(VPLIB) + $(CC) -o makevolume $(CFLAGS) makevolume.c $(LIBS) + +makeoctree: makeoctree.c volume.h $(VPLIB) + $(CC) -o makeoctree $(CFLAGS) makeoctree.c $(LIBS) + +classifyvolume: classifyvolume.c volume.h $(VPLIB) + $(CC) -o classifyvolume $(CFLAGS) classifyvolume.c $(LIBS) + +rendervolume: rendervolume.c volume.h $(VPLIB) + $(CC) -o rendervolume $(CFLAGS) rendervolume.c $(LIBS) + +scalevolume: scalevolume.c denfile.c $(VPLIB) + $(CC) -o scalevolume $(CFLAGS) scalevolume.c denfile.c $(LIBS) + +checkin: + ci -l -f classifyvolume.c makeoctree.c makevolume.c \ + rendervolume.c scalevolume.c denfile.c volume.h \ + Makefile.in test.csh test.out README + +clean: + rm -f makevolume makeoctree classifyvolume rendervolume scalevolume + rm -f scalevolume.o denfile.o + rm -f brainsmall.rv brainsmall.oct brainsmall.cv brainsmall.ppm + rm -f brainsmall1.ppm brainsmall2.ppm + rm -f brainsmall3.ppm brainsmall4.ppm diff -Naur volpack-1.0b3/examples/classifyvolume.c volpack-1.0b3-ijt-mods/examples/classifyvolume.c --- volpack-1.0b3/examples/classifyvolume.c Sat Dec 31 11:53:04 1994 +++ volpack-1.0b3-ijt-mods/examples/classifyvolume.c Wed Mar 2 22:17:48 2005 @@ -28,6 +28,7 @@ * $Revision: 1.5 $ */ +#include #include "volume.h" main(argc, argv) diff -Naur volpack-1.0b3/examples/denfile.c volpack-1.0b3-ijt-mods/examples/denfile.c --- volpack-1.0b3/examples/denfile.c Thu Dec 15 10:12:05 1994 +++ volpack-1.0b3-ijt-mods/examples/denfile.c Wed Mar 2 22:17:52 2005 @@ -5,6 +5,7 @@ * See the file dencopy.c for sample usage. */ +#include #include #ifndef MIN diff -Naur volpack-1.0b3/examples/makeoctree.c volpack-1.0b3-ijt-mods/examples/makeoctree.c --- volpack-1.0b3/examples/makeoctree.c Sat Dec 31 11:53:05 1994 +++ volpack-1.0b3-ijt-mods/examples/makeoctree.c Wed Mar 2 22:17:56 2005 @@ -28,6 +28,7 @@ * $Revision: 1.5 $ */ +#include #include "volume.h" main() diff -Naur volpack-1.0b3/examples/makevolume.c volpack-1.0b3-ijt-mods/examples/makevolume.c --- volpack-1.0b3/examples/makevolume.c Sat Dec 31 11:53:06 1994 +++ volpack-1.0b3-ijt-mods/examples/makevolume.c Wed Mar 2 22:18:00 2005 @@ -28,6 +28,7 @@ * $Revision: 1.5 $ */ +#include #include "volume.h" main() diff -Naur volpack-1.0b3/examples/rendervolume.c volpack-1.0b3-ijt-mods/examples/rendervolume.c --- volpack-1.0b3/examples/rendervolume.c Sat Dec 31 16:06:26 1994 +++ volpack-1.0b3-ijt-mods/examples/rendervolume.c Wed Mar 2 22:24:23 2005 @@ -28,11 +28,12 @@ * $Revision: 1.5 $ */ +#include #include "volume.h" -main(argc, argv) -int argc; -char **argv; +void StorePGM(unsigned char* image, int width, int height, char* filename); + +int main(int argc, char* argv[]) { vpContext *vpc; /* rendering context */ int volume_fd; /* file descriptor for volume (input) */ @@ -193,7 +194,7 @@ strcpy(filename, "brainsmall.ppm"); else sprintf(filename, "brainsmall_%d.ppm", n + 1000); - StorePGM(image, IMAGE_WIDTH, IMAGE_HEIGHT, filename); + StorePGM(&image[0][0], IMAGE_WIDTH, IMAGE_HEIGHT, filename); /* rotate by 5 degrees for next image */ vpRotate(vpc, VP_Y_AXIS, 5.0); @@ -202,10 +203,7 @@ return(0); } -StorePGM(image, width, height, filename) -char *image; -int width, height; -char *filename; +void StorePGM(unsigned char* image, int width, int height, char* filename) { FILE *image_fp; /* file descriptor for image (output) */ diff -Naur volpack-1.0b3/examples/scalevolume.c volpack-1.0b3-ijt-mods/examples/scalevolume.c --- volpack-1.0b3/examples/scalevolume.c Sat Dec 31 11:53:08 1994 +++ volpack-1.0b3-ijt-mods/examples/scalevolume.c Wed Mar 2 22:18:08 2005 @@ -35,9 +35,11 @@ * $Revision: 1.1 $ */ +#include #include #include -#include +#include +// #include main(argc, argv) int argc; diff -Naur volpack-1.0b3/examples/volume.h volpack-1.0b3-ijt-mods/examples/volume.h --- volpack-1.0b3/examples/volume.h Sat Dec 31 11:53:09 1994 +++ volpack-1.0b3-ijt-mods/examples/volume.h Wed Mar 2 22:27:50 2005 @@ -30,6 +30,9 @@ #include #include +#include /* for malloc */ +#include +#include #define BRAIN_FILE "brainsmall.den" /* input file */ #define BRAIN_HEADER 62 /* bytes of header in file */ diff -Naur volpack-1.0b3/vp_global.h volpack-1.0b3-ijt-mods/vp_global.h --- volpack-1.0b3/vp_global.h Fri Dec 30 15:53:14 1994 +++ volpack-1.0b3-ijt-mods/vp_global.h Wed Mar 2 22:35:35 2005 @@ -36,7 +36,7 @@ #include "volpack.h" #include -#include +#include #include extern double rint ANSI_ARGS((double x)); /* missing from Ultrix math.h */