/* ************************************************************************ !F77 !DESCRIPTION: Computes reflectance or brightness temperature differences between the (center) pixel of interest and the surrounding eight pixel values. !Input parameters: None Inputs stored in structure variable 'pxin' of type "pixel_in" defined in pixel.h !Output Parameters: None Outputs stored in structure variable 'rg_var' of type "regional_var" defined in pixel.h !Revision History: Converted to C 11/07 R. Frey !Team-unique Header: !References and Credits: See Cloud Mask ATBD !END ***********************************************************************/ /* Includes */ #include #include #include "mask_processing_constants.h" #include "pixel.h" #include "granule.h" void get_regdif(int band) { /* Declarations */ int center_line; int center_pix; int imve; int imvl; int nl; int ne; int idx; long int j, ide; float center_val; float surr_val; /* Initializations */ // printf("Executing get_regdif \n"); imve = 1; imvl = 1; center_line = (nlcntx / 2) + 1; center_pix = (necntx / 2) + 1; /**********************************************************************/ // Get differences about pixel of interest for input band. center_val = pxin.rad[band-1]; // printf("center_val %f \n", center_val); idx = 0; for ( nl=0; nl