improj -- perform a geometric projection of a Box or Rotated Box on an Image
improj image region table x_bin y_bins
IMPROJ performs a geometric projection on an image file. It calculates the number of counts in each x-axis bin, integrated over the y-axis region (XPROJ), and the number of counts in each y-axis bin, integrated over the x-axis region (YPROJ). A rotation angle, a, may be specified, where a is the angle between the Y-axis of the PROJ and the Y-axis of the image, measured positive in a clockwise direction. Image pixels are either wholly in or wholly out of an XPROJ or YPROJ bin, so that for arbitrary a, the areas in bins may be unequal. The PROJ data are written to a table file in 4 columns; col 1 is XPROJ counts, col 2 is XPROJ effective area, col 3 is YPROJ counts, and col 4 is YPROJ effective area.
Processing for a proj within a field is relatively fast. Processing for a proj within a box is significantly slower. Because the latter projection uses a mask in memory to define the bins, it is limited to moderate numbers of bins or moderate sized boxes ((bins x height) < 100,000).
The regions specification of the proj must include 1 box or field, and may have any number of excluded regions. A field region covers the entire image (or image subsection). Field takes no arguments. A box region has four or five arguments: center x, center y, width height, and, optionally, a rotation angle (degrees counter-clockwise from up). The excluded regions can be of any geometric shape and are excluded from the projection. Excluded regions must be preceded by a "-". See the REGIONS help doc for more description about regions.
Name of the input image file to be read.
Box or field proj region along with any excluded regions
Name of the output table file to be created. The extension "_prj.tab" will be appended to a filename specified without an extension.
The number of projection bins in X. If 0 is input, defaults to region box or field width.
The number of projection bins in Y. If 0 is input, defaults to region box or field height.
Boolean flag specifying whether or not the output Table file can be overwritten, if it already exists.
Display info to screen. Integer of range 0-5. The higher the number, the more verbose the display.
1. Take a simple, orthogonal projection of a subsection of image foo and output it to table tfoo. The number of proj bins defaults to the subsection dimensions (300 in both x and y).
cl> improj "foo[201:500,1:300]" field tfoo 0 0
2. Get the geometric projection of the specified box region of image foo and output it to table tfoo. The number of proj bins in X is 20 and the number in Y is 20.
cl> improj foo "box(256,256,100,100,45)" tfoo 20 20
3. Same as example 2 but with an excluded box region of the image specified also. The area of the specified 10x10 box at the image center will not be included in the projection. The number of proj bins in X is 25 and in Y is 10.
cl> improj goo "rotbox(256,256,100,100,45); -box(256,256,10,10)" tgoo 25 10
The time required to run this task is related to the dimensions of the input image, and the number of bins requested.
No known bugs.
Documentation on region filtering (help regions ) for a description of the spatial filter user interface.
Documentation on QPOE filtering (help qpoe ) for a description of the QPOE filter user interface.
Documentation on file extensions (help extensions ) for a description of PROS file extensions.
Documentation on coordinates (help coords ) for a description of PROS coordinate conventions.
Documentation on the tvproj task (help tvproj ) for a description of how to display an image projection plot over an image.