PARP Research Group University of Murcia, Spain


src/qvcore/qvdefines.h

00001 /*
00002  *      Copyright (C) 2007, 2008, 2009. PARP Research Group.
00003  *      <http://perception.inf.um.es>
00004  *      University of Murcia, Spain.
00005  *
00006  *      This file is part of the QVision library.
00007  *
00008  *      QVision is free software: you can redistribute it and/or modify
00009  *      it under the terms of the GNU Lesser General Public License as
00010  *      published by the Free Software Foundation, version 3 of the License.
00011  *
00012  *      QVision is distributed in the hope that it will be useful,
00013  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *      GNU Lesser General Public License for more details.
00016  *
00017  *      You should have received a copy of the GNU Lesser General Public
00018  *      License along with QVision. If not, see <http://www.gnu.org/licenses/>.
00019  */
00020 
00021 #ifndef QVDEFINES_H
00022 #define QVDEFINES_H
00023 
00024 // Include a small set of Qt classes, which will be declared as basic types for the metatypes.
00025 #include <QMetaType>
00026 #include <QList>
00027 #include <QVector>
00028 #include <QPoint>
00029 #include <QPointF>
00030 #include <QRect>
00031 #include <QPair>
00032 #include <ipp.h>
00033 
00034 typedef unsigned char   uChar;          // Ipp8u        1 bytes
00035 typedef unsigned short  uShort;         // Ipp16u       2 "
00036 typedef unsigned int    uInt;           // Ipp32u       4 "
00037 typedef signed char     sChar;          // Ipp8s        1 ...
00038 typedef signed short    sShort;         // Ipp16s       2
00039 typedef signed int      sInt;           // Ipp32s       4
00040 //typedef __INT64       sLong;          // Ipp64s       8 (not an estandar type)
00041 //typedef __UINT64      uLong;          // Ipp64u       8 (not an estandar type)
00042 typedef float           sFloat;         // Ipp32f       4
00043 typedef double          sDouble;        // Ipp64f       8
00044 
00045 // Other type definitions
00046 typedef QPair<QPointF, QPointF> QPointFMatching;
00047 
00048 // Qt metatypes definitions: QVision defined types must be metatyped in their respective header files.
00049 // Qt's and C++'s metatypes must be listed below.
00050 Q_DECLARE_METATYPE(QVector<sFloat>);
00051 Q_DECLARE_METATYPE(QVector<sDouble>);
00052 Q_DECLARE_METATYPE(QList<sInt>);
00053 Q_DECLARE_METATYPE(QList<sFloat>);
00054 Q_DECLARE_METATYPE(QList<sDouble>);
00055 Q_DECLARE_METATYPE(QList<QPoint>);
00056 Q_DECLARE_METATYPE(QList<QPointF>);
00057 Q_DECLARE_METATYPE(QList<QRect>);
00058 Q_DECLARE_METATYPE(QList< QList< QPoint > >);
00059 Q_DECLARE_METATYPE(QList< QList< QPointF > >);
00060 Q_DECLARE_METATYPE(IppiMaskSize);
00061 Q_DECLARE_METATYPE(IppCmpOp);
00062 Q_DECLARE_METATYPE(IppRoundMode);
00063 Q_DECLARE_METATYPE(QPointFMatching);
00064 Q_DECLARE_METATYPE(QList<QPointFMatching>);
00065 
00066 #include <QColor>
00067 const QColor qvColors[] = {
00068                 Qt::red,
00069                 Qt::green,
00070                 Qt::blue,
00071                 Qt::cyan,
00072                 Qt::magenta,
00073                 Qt::darkRed,
00074                 Qt::darkGreen,
00075                 Qt::darkBlue,
00076                 Qt::darkCyan,
00077                 Qt::darkMagenta
00078                 };
00079 
00081 std::ostream& operator << (std::ostream &os, const QPointF &point);
00082 std::ostream& operator << (std::ostream &os, const QPoint &point);
00083 std::ostream& operator << (std::ostream &os, const QPointFMatching &matching);
00084 
00085 #endif
00086 
00087 



QVision framework. PARP research group, copyright 2007, 2008.