| 1 | //=//////////////////////////////////////////////////////////////////////
|
|---|
| 2 | //=
|
|---|
| 3 | //= moments
|
|---|
| 4 | //=
|
|---|
| 5 | //= @file moments.h
|
|---|
| 6 | //= @desc Header file
|
|---|
| 7 | //= @author J C Gonzalez
|
|---|
| 8 | //= @email gonzalez@mppmu.mpg.de
|
|---|
| 9 | //= @date Thu May 7 16:24:22 1998
|
|---|
| 10 | //=
|
|---|
| 11 | //=----------------------------------------------------------------------
|
|---|
| 12 | //=
|
|---|
| 13 | //= Created: Thu May 7 16:24:22 1998
|
|---|
| 14 | //= Author: Jose Carlos Gonzalez
|
|---|
| 15 | //= Purpose: Program for reflector simulation
|
|---|
| 16 | //= Notes: See files README for details
|
|---|
| 17 | //=
|
|---|
| 18 | //=----------------------------------------------------------------------
|
|---|
| 19 | //=
|
|---|
| 20 | //= $RCSfile: moments.h,v $
|
|---|
| 21 | //= $Revision: 1.1.1.1 $
|
|---|
| 22 | //= $Author: harald $
|
|---|
| 23 | //= $Date: 1999-11-05 11:59:33 $
|
|---|
| 24 | //=
|
|---|
| 25 | //=//////////////////////////////////////////////////////////////////////
|
|---|
| 26 |
|
|---|
| 27 | // @T \newpage
|
|---|
| 28 |
|
|---|
| 29 | //!@section Source code of |moments.h|.
|
|---|
| 30 |
|
|---|
| 31 | /*!@"
|
|---|
| 32 |
|
|---|
| 33 | In this section you can find the source code for the file
|
|---|
| 34 | |moments.h|. This file is mainly needed by |moments.cxx|.
|
|---|
| 35 |
|
|---|
| 36 | @"*/
|
|---|
| 37 |
|
|---|
| 38 | //!@{
|
|---|
| 39 |
|
|---|
| 40 | #ifndef _moments_
|
|---|
| 41 | #define _moments_
|
|---|
| 42 |
|
|---|
| 43 | #ifndef _this_
|
|---|
| 44 | #define _this_ moments
|
|---|
| 45 | #endif
|
|---|
| 46 |
|
|---|
| 47 | //!@}
|
|---|
| 48 |
|
|---|
| 49 | //!@subsection Include files.
|
|---|
| 50 |
|
|---|
| 51 | //!@{
|
|---|
| 52 |
|
|---|
| 53 | #include <iostream.h>
|
|---|
| 54 | #include <fstream.h>
|
|---|
| 55 | #include <stdlib.h>
|
|---|
| 56 | #include <stdio.h>
|
|---|
| 57 | #include <string.h>
|
|---|
| 58 | #include <math.h>
|
|---|
| 59 | #include <float.h>
|
|---|
| 60 |
|
|---|
| 61 | #include "jcmacros.h"
|
|---|
| 62 | #include "jcdebug.h"
|
|---|
| 63 |
|
|---|
| 64 | #include "camera-v.h"
|
|---|
| 65 |
|
|---|
| 66 | //!@}
|
|---|
| 67 |
|
|---|
| 68 | //!@subsection Macro-definitions, and constants.
|
|---|
| 69 |
|
|---|
| 70 | //!@{
|
|---|
| 71 |
|
|---|
| 72 | typedef struct {
|
|---|
| 73 |
|
|---|
| 74 | // moments
|
|---|
| 75 | float m1x, m1y; // first moments (mean)
|
|---|
| 76 | float m2xx, m2xy, m2yy; // second moments (around origin)
|
|---|
| 77 | float m2cxx, m2cxy, m2cyy; // second moments (around mean)
|
|---|
| 78 | float m3xxx, m3xxy, m3xyy, m3yyy; // third moments (around origin)
|
|---|
| 79 | float m3cxxx, m3cxxy, m3cxyy, m3cyyy; // third moments (around mean)
|
|---|
| 80 |
|
|---|
| 81 | // charges
|
|---|
| 82 | float charge; // total charge in the image
|
|---|
| 83 | float xmax, ymax; // position of the maximum
|
|---|
| 84 | float smax; // charge of the block of maximum
|
|---|
| 85 | float maxs[10]; // charges of the first 10 max.
|
|---|
| 86 | int nmaxs[10]; // number of pixels of 10 max.
|
|---|
| 87 |
|
|---|
| 88 | // parameters of the image
|
|---|
| 89 | float length, width, dist, xdist, azw, miss, alpha, conc[9];
|
|---|
| 90 | float phi, asymx, asymy;
|
|---|
| 91 |
|
|---|
| 92 | } Moments_Info;
|
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 | typedef struct {
|
|---|
| 96 | float *fi;
|
|---|
| 97 | int *isl, *islands;
|
|---|
| 98 | float *vislands;
|
|---|
| 99 | int numisl;
|
|---|
| 100 | } Islands_Info;
|
|---|
| 101 |
|
|---|
| 102 |
|
|---|
| 103 | typedef struct {
|
|---|
| 104 | float length1, length2;
|
|---|
| 105 | float width1, width2;
|
|---|
| 106 | } LenWid_Info;
|
|---|
| 107 |
|
|---|
| 108 | //!@}
|
|---|
| 109 |
|
|---|
| 110 | //!@subsection Prototypes of functions.
|
|---|
| 111 |
|
|---|
| 112 | //!@{
|
|---|
| 113 |
|
|---|
| 114 | //++
|
|---|
| 115 | // prototypes
|
|---|
| 116 | //--
|
|---|
| 117 |
|
|---|
| 118 | Moments_Info * moments( int n, float *image, float **pix,
|
|---|
| 119 | float plateScale, int flag);
|
|---|
| 120 | Islands_Info * islands( int n, float *f, int **pixneig, int *npixneig,
|
|---|
| 121 | int cleanning, int ipixcut );
|
|---|
| 122 | LenWid_Info * lenwid( int n, float *image, float **pix,
|
|---|
| 123 | float plateScale, float max_distance);
|
|---|
| 124 |
|
|---|
| 125 | void crosspt( float ax, float ay,
|
|---|
| 126 | float bx, float by,
|
|---|
| 127 | float cx, float cy,
|
|---|
| 128 | float dx, float dy,
|
|---|
| 129 | float * pcrossx, float * pcrossy);
|
|---|
| 130 |
|
|---|
| 131 | //!@}
|
|---|
| 132 |
|
|---|
| 133 | //!@{
|
|---|
| 134 |
|
|---|
| 135 | #endif // ! _moments_
|
|---|
| 136 |
|
|---|
| 137 | //!@}
|
|---|
| 138 |
|
|---|
| 139 | //=------------------------------------------------------------
|
|---|
| 140 | //!@subsection Log of this file.
|
|---|
| 141 |
|
|---|
| 142 | //!@{
|
|---|
| 143 |
|
|---|
| 144 | /*
|
|---|
| 145 | *$Log: not supported by cvs2svn $
|
|---|
| 146 | *Revision 1.1.1.1 1999/10/21 16:35:10 petry
|
|---|
| 147 | *first synthesised version
|
|---|
| 148 | *
|
|---|
| 149 | * Revision 1.4 1999/03/15 14:59:10 gonzalez
|
|---|
| 150 | * camera-1_1
|
|---|
| 151 | *
|
|---|
| 152 | * Revision 1.3 1999/03/02 09:56:15 gonzalez
|
|---|
| 153 | * *** empty log message ***
|
|---|
| 154 | *
|
|---|
| 155 | */
|
|---|
| 156 |
|
|---|
| 157 | //!@}
|
|---|
| 158 | //=EOF
|
|---|