Changeset 15794
- Timestamp:
- Dec 12, 2007, 11:01:32 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psEllipse.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psEllipse.h
r13425 r15794 2 2 * @brief functions to manipulate sparse matrices equations 3 3 * 4 * $Revision: 1. 5$ $Name: not supported by cvs2svn $5 * $Date: 2007- 05-18 14:06:09$4 * $Revision: 1.6 $ $Name: not supported by cvs2svn $ 5 * $Date: 2007-12-12 21:01:32 $ 6 6 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii 7 7 */ … … 15 15 /// @{ 16 16 17 // strucures to define elliptical shape parameters 18 typedef struct 19 { 20 double major; // Major axis 21 double minor; // Minor axis 22 double theta; // Position angle 23 } 24 psEllipseAxes; 17 // Different representations of an ellipse 25 18 26 // strucures to define elliptical shape parameters 27 typedef struct 28 { 29 double e0; // Scale (Mxx + Myy) 30 double e1; // Polarization 1 (Mxx - Myy) 31 double e2; // Polarization 1 (2Mxy) 32 } 33 psEllipsePol; 19 /// Ellipse defined in terms of axes 20 typedef struct { 21 double major; ///< Major axis 22 double minor; ///< Minor axis 23 double theta; ///< Position angle 24 } psEllipseAxes; 34 25 35 typedef struct 36 { 37 double x2; // Moment of xx 38 double y2; // Moment of yy 39 double xy; // Moment of xy 40 } 41 psEllipseMoments; 26 /// Ellipse defined in terms of moments 27 typedef struct { 28 double x2; ///< Moment of xx (Mxx) 29 double y2; ///< Moment of yy (Myy) 30 double xy; ///< Moment of xy (Mxy) 31 } psEllipseMoments; 42 32 43 typedef struct 44 { 45 double sx; // Shape parameter in x 46 double sy; // Shape parameter in y 47 double sxy; // Shape parameter in xy 48 } 49 psEllipseShape; 33 /// Ellipse defined in terms of Gaussian shape parameters 34 typedef struct { 35 double sx; ///< Shape parameter in x 36 double sy; ///< Shape parameter in y 37 double sxy; ///< Shape parameter in xy 38 } psEllipseShape; 50 39 51 // conversions between elliptical shape representations 52 psEllipseMoments psEllipseAxesToMoments(psEllipseAxes axes); 53 psEllipseAxes psEllipseMomentsToAxes(psEllipseMoments moments, double maxAR); 54 psEllipseShape psEllipseAxesToShape(psEllipseAxes axes); 55 psEllipseAxes psEllipseShapeToAxes(psEllipseShape shape, double maxAR); 40 /// Ellipse defined in terms of polarisations 41 typedef struct { 42 double e0; ///< Scale (Mxx + Myy) 43 double e1; ///< Polarization 1 (Mxx - Myy) 44 double e2; ///< Polarization 1 (2Mxy) 45 } psEllipsePol; 56 46 57 psEllipsePol psEllipseAxesToPol(psEllipseAxes axes); 58 psEllipsePol psEllipseShapeToPol(psEllipseShape shape); 59 psErrorCode psEllipsePolToAxes(const psEllipsePol pol, const float minMinorAxis, psEllipseAxes *axes); 47 // Conversions between elliptical shape representations 48 49 /// Convert axes to moments representation 50 psEllipseMoments psEllipseAxesToMoments(psEllipseAxes axes ///< Axes of ellipse 51 ); 52 53 /// Convert moments to axes representation 54 psEllipseAxes psEllipseMomentsToAxes(psEllipseMoments moments, ///< Moments of ellipse 55 double maxAR ///< Maximum allowed axis ratio 56 ); 57 58 /// Convert axes to shape representation 59 psEllipseShape psEllipseAxesToShape(psEllipseAxes axes ///< Axes of ellipse 60 ); 61 62 /// Convert shape to axes representation 63 psEllipseAxes psEllipseShapeToAxes(psEllipseShape shape, ///< Shape of ellipse 64 double maxAR ///< Maximum allowed axis ratio 65 ); 66 67 /// Convert axes to polarisation representation 68 psEllipsePol psEllipseAxesToPol(psEllipseAxes axes ///< Axes of ellipse 69 ); 70 71 /// Convert shape to polarisation representation 72 psEllipsePol psEllipseShapeToPol(psEllipseShape shape ///< Shape of ellipse 73 ); 74 75 /// Convert polarisation to axes representation 76 /// 77 /// XXX This API goes against the PS convention of outputs being first. 78 psErrorCode psEllipsePolToAxes(const psEllipsePol pol, ///< Polarisation of ellipse 79 const float minMinorAxis, ///< Minimum allowed minor axis 80 psEllipseAxes *axes ///< Output ellipse axes 81 ); 60 82 61 83 /// @}
Note:
See TracChangeset
for help on using the changeset viewer.
