| 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"); |
| 347 |
< |
if (checkheader(octfp, fmt, stdout) < 0) |
| 348 |
< |
error(USER, "bad octree header"); |
| 349 |
< |
fclose(octfp); |
| 354 |
> |
newheader("RADIANCE", stdout); |
| 355 |
> |
fputs(myRTmanager.GetHeader(), stdout); |
| 356 |
|
printargs(i, argv, stdout); |
| 357 |
|
printf("SOFTWARE= %s\n", VersionID); |
| 358 |
|
fputnow(stdout); |
| 361 |
|
if ((outform == 'f') | (outform == 'd')) |
| 362 |
|
fputendian(stdout); |
| 363 |
|
fputformat(formstr(outform), stdout); |
| 364 |
< |
putchar('\n'); |
| 364 |
> |
fputc('\n', stdout); /* end of header */ |
| 365 |
|
} |
| 366 |
|
rtrace(NULL, nproc); /* trace rays */ |
| 367 |
|
quit(0); /* clean up & exit */ |