299 |
|
goto badopt; |
300 |
|
} |
301 |
|
} |
302 |
+ |
/* set/check spectral sampling */ |
303 |
+ |
rval = setspectrsamp(CNDX, WLPART); |
304 |
+ |
if (rval < 0) |
305 |
+ |
error(USER, "unsupported spectral sampling"); |
306 |
+ |
if (out_prims != NULL) { |
307 |
+ |
if (!rval) |
308 |
+ |
error(WARNING, "spectral range incompatible with color output"); |
309 |
+ |
} else if (NCSAMP == 3) |
310 |
+ |
out_prims = stdprims; /* 3 samples do not a spectrum make */ |
311 |
|
/* set up signal handling */ |
312 |
|
sigdie(SIGINT, "Interrupt"); |
313 |
|
#ifdef SIGHUP |
351 |
|
if (outform != 'a') |
352 |
|
SET_FILE_BINARY(stdout); |
353 |
|
if (doheader) { /* print header? */ |
354 |
< |
static char fmt[] = OCTFMT; |
355 |
< |
FILE * octfp = fopen(argv[i], "rb"); |
356 |
< |
if (checkheader(octfp, fmt, stdout) < 0) |
348 |
< |
error(USER, "bad octree header"); |
349 |
< |
fclose(octfp); |
354 |
> |
newheader("RADIANCE", stdout); |
355 |
> |
const char * ohdr = myRTmanager.GetHeader(); |
356 |
> |
if (ohdr) fputs(ohdr, stdout); |
357 |
|
printargs(i, argv, stdout); |
358 |
|
printf("SOFTWARE= %s\n", VersionID); |
359 |
|
fputnow(stdout); |
362 |
|
if ((outform == 'f') | (outform == 'd')) |
363 |
|
fputendian(stdout); |
364 |
|
fputformat(formstr(outform), stdout); |
365 |
< |
putchar('\n'); |
365 |
> |
fputc('\n', stdout); /* end of header */ |
366 |
|
} |
367 |
|
rtrace(NULL, nproc); /* trace rays */ |
368 |
|
quit(0); /* clean up & exit */ |