// file: $USFS/class/image_analysis/v1.0/imaga_fract_04.cc
//

// isip include files
//
#include "image_analysis.h"
#include "image_analysis_constants.h"

// method: fract_tri_cc
//
// arguments: none
//
// return: a logical_1 value indicating status
//
// this method computes the sides of the traingle
//
logical_1 Image_analysis::fract_tri_cc(int_4 x_dim, int_4 y_dim,
				       int_4 width_a, int_4 height_a,
				       float_4* b_red_a, float_4* b_green_a,
				       float_4* b_blue_a, int_4 n) {
  
  // call the methods to compute the area of the four triangles
  //
  if (fract_tri1_cc(x_dim, y_dim, width_a, height_a, b_red_a,
		    b_green_a, b_blue_a, n) == ISIP_FALSE) {
    error_handler_cc((char_1*)"fract_tri1_cc",
		     (char_1*)"error computing the area");
    return ISIP_FALSE;
  }
  
  if (fract_tri2_cc(x_dim, y_dim, width_a, height_a, b_red_a,
		    b_green_a, b_blue_a, n) == ISIP_FALSE) {
    error_handler_cc((char_1*)"fract_tri2_cc",
		     (char_1*)"error computing the area");
    return ISIP_FALSE;
  }
  
  if (fract_tri3_cc(x_dim, y_dim, width_a, height_a, b_red_a,
		    b_green_a, b_blue_a, n) == ISIP_FALSE) {
    error_handler_cc((char_1*)"fract_tri3_cc",
		     (char_1*)"error computing the area");
    return ISIP_FALSE;
  }
  
  if (fract_tri4_cc(x_dim, y_dim, width_a, height_a, b_red_a,
		    b_green_a, b_blue_a, n) == ISIP_FALSE) {
    error_handler_cc((char_1*)"fract_tri4_cc",
		     (char_1*)"error computing the area");
    return ISIP_FALSE;
  }
  
  // exit gracefully
  //
  return ISIP_TRUE;
}


