// file: $USFS/class/image_analysis/v6.1/imaga_cstr_1.cc
//

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

// method: default constructor
//
// arguments: none
//
// return: none
//
Image_analysis::Image_analysis() {
  
  // set the default debug level
  //
  debug_level_d = ISIP_DEBUG_NONE;
  
  // initialize parameter file data
  //
  param_version_d = (char_1*)NULL;
  param_fname_d = (char_1*)NULL;
  model_version_d = (char_1*)NULL;
  model_fname_d = (char_1*)NULL;
  model_name_d = (char_1*)NULL;
  sel_vec_d = (int_4*)NULL;
  
  // initialize algorithm and mode data
  //
  algorithm_d = (int_4)-1;
  mode_d = (int_4)-1;

  // initialize segmentation related data
  //
  seg_flag_d = ISIP_FALSE;
  transcription_d = (char_1*)NULL;
  polygon_list_d = (Link_list*)NULL;
  frm_size_d = (int_4)0;
  win_size_d = (int_4)0;

  //---------------------------------------------------------------------------
  //
  // initialize the parameters related to histogram processing
  //
  //---------------------------------------------------------------------------
  //
  // initialize reference model parameters
  //
  hist_r_min_d = (float_8)-1;
  hist_r_max_d = (float_8)-1;
  hist_r_nbins_d = (int_4)-1;
  hist_r_redp_d = (int_4)-1;
  hist_r_grnp_d = (int_4)-1;
  hist_r_blup_d = (int_4)-1;

  hist_r_npxls_d = (int_4)-1;
  hist_r_nimages_d = (int_4)-1;
  hist_r_nblks_d = (int_4)-1;
  hist_r_rpdf_d = (float_8*)NULL;
  hist_r_gpdf_d = (float_8*)NULL;
  hist_r_bpdf_d = (float_8*)NULL;
  hist_r_ylwpdf_d = (float_8*)NULL;
  hist_r_brnpdf_d = (float_8*)NULL;
  hist_r_rcval_d = (float_8*)NULL;
  hist_r_gcval_d = (float_8*)NULL;
  hist_r_bcval_d = (float_8*)NULL;
  hist_r_ylwcval_d = (float_8*)NULL;
  hist_r_brncval_d = (float_8*)NULL;

  hist_rwgt_d = (float_8)0.0;
  hist_gwgt_d = (float_8)0.0;
  hist_bwgt_d = (float_8)0.0;

  hist_ascale_d = (float_8)0.0;
  hist_bscale_d = (float_8)0.0;

  // initialize the parameters related to histogram processing
  //
  hist_t_npxls_d = (int_4)-1;
  hist_t_nimages_d = (int_4)-1;
  hist_t_nblks_d = (int_4)-1;
  hist_t_rpdf_d = (float_8*)NULL;
  hist_t_gpdf_d = (float_8*)NULL;
  hist_t_bpdf_d = (float_8*)NULL;
  hist_t_ylwpdf_d = (float_8*)NULL;
  hist_t_brnpdf_d = (float_8*)NULL;
  hist_t_rcval_d = (float_8*)NULL;
  hist_t_gcval_d = (float_8*)NULL;
  hist_t_bcval_d = (float_8*)NULL;
  hist_t_ylwcval_d = (float_8*)NULL;
  hist_t_brncval_d = (float_8*)NULL;

  //---------------------------------------------------------------------------
  //
  // initialize the parameters related to edge detection processing
  //
  //---------------------------------------------------------------------------
  
  edge_r_nbins_d = (int_4)-1;
  edge_r_xmean_d = (int_4)-1;
  edge_r_ymean_d = (int_4)-1;
  edge_r_sigma_d = (int_4)-1;
  edge_r_msize_d = (int_4)-1;
  edge_r_rfact_d = (float_8)-1;
  edge_r_lmin_d= (float_8)-1;
  edge_r_lmax_d = (float_8)-1;  
  edge_r_lpdf_d = (float_8*)NULL;
  edge_r_lcval_d = (float_8*)NULL;
  edge_r_tlines_d = (int_4)-1;
  edge_r_nimages_d = (int_4)-1;
  edge_r_nblks_d = (int_4)-1;
  edge_ascale_d = (float_8)-1;
  edge_bscale_d = (float_8)-1;
  edge_lwgt_d = (float_8)-1;
  edge_swgt_d = (float_8)-1;
  edge_t_lpdf_d = (float_8*)NULL;
  edge_t_lcval_d = (float_8*)NULL;
  edge_t_tlines_d = (int_4)-1;
  edge_t_nimages_d = (int_4)-1;
  edge_t_nblks_d = (int_4)-1;
  edge_perlong_t_lines_d = (float_8)-1;
  edge_pershrt_t_lines_d = (float_8)-1;
  
  //---------------------------------------------------------------------------
  //
  // initialize the parameters related to factor analysis
  //
  //---------------------------------------------------------------------------
  
  pca_t_num_vectors_d = (int_4)-1;
  pca_t_num_frames_d = (int_4)-1;
  pca_t_values_read_d = (int_4)-1;
  pca_t_npxls_d = (int_4)-1;
  pca_t_nimages_d = (int_4)-1;
  pca_t_nblks_d = (int_4)-1;
  pca_t_data_d = (float_4*)NULL;
  covar_t_data_d = (float_4*)NULL;
  mean_t_data_d = (float_4*)NULL;

  //---------------------------------------------------------------------------
  //
  // initialize the parameters related to differential entropy
  //
  //---------------------------------------------------------------------------
  
  dent_r_min_d = (int_4)-1;
  dent_r_max_d = (int_4)-1;
  dent_r_nbins_d = (int_4)-1;
  dent_ascale_d = (int_4)-1;
  dent_bscale_d = (int_4)-1;  
  dent_r_npxls_d = (int_4)-1;
  dent_r_nimages_d = (int_4)-1;
  dent_r_nblks_d = (int_4)-1;
  dent_t_red_d = (float_8*)NULL;
  dent_t_grn_d = (float_8*)NULL;
  dent_t_blu_d = (float_8*)NULL;
  dent_t_sumred_d = (float_8)-1;
  dent_t_sumgrn_d = (float_8)-1;
  dent_t_sumblu_d = (float_8)-1;
  dent_r_sumred_d = (float_8)-1;
  dent_r_sumgrn_d = (float_8)-1;
  dent_r_sumblu_d = (float_8)-1;

  //---------------------------------------------------------------------------
  //
  // initialize the parameters related to standard deviation
  //
  //---------------------------------------------------------------------------

  sd_r_npxls_d = (int_4)-1;
  sd_r_nimages_d = (int_4)-1;
  sd_r_nblks_d = (int_4)-1;
  sd_r_mean_red_d = (float_8)-1;
  sd_r_mean_grn_d = (float_8)-1;
  sd_r_mean_blu_d = (float_8)-1;
  sd_ascale_d = (float_8)-1;
  sd_bscale_d = (float_8)-1;
  sd_rwgt_d = (float_8)-1;
  sd_gwgt_d = (float_8)-1;
  sd_bwgt_d = (float_8)-1;
  sd_t_red_d = (float_8)-1;
  sd_t_grn_d = (float_8)-1;
  sd_t_blu_d = (float_8)-1;
  sd_r_red_d = (float_8)-1;
  sd_r_grn_d = (float_8)-1;
  sd_r_blu_d = (float_8)-1;  

  //---------------------------------------------------------------------------
  //
  // initialize the parameters related to entropy
  //
  //---------------------------------------------------------------------------

  huf_r_min_d = (int_4)-1;
  huf_r_max_d = (int_4)-1;
  huf_r_nbins_d = (int_4)-1;
  huf_r_npxls_d = (int_4)-1;
  huf_r_nimages_d = (int_4)-1;
  huf_r_nblks_d = (int_4)-1;

  huf_ascale_d = (int_4)-1;
  huf_bscale_d = (int_4)-1;
  huf_rwgt_d = (int_4)-1;
  huf_gwgt_d = (int_4)-1;
  huf_bwgt_d = (int_4)-1;
  
  huf_t_red_d = (int_4)-1;
  huf_t_grn_d = (int_4)-1;
  huf_t_blu_d = (int_4)-1;
  huf_r_red_d = (int_4)-1;
  huf_r_grn_d = (int_4)-1;
  huf_r_blu_d = (int_4)-1;
  huf_r_rpdf_d = (float_8*)NULL;
  huf_r_gpdf_d = (float_8*)NULL;
  huf_r_bpdf_d = (float_8*)NULL;

  //---------------------------------------------------------------------------
  //
  // initialize the parameters related to jpeg dct coding (8 x 8 dct
  // transformation and run length coding)
  //
  //---------------------------------------------------------------------------

  rle_r_redbits_d = (int_4)-1;
  rle_r_grnbits_d = (int_4)-1;
  rle_r_blubits_d = (int_4)-1;
  rle_r_nimages_d = (int_4)-1;
  rle_r_npxls_d = (int_4)-1;
  rle_r_nblks_d = (int_4)-1;
  rle_r_compression_d = (float_4)-1;
  rle_t_compression_d = (float_4)-1;
  rle_r_rpdc_d = (float_4)-1;
  rle_r_gpdc_d = (float_4)-1;
  rle_r_bpdc_d = (float_4)-1;
  rle_r_cos_d = (float_4**)NULL;
  rle_r_red_d = (float_4*)NULL;
  rle_r_grn_d = (float_4*)NULL;
  rle_r_blu_d = (float_4*)NULL;

  //---------------------------------------------------------------------------
  //
  // initialize the parameters related to dct transformation
  //
  //---------------------------------------------------------------------------

  dct_r_nimages_d = (int_4)-1;
  dct_r_npxls_d = (int_4)-1;
  dct_r_nblks_d = (int_4)-1;
  dct_r_cos_d = (float_4**)NULL;
  dct_norm_d = (float_4**)NULL;
  dct_r_red_d = (float_4*)NULL;
  dct_r_grn_d = (float_4*)NULL;
  dct_r_blu_d = (float_4*)NULL;
  dct_blk_size_d = (int_4)-1;
  dct_filter_size_d = (int_4)-1;
  dct_t_red_filter_d = (float_4*)NULL;
  dct_t_grn_filter_d = (float_4*)NULL;
  dct_t_blu_filter_d = (float_4*)NULL;  
  
  //---------------------------------------------------------------------------
  //
  // initialize the parameters related to fractal image analysis
  //
  //---------------------------------------------------------------------------
  
  fract_t_dimred_d = (int_4)-1;
  fract_t_dimgrn_d = (int_4)-1;
  fract_t_dimblu_d = (int_4)-1;
  fract_t_fir_ared_d = (int_4)-1;
  fract_t_fir_agrn_d = (int_4)-1;
  fract_t_fir_ablu_d = (int_4)-1;
  fract_t_sec_ared_d = (int_4)-1;
  fract_t_sec_agrn_d = (int_4)-1;
  fract_t_sec_ablu_d = (int_4)-1;
  fract_r_dimred_d = (int_4)-1;
  fract_r_dimgrn_d = (int_4)-1;
  fract_r_dimblu_d = (int_4)-1;  
  fract_r_nimages_d = (int_4)-1;
  fract_r_npxls_d = (int_4)-1;
  fract_r_nblks_d = (int_4)-1;
  fract_ascale_d = (int_4)-1;
  fract_bscale_d = (int_4)-1;
  fract_rwgt_d = (float_8)-1;
  fract_gwgt_d = (float_8)-1;
  fract_bwgt_d = (float_8)-1;   

  //---------------------------------------------------------------------------
  //
  // initialize the parameters related to gabor features
  //
  //---------------------------------------------------------------------------

  gabor_r_npxls_d = (int_4)-1;
  gabor_r_nblks_d = (int_4)-1;
  gabor_feature_d = (float_8*)NULL;
  gabor_num_col_d = (int_4)-1;
  gabor_num_row_d = (int_4)-1;
  gabor_num_rad_frq_d = (int_4)-1;
  gabor_num_orient_d = (int_4)-1;
  gabor_rad_frq_d = (float_8*)NULL;
  gabor_orient_d = (float_8*)NULL;
  gabor_sigma_x_d = (float_8)-1;
  gabor_sigma_y_d = (float_8)-1;
  gabor_feature_dim_d = (int_4)-1;
  gabor_alpha_d = (float_8)-1;
  gabor_win_scale_d = (int_4)-1;

  // exit gracefully
  //
}
