// file: $USFS/class/image_analysis/v6.0/imaga_edge_06.cc
//

// system include files
//
#include <memory.h>

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

#include <integral_constants.h>

// method: edge_init_cc
//
// arguments: none
//
// return: a logical_1 value indicating status
//
// this method initializes the edgedetection computation.
//
logical_1 Image_analysis::edge_init_cc() {
  
  // deallocate memory if necessary
  //
  if (edge_t_lpdf_d != (float_8*)NULL) {
    delete [] edge_t_lpdf_d;
    edge_t_lpdf_d = (float_8*)NULL;
  }

  if (edge_t_lcval_d != (float_8*)NULL) {
    delete [] edge_t_lcval_d;
    edge_t_lcval_d = (float_8*)NULL;
  }
  
  // allocate memory and clear
  //
  edge_t_lpdf_d = new float_8[edge_r_nbins_d];
  edge_t_lcval_d = new float_8[edge_r_nbins_d];
  
  memset((void*)edge_t_lpdf_d, (int)0, (size_t)(edge_r_nbins_d*sizeof(float_8)));
  memset((void*)edge_t_lcval_d, (int)0, (size_t)(edge_r_nbins_d*sizeof(float_8)));
  
  // clear counters
  //
  edge_t_tlines_d = (int_4)0;
  edge_t_nimages_d = (int_4)0;
  edge_t_nblks_d = (int_4)0;
  edge_perlong_t_lines_d = (float_8)0;
  edge_pershrt_t_lines_d = (float_8)0;

  // exit gracefully
  //
  return ISIP_TRUE;
}
	 



