NAMEhtrdr-image - format of the images generated by htrdr(1)
The htrdr-image is a raw image file format where data are stored in plain text. Characters after the # character are considered as comments and are thus ignored as well as empty lines. The first valid line stores 2 unsigned integers that represent the image definition, i.e. the number of pixels per line and per column. Then each line stores 8 pixel components.
If the image is a regular rendering in the visible part of the spectrum (-C camera and -s cie_xyz options in htrdr(1)), the pixel components are actually 4 pairs of floating points data representing the pixel color encoded in the CIE 1931 XYZ color space and the per radiative path computation time. The first, second and third pairs encode the estimated integrated radiance in W/sr/m^2 of the X, Y and Z pixel components, respectively. The first value of each pair is the expected value of the estimated radiance while the second one is its associated standard deviation. The fourth pair saves the estimate in microseconds of the per radiative path computation time and its standard error.
If the image is an infrared rendering (-C camera and -s lw=wlen-min,wlen_max options in htrdr(1)), the first and second pixel components store the expected value and the standard error, respectively, of the estimated brightness temperature in Kelvin. The third and fourth components save the expected value and standard deviation of the pixel radiance that is either an integrated radiance in W/sr/m2 or a spectral radiance in W/sr/m2/nm whether this radiance is computed for a spectral range or for one wavelength. The fifth and sixth pixel components are unused. Finally the last 2 pixel components save, as for a regular rendering, the estimate in microseconds of the per radiative path computation time and its standard error.
If it was generating from a shortwave rendering (-C camera and -s sw=wlen-min,wlen-max_ options in htrdr(1)) the image is formatted as in longwave rendering mode exepted that the first and second pixel components are unused since no brightness temperature was evaluated in shortwave.
For flux computations (-p rectangle option in htrdr(1)), the first and second pixel component stores the expected value and the standard error of the pixel flux in W/m^2 for the part of the pixel that is outside any geometry. As previously, the seventh and eighth pixel components store the estimate of the radiative path computation time in microseconds and its standard error. The remaining components, i.e. the components 3 to 6, are unused.
Pixels are sorted line by line, with the origin defined at the top left corner of the image. With an image definition of N by M pixels, with N the number of pixels per line and M the overall number of lines in the image, the first N pixels correspond to the pixels of the top line of the image, the following N pixels are the pixels of the second line and so on.
Note that the htpp(1) program can be used to convert an htrdr-image into a regular PPM image .
<htrdr-image> ::= <definition> <pixel> [ <pixel> ... ] <definition> ::= <width> <height> <width> ::= INTEGER <height> ::= INTEGER <pixel> ::= <pixel-sw> | <pixel-lw> <pixel-sw> ::= <X> <Y> <Z> <time> <pixel-lw> ::= <temperature> <radiance> 0 0 <time> <X> ::= <estimate> <Y> ::= <estimate> <Z> ::= <estimate> <time> ::= <estimate> <temperature> ::= <estimate> <radiance> ::= <estimate> <estimate> ::= <expected-value> <standard-error> <expected-value> ::= REAL <standard-error> ::= REAL
The following output was produced by htrdr(1) invoked to render an image of 800 by 600 pixels. Note that actually the comments and blank lines were not necessarily written by htrdr(1); they are used here only to help the reader understand the data layout. The comment after each pixel gives the two-dimensional index of the pixel in the image: the first and second integer is the index of the line and the column of the pixel in the image, respectively.
800 600 # Image definition # Pixels of the 1st line 2.55e-4 2.90e-5 3.75e-4 4.48e-5 3.20e-4 3.16e-5 306.484 259.723 # (1,1) 2.95e-4 3.37e-5 3.39e-4 4.16e-5 3.38e-4 4.60e-5 18.3633 2.66317 # (2,1) 3.76e-4 5.43e-5 3.13e-4 3.48e-5 3.38e-4 3.32e-5 19.6252 2.67015 # (3,1) ... 7.13e-4 1.14e-4 7.66e-4 1.35e-4 7.97e-4 1.26e-4 119.820 93.7820 # (799,1) 6.59e-4 1.14e-4 7.47e-4 1.41e-4 4.39e-4 7.33e-5 24.8655 2.46348 # (800,1) # Pixels of the 2nd line 3.33e-4 6.02e-5 4.21e-4 7.66e-5 3.44e-4 3.81e-5 19.4580 2.50692 # (1,2) 3.50e-4 4.93e-5 3.23e-4 2.52e-5 3.03e-4 2.42e-5 102.566 81.2936 # (2,2) 2.72e-4 4.69e-5 3.41e-4 4.12e-5 2.52e-4 2.06e-5 25.5801 5.37736 # (3,2) ... 7.52e-4 1.31e-4 8.91e-4 1.84e-4 5.48e-4 1.30e-4 46.5418 12.4728 # (799,2) 6.82e-4 1.42e-4 6.61e-4 7.85e-5 4.44e-4 5.99e-5 59.8728 32.1468 # (800,2) ... # Pixels of the 600th line 2.69e-4 7.44e-5 2.31e-4 2.56e-5 1.95e-4 2.30e-5 43.8242 15.0047 # (1,600) 4.32e-4 1.25e-4 2.22e-4 2.22e-5 2.04e-4 2.60e-5 25.5498 1.73942 # (2,600) 2.78e-4 5.81e-5 2.75e-4 4.99e-5 2.17e-4 3.30e-5 38.4448 7.16199 # (3,600) ... 3.54e-4 4.32e-5 3.07e-4 3.80e-5 2.38e-4 2.49e-5 102.893 36.9865 # (799,600) 3.07e-4 2.61e-5 4.60e-4 1.13e-4 2.69e-4 4.29e-5 42.75070 11.913 # (800,600)
- 1. Portable PixMap - http://netpbm.sourceforge.net/doc/ppm.html