c_recalc_pixel_size - Recalculates the pixel distance of an image before it was rotated or sheared

SYNTAX

#include "las.h"

int c_recalc_pixel_size

(
    double              *pixel_y,
    double              *pixel_x, 
    double              upleft_y,
    double              loleft_y,
    double              loright_y,   
    double              upleft_x,
    double              loleft_x,
    double              loright_x,
    int                 nl,
    int                 ns
)

PARAMETERS

pixel_y (input/output, double)

Pixel size in the y direction.

pixel_x (input/output, double)

Pixel size in the x direction.

upleft_y (input, double)

Upper left corner of image in y direction.

loleft_y (input, double)

Lower left corner of image in y direction.

loright_y (input, double)

Lower right corner of image in y direction.

upleft_x (input, double)

Upper left corner of image in x direction.

loleft_x (input, double)

Lower left corner of image in x direction.

loright_x (input, double)

Lower right corner of image in x direction.

nl (input, integer)

Total number of lines in the image.

ns (input, integer)

Total number of samples in the image.

DESCRIPTION

The c_recalc_pixel_size() call first double checks the number of lines 
and number of samples.  If either the lines or samples are less than or equal 
to 1, then E_FAIL is returned.

To calculate the pixel size the rotated angles of the projected image are 
calculated first. The projection on the y axis and x axis are figured next.  
Finally, the pixel sizes are calculated for the y and x direction.

RETURN VALUE

c_recalc_pixel_size() returns

     E_SUCC (0)  -->  successful completion
     E_FAIL (-1) -->  operation failed

LIMITATIONS

c_recalc_pixel_size requires that the image has more than one line and sample.