itom 2.2.1
|
00001 /* ******************************************************************** 00002 itom software 00003 URL: http://www.uni-stuttgart.de/ito 00004 Copyright (C) 2016, Institut fuer Technische Optik (ITO), 00005 Universitaet Stuttgart, Germany 00006 00007 This file is part of itom and its software development toolkit (SDK). 00008 00009 itom is free software; you can redistribute it and/or modify it 00010 under the terms of the GNU Library General Public Licence as published by 00011 the Free Software Foundation; either version 2 of the Licence, or (at 00012 your option) any later version. 00013 00014 In addition, as a special exception, the Institut fuer Technische 00015 Optik (ITO) gives you certain additional rights. 00016 These rights are described in the ITO LGPL Exception version 1.0, 00017 which can be found in the file LGPL_EXCEPTION.txt in this package. 00018 00019 itom is distributed in the hope that it will be useful, but 00020 WITHOUT ANY WARRANTY; without even the implied warranty of 00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library 00022 General Public Licence for more details. 00023 00024 You should have received a copy of the GNU Library General Public License 00025 along with itom. If not, see <http://www.gnu.org/licenses/>. 00026 *********************************************************************** */ 00027 00028 //#ifndef SHAREDSTRUCTURESPRIMITIVES_H 00029 //#define SHAREDSTRUCTURESPRIMITIVES_H 00030 // 00031 //#include "typeDefs.h" 00032 //#include "../DataObject/dataobj.h" 00033 // 00034 //#if !defined(Q_MOC_RUN) || defined(ITOMCOMMONQT_MOC) //only moc this file in itomCommonQtLib but not in other libraries or executables linking against this itomCommonQtLib 00035 // 00036 //#define PRIM_ELEMENTLENGTH 11 /** \brief number of elements within the geometricPrimitives */ 00037 // 00038 // 00040 //* \brief This union was defined for adressing geometricPrimitives. 00041 // \detail The union geometricPrimitives contains an array called cells with the size of PRIM_ELEMENTLENGTH. 00042 // The cells contain: 00043 // 0. The unique index of the current primitive, castable to int32 with a maximum up to 16bit index values 00044 // 1. Type flag 0000FFFF and further flags e.g. read&write only FFFF0000 00045 // 2. First coordinate with x value 00046 // 3. First coordinate with y value 00047 // 4. First coordinate with z value 00048 // All other values depends on the primitiv type and may change between each type. 00049 // A point is defined as idx, flags, centerX0, centerY0, centerZ0 00050 // A line is defined as idx, flags, x0, y0, z0, x1, y1, z1 00051 // A ellipse is defined as idx, flags, centerX, centerY, centerZ, r1, r2 00052 // A circle is defined as idx, flags, centerX, centerY, centerZ, r 00053 // A rectangle is defined as idx, flags, x0, y0, z0, x1, y1, z1, alpha 00054 // A square is defined as idx, flags, centerX, centerY, centerZ, a, alpha 00055 // A polygon is defined as idx, flags, posX, posY, posZ, directionX, directionY, directionZ, idx, numIdx 00056 // \author Wolfram Lyda, twip optical solutions GmbH, Stuttgart 00057 // \date 12.2013 00058 //*/ 00059 // 00060 //struct ITOMCOMMONQT_EXPORT geometricPrimitives 00061 //{ 00062 // 00064 // struct point 00065 // { 00066 // ito::float32 idx; 00067 // ito::float32 flags; 00068 // ito::float32 x0; 00069 // ito::float32 y0; 00070 // ito::float32 z0; 00071 // }; 00072 // 00073 // struct line 00074 // { 00075 // ito::float32 idx; 00076 // ito::float32 flags; 00077 // ito::float32 x0; 00078 // ito::float32 y0; 00079 // ito::float32 z0; 00080 // ito::float32 x1; 00081 // ito::float32 y1; 00082 // ito::float32 z1; 00083 // }; 00084 // 00085 // struct elipse 00086 // { 00087 // ito::float32 idx; 00088 // ito::float32 flags; 00089 // ito::float32 centerX; 00090 // ito::float32 centerY; 00091 // ito::float32 centerZ; 00092 // ito::float32 r1; 00093 // ito::float32 r2; 00094 // ito::float32 alpha; 00095 // }; 00096 // 00097 // struct circle 00098 // { 00099 // ito::float32 idx; 00100 // ito::float32 flags; 00101 // ito::float32 centerX; 00102 // ito::float32 centerY; 00103 // ito::float32 centerZ; 00104 // ito::float32 r1; 00105 // }; 00106 // 00107 // struct retangle 00108 // { 00109 // ito::float32 idx; 00110 // ito::float32 flags; 00111 // ito::float32 x0; 00112 // ito::float32 y0; 00113 // ito::float32 z0; 00114 // ito::float32 x1; 00115 // ito::float32 y1; 00116 // ito::float32 z1; 00117 // ito::float32 alpha; 00118 // }; 00119 // 00120 // struct square 00121 // { 00122 // ito::float32 idx; 00123 // ito::float32 flags; 00124 // ito::float32 centerX; 00125 // ito::float32 centerY; 00126 // ito::float32 centerZ; 00127 // ito::float32 a; 00128 // ito::float32 alpha; 00129 // }; 00130 // 00131 // struct polygoneElement 00132 // { 00133 // ito::float32 idx; 00134 // ito::float32 flags; 00135 // ito::float32 x0; 00136 // ito::float32 y0; 00137 // ito::float32 z0; 00138 // ito::float32 directionX; 00139 // ito::float32 directionY; 00140 // ito::float32 directionZ; 00141 // ito::float32 pointIdx; 00142 // ito::float32 pointNumber; 00143 // }; 00144 //*/ 00145 // ito::float32 cells[PRIM_ELEMENTLENGTH]; 00146 //}; 00147 // 00148 // 00149 // 00150 //namespace ito 00151 //{ 00152 // 00153 // /** \class PrimitiveContainer 00154 // * \detail This is a container to store geometric primitives. 00155 // The enum tPrimitive of this file defines the geometric primitives for all plots. 00156 // \author Wolfram Lyda, twip optical solutions GmbH, Stuttgart 00157 // \date 12.2013 00158 // */ 00159 // class ITOMCOMMONQT_EXPORT PrimitiveContainer 00160 // { 00161 // public: 00162 // 00163 // /** \enum tPrimitive 00164 // * \detail Discribes the different primtive types 00165 // \sa itom1DQwtPlot, itom2DQwtPlot 00166 // */ 00167 // enum tPrimitive 00168 // { 00169 // tNoType = 0, /**! NoType for pick*/ 00170 // tMultiPointPick = 6, /**! Multi point pick*/ 00171 // tPoint = 101, /**! Element is tPoint or order to pick points*/ 00172 // tLine = 102, /**! Element is tLine or order to pick lines*/ 00173 // tRectangle = 103, /**! Element is tRectangle or order to pick rectangles*/ 00174 // tSquare = 104, /**! Element is tSquare or order to pick squares*/ 00175 // tEllipse = 105, /**! Element is tEllipse or order to pick ellipses*/ 00176 // tCircle = 106, /**! Element is tCircle or order to pick circles*/ 00177 // tPolygon = 110, /**! Element is tPolygon or order to pick polygon*/ 00178 // tMoveLock = 0x00010000, /**! Element is readOnly */ 00179 // tRotateLock = 0x00020000, /**! Element can not be moved */ 00180 // tResizeLock = 0x00040000, /**! Element can not be moved */ 00181 // tTypeMask = 0x0000FFFF, /**! Mask for the type space */ 00182 // tFlagMask = 0xFFFF0000 /**! Mask for the flag space */ 00183 // }; 00184 // 00186 // PrimitiveContainer(DataObject primitives = DataObject()); 00187 // ~PrimitiveContainer(); 00188 // 00189 // 00190 // 00191 // inline int getNumberOfRows() const {return m_primitives.getSize(0);}; 00192 // inline int getNumberOfElements(const int type) const; 00193 // inline int getFirstElementRow(const int type) const; 00194 // inline ito::float32* getElementPtr(const int row); 00195 // inline const ito::float32* getElementPtr(const int row) const; 00196 // inline int getIndexFromRow(const int row) const; 00197 // inline int getRowFromIndex(const int idx) const; 00198 // 00199 // inline bool isElement(const int row) const; 00200 // void clear(void); 00201 // 00202 // ito::RetVal addElement(const int type, ito::float32 * cells); 00203 // ito::RetVal changeElement(const int type, ito::float32 * cells); 00204 // ito::RetVal removeElement(const int row); 00205 // 00206 // ito::RetVal copyGeometricElements(const ito::DataObject &rhs); 00207 // 00208 // private: 00209 // 00210 // ito::DataObject m_primitives; 00211 // cv::Mat * m_internalMat; 00213 // 00214 // }; 00215 // 00216 // 00217 //} 00218 // 00219 //#endif //#if !defined(Q_MOC_RUN) || defined(ITOMCOMMONQT_MOC) 00220 // 00221 //#endif //SHAREDSTRUCTURESPRIMITIVES_H