find_obj.h

00001 /*----------------------------------------------------------------------------
00002  *                            E.S.O.
00003  *----------------------------------------------------------------------------
00004  * File name   :    find_obj.h
00005  * Author      :    Thomas Rogon 
00006  * Created on  :    April 29, 1999
00007  * Hardware    :    Sun Sparc 20
00008  * Software    :    ANSI C under Solaris Unix
00009  *                  Part of ECLIPSE library for Adonis
00010  * Description :    High level interface to Connected components:
00011  *--------------------------------------------------------------------------*/
00012 
00013 /*
00014 
00015         $Id: find_obj.h,v 1.1 2003/09/03 12:50:47 amodigli Exp $
00016         $Author: amodigli $
00017         $Date: 2003/09/03 12:50:47 $
00018         $Revision: 1.1 $
00019 
00020 */
00021 
00022 #ifndef _FIND_OBJ_H_
00023 #define _FIND_OBJ_H_
00024 
00025 /*---------------------------------------------------------------------------
00026                             Includes
00027  ---------------------------------------------------------------------------*/
00028 
00029 #include "local_types.h"
00030 #include "obj_stats.h"
00031 #include "detect_peaks.h"
00032 #include "photometry.h"
00033 
00034 
00035 /*---------------------------------------------------------------------------
00036                             New types
00037  ---------------------------------------------------------------------------*/
00038 typedef struct _FINEPOS_PARAM_T_{
00039     boolean         use_finePos;
00040     double          radius;
00041     double          rad_int;
00042     double          rad_ext ;
00043 } finepos_param_t;
00044 
00045 typedef enum{
00046     NO_MORPHO,
00047     NORMAL,     /* square 3x3 */
00048     SQUARE,     /* square user specified */
00049     CROSS,      /* cross  user specified */
00050     RECT        /* rect   user specified */
00051 } t_morpho_mode;
00052 
00053 typedef struct _FINDOBJ_USER_PARAM_T_{
00054     char            *basename;  /* basename of input file */
00055     int             plane;      /* not really a user param, but...*/
00056     FILE            *ot;        /* output text file */
00057     double          sigma;      /* for thresholding */
00058     boolean         smear_flag;
00059     boolean         save_labelized;
00060     boolean         save_binary;
00061     t_morpho_mode   morphology_mode;
00062     pixel_map       *mor_kern;  /* user specified morphology kernel */
00063     finepos_param_t finep;
00064     fwhm_param_t    fwhm;
00065     phot_param_t    phot;   
00066 } fou_param_t;
00067 
00068 
00069 /*----------------------------------------------------------------------------
00070  * Function :   find_objects()
00071  * In       :   an image, a sigma rejection threshold (floa), and
00072  *              intermediate printing flags.
00073  *              To have the function return a list of pixel positions,
00074  *              set print_flags to 0. n_objects is then not updated and
00075  *              NULL is returned.
00076  *              Other flags are described in detpeak.h.
00077  * Out      :   a list of pixel positions, and a number of pixels
00078  *              or a list of positions in requested format on stdout.
00079  * Job      :   find out the peaks in an astronomical image
00080  * Notice   :   This function is an alternative to find_bright_objects 
00081  *                  (see detpeak.h) using a non-recursive connected
00082  *                  components routine (see cnct_comp.h) instead of the
00083  *                  recursive flood fill  
00084  *--------------------------------------------------------------------------*/
00085 pixel_position *find_objects( OneImage *image1, double  sigma,
00086         int *n_objects, int print_flags) ;
00087 
00088 /*----------------------------------------------------------------------------
00089  * Function :   find_objs()
00090  * In       :   an image, a find object user parameter block fou_param_t
00091  * Out      :   0 if OK -1 if not OK
00092  * Job      :   find and analyse the peaks in an astronomical image
00093  * Notice   :   This function is combines the functionalities of
00094  *                  - find_bright_objects 
00095  *                  - fwhm
00096  *                  - photfits
00097  *--------------------------------------------------------------------------*/
00098 int find_objs( OneImage *image1, fou_param_t fou_param) ;
00099 
00100 /*---------------------------------------------------------------------------
00101  * Function :   InitPrint_ccobj_combinedtable()
00102  * In       :   a filled out find object user parameter block fou_param_t
00103  * Out      :   0 if OK, -1 if not OK 
00104  * Notice   :   the fou_param.ot FILE must be closed using fclose()
00105  *              after InitPrint_ccobj_combinedtable & print_ccobj_combinedtable
00106  *--------------------------------------------------------------------------*/
00107 int InitPrint_ccobj_combinedtable(fou_param_t *fou_param);
00108 
00109 /*---------------------------------------------------------------------------
00110  * Function :  print_ccfeaturestable()
00111  * In       :  a filled out find object user parameter block fou_param_t,
00112  *              array of connected component stats
00113  *              array of grey object stats
00114  *              total number of objects (including black & white)
00115  * Out      :  0 if OK, -1 if not OK 
00116  * Job      :  prints a summarized table of features 
00117  *              (see cc_stats_t & obj_stats_t)
00118  * Notice   :   The formatted output is expected to be read by some
00119  *              text processing utility (such as awk).
00120  *              Comment lines (to be ignored) are preceded with a #
00121  *              The last printed line reports the total number of
00122  *              objects lest the program terminates abnormally.
00123  *--------------------------------------------------------------------------*/
00124 int print_ccobj_combinedtable( obj_stats_t *os, cc_stats_t *cs,
00125         unsigned long numentries, fou_param_t *fou_param,
00126         double fmedx, double fmedy, double fmeda );
00127 
00128 
00129 /*----------------------------------------------------------------------------
00130  * Function :   setup_default_fou_param()
00131  * In       :   a find object user parameter block fou_param_t.
00132  * Out      :   0 if Ok -1 if not 
00133  * Job      :   Setup default values - some are intentionally 
00134  *              invalid (i.e. must be overridden by user supplied values
00135  * Notice   :  
00136  *--------------------------------------------------------------------------*/
00137 int setup_default_fou_param( fou_param_t *fp);
00138 
00139 
00140 #endif

Generated on Wed Oct 26 13:08:52 2005 for SINFONI Pipeline Reference Manual by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001