diff options
author | Thomas White <taw@physics.org> | 2010-09-17 22:52:43 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:26:57 +0100 |
commit | 7c1c0ae062d408b7d0abb2811e00d920d8cdd41e (patch) | |
tree | fc93a3b955144f54eb98eb8ce65fc2f0d70d07f1 | |
parent | a3d2a679a10eb2a1ef2ad8d93722c9415fb29d45 (diff) |
cubeit: Write out different boost factors
-rw-r--r-- | src/cubeit.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cubeit.c b/src/cubeit.c index d08d30aa..79243293 100644 --- a/src/cubeit.c +++ b/src/cubeit.c @@ -188,7 +188,7 @@ static void interpolate_onto_grid(double *vals, double v, static void write_slice(const char *filename, double *vals, int z, - int xs, int ys, int zs) + int xs, int ys, int zs, double boost) { #ifdef HAVE_LIBPNG FILE *fh; @@ -202,8 +202,6 @@ static void write_slice(const char *filename, double *vals, int z, w = xs; h = ys; - if ( max <= 6 ) { max = 10; } - for ( y=0; y<h; y++ ) { for ( x=0; x<w; x++ ) { @@ -250,7 +248,7 @@ static void write_slice(const char *filename, double *vals, int z, row_pointers = malloc(h*sizeof(png_bytep *)); /* Write the image data */ - max /= 1.0; + max /= boost; if ( max <= 6 ) { max = 10; } for ( y=0; y<h; y++ ) { @@ -466,8 +464,11 @@ int main(int argc, char *argv[]) for ( i=0; i<gs; i++ ) { char line[64]; + float boost; snprintf(line, 63, "slice-%i.png", i); - write_slice(line, vals, i, gs, gs, gs); + for ( boost=1; boost<1000; boost+=50 ) { + write_slice(line, vals, i, gs, gs, gs, boost); + } } if ( config_angles ) { |