ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/getinfo.1
Revision: 1.10
Committed: Mon Mar 21 00:21:13 2022 UTC (3 years, 2 months ago) by greg
Branch: MAIN
Changes since 1.9: +16 -1 lines
Log Message:
feat(getinfo): Added getinfo -r option (similar to -a but with remove/replace)

File Contents

# User Rev Content
1 greg 1.10 .\" RCSid "$Id: getinfo.1,v 1.9 2019/07/16 17:07:35 greg Exp $"
2 greg 1.1 .TH GETINFO 1 1/15/99 RADIANCE
3     .SH NAME
4     getinfo - get header information from a RADIANCE file
5     .SH SYNOPSIS
6     .B getinfo
7     [
8     .B -d
9 greg 1.9 |
10     .B +d
11 greg 1.1 ][
12     .B "file .."
13     ]
14     .br
15     .B getinfo
16 greg 1.8 [
17     .B -d
18     ]
19 greg 1.1 -
20 greg 1.6 .br
21     .B getinfo
22 greg 1.10 {
23 greg 1.7 .B -a
24 greg 1.10 |
25     .B -r
26     }
27 greg 1.7 .B "info_line1 .."
28     .br
29     .B getinfo
30 greg 1.8 [
31     .B -d
32 greg 1.9 |
33     .B +d
34 greg 1.8 ]
35 greg 1.6 .B -c
36     .B "command .."
37 greg 1.1 .SH DESCRIPTION
38     .I Getinfo
39     reads the header of each RADIANCE
40     .I file
41     and writes it to the standard output.
42     Octree and picture files are in a binary format, which makes
43     it difficult to determine their content.
44     Therefore, a few lines of text are placed at the beginning
45     of each file by the RADIANCE program that creates it.
46     The end of the header information and the start of the
47     data is indicated by an empty line.
48     The
49     .I \-d
50     option can be used to print the dimensions of an octree or
51     picture file instead.
52     For an octree,
53     .I "getinfo \-d"
54     prints the bounding cube (xmin ymin zmin size).
55     For a picture,
56     .I "getinfo \-d"
57 greg 1.4 prints the y and x resolution (\-Y yres +X xres).
58 greg 1.9 The
59     .I \+d
60     option prints the header followed by a newline and the dimensions.
61 greg 1.1 If no
62     .I file
63     is given, the standard input is read.
64     .PP
65 greg 1.6 The second form of
66     .I getinfo
67     with a hyphen simply removes the header
68 greg 1.1 and copies the body of the file from the standard
69     input to the standard output.
70 greg 1.8 If the
71     .I \-d
72 greg 1.9 option is given, then the resolution string will be elided as well.
73 greg 1.6 .PP
74     The third form of
75 greg 1.7 .I "getinfo \-a"
76     adds one or more header lines to the standard input.
77     These lines are given as arguments to
78     .I getinfo,
79     and must be quoted if they contain spaces.
80 greg 1.10 The alternative form with
81     .I \-r
82     replaces any previous occurances of the settings in the given
83     line(s) with nothing if there is only one word, or with
84     the whole line if quoted and containing interior white space or
85     an equals sign ('=').
86 greg 1.7 .PP
87     The fourth form of
88 greg 1.6 .I "getinfo \-c"
89     is followed by a command and its arguments, which is executed
90     on the data segment of the standard input.
91     The header is passed along, with the addition of the command
92     at the end.
93     This is roughly equivalent to the following sequence, but does not
94     require the input to be in a file:
95     .IP "" .2i
96     ( getinfo < input ; getinfo - < input | command .. )
97 greg 1.8 .PP
98     If the
99 greg 1.9 .I \+d
100     option is given with
101     .I \-c,
102     then the resolution string will be copied before the command is called.
103     If the
104 greg 1.8 .I \-d
105 greg 1.9 option is given, then the resolution string is read in but not copied.
106     .SH EXAMPLES
107 greg 1.5 To print the header information from scene1.oct and scene2.hdr:
108 greg 1.1 .IP "" .2i
109 greg 1.5 getinfo scene1.oct scene2.hdr
110 greg 1.9 .PP
111     To print the dimensions of a set of pictures:
112     .IP "" .2i
113     getinfo -d *.hdr
114     .PP
115     To add two header lines modifying the view
116     and exposure calibration of a picture:
117     .IP "" .2i
118     getinfo -a "VIEW= -vta -vh 180 -vv 180" "EXPOSURE=1.5" < orig.hdr > modified.hdr
119     .PP
120 greg 1.10 To remove any indented lines containing "EXPOSURE=" and replace any
121     left-justified "EXPOSURE=" lines with a single value of 16:
122     .IP "" .2i
123     getinfo -r " EXPOSURE=" "EXPOSURE=16" < orig.hdr > fixed.hdr
124     .PP
125 greg 1.9 To raise floating-point matrix elements to a power of 2.7:
126     .IP "" .2i
127     getinfo -c rcalc -if -of -e '$1=$1^2.7' < input.fmx > output.fmx
128 greg 1.1 .SH AUTHOR
129     Greg Ward
130     .SH "SEE ALSO"
131 greg 1.8 oconv(1), pfilt(1), rcalc(1), rhinfo(1), rpict(1), rsplit(1), rtrace(1), rvu(1)