You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(144) |
Jul
(5) |
Aug
(23) |
Sep
(3) |
Oct
(8) |
Nov
(6) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(4) |
Feb
|
Mar
(34) |
Apr
(1) |
May
(10) |
Jun
(12) |
Jul
(17) |
Aug
(28) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(3) |
2011 |
Jan
(4) |
Feb
(7) |
Mar
(5) |
Apr
(1) |
May
|
Jun
(15) |
Jul
(1) |
Aug
(7) |
Sep
(9) |
Oct
(3) |
Nov
|
Dec
(1) |
2012 |
Jan
(1) |
Feb
(13) |
Mar
(6) |
Apr
|
May
(1) |
Jun
|
Jul
(1) |
Aug
(9) |
Sep
(7) |
Oct
(2) |
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <wol...@us...> - 2009-06-25 09:11:21
|
Revision: 154 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=154&view=rev Author: wolfspindler Date: 2009-06-25 09:11:08 +0000 (Thu, 25 Jun 2009) Log Message: ----------- ENH: -Activated and added documentation for doxygen generated file and class indexes. Modified Paths: -------------- trunk/UMD/METK/Sources/Inventor/SoQHull3D/SoQHull3D.h trunk/UMD/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.h trunk/UMD/METK/Sources/Inventor/UMDSoExtractColoredFaces/SoExtractColoredFaces.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/SoVerticalRuler.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMainAxis.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMinimalDistance.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAngleLines.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAngleToObjects.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoArrow.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAutoMeasureTool.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoCake.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoDistanceLine.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMainAxis.h trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.h trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.h trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.h trunk/UMD/METK/Sources/common/ObjMgrCommunicator.h trunk/UMD/METK/Sources/common/XMLParser.h trunk/UMD/METK/Sources/common/image_basic.h trunk/UMD/METK/Sources/common/kDebug.h trunk/UMD/METK/Sources/common/kSphere.h trunk/UMD/METK/Sources/common/matrix.h Property Changed: ---------------- trunk/UMD/METK/Sources/ML/kAviWriter/ Modified: trunk/UMD/METK/Sources/Inventor/SoQHull3D/SoQHull3D.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/SoQHull3D/SoQHull3D.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/SoQHull3D/SoQHull3D.h 2009-06-25 09:11:08 UTC (rev 154) @@ -1,5 +1,5 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoQHull3D derived from SoSeparator +//! The Inventor module class SoQHull3D derived from SoSeparator. /*! // \file SoQHull3D.h // \author Jens Haase @@ -67,7 +67,7 @@ static IndexVector convexHullFaceIndexList; -//! convex hull of invetor scene using qhull +//! Convex hull of invetor scene using qhull. class UMDQHULL3D_EXPORT SoQHull3D : public SoSeparator { //! implements the runtime type system interface of this new node. Modified: trunk/UMD/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDPickInfo/SoPickInfo.h 2009-06-25 09:11:08 UTC (rev 154) @@ -48,42 +48,42 @@ -//! Get picking information. +//! The Inventor module class SoPickInfo derived from SoSeparator to get picking information. class UMDPICKINFO_EXPORT SoPickInfo : public SoSeparator { - //! Implements the runtime type system interface of this new node. - SO_NODE_HEADER(SoPickInfo); + //! Implements the runtime type system interface of this new node. + SO_NODE_HEADER(SoPickInfo); public: - //! Constructor - SoPickInfo(); + //! Constructor + SoPickInfo(); - //! Initializes this class (called on dll initialization). - static void initClass(); + //! Initializes this class (called on dll initialization). + static void initClass(); - SoSFVec3f infoHitCoordinate; - SoSFVec3f infoObjHitCoordinate; - SoSFVec3f infoHitNormal; - SoSFVec3f infoObjHitNormal; - SoSFString infoStatus; - SoSFString infoTypeName; - SoSFString infoPickPath; - SoSFString infoDetail; + SoSFVec3f infoHitCoordinate; + SoSFVec3f infoObjHitCoordinate; + SoSFVec3f infoHitNormal; + SoSFVec3f infoObjHitNormal; + SoSFString infoStatus; + SoSFString infoTypeName; + SoSFString infoPickPath; + SoSFString infoDetail; protected: - //! Protected destructor - virtual ~SoPickInfo(); + //! Protected destructor + virtual ~SoPickInfo(); - //! Method for event handling (keyboard/mouse). - virtual void handleEvent(SoHandleEventAction* action); + //! Method for event handling (keyboard/mouse). + virtual void handleEvent(SoHandleEventAction* action); private: - SbVec3f _tempPickPoint; - bool _leftMouseButtonDown; + SbVec3f _tempPickPoint; + bool _leftMouseButtonDown; - void _resetFields(); + void _resetFields(); }; #endif // __SOPICKINFO_H Modified: trunk/UMD/METK/Sources/Inventor/UMDSoExtractColoredFaces/SoExtractColoredFaces.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoExtractColoredFaces/SoExtractColoredFaces.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDSoExtractColoredFaces/SoExtractColoredFaces.h 2009-06-25 09:11:08 UTC (rev 154) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SoExtractColoredFaces derived from SoSeparator +//! The Inventor module class SoExtractColoredFaces derived from SoSeparator. /*! // \file SoExtractColoredFaces.h // \author Konrad M\xFChler // \date 2008-02-01 // -// +// */ //---------------------------------------------------------------------------------- @@ -45,213 +45,217 @@ struct ltEdge; -//! +//! The Inventor module class SoExtractColoredFaces derived from SoSeparator. class UMDSOEXTRACTCOLOREDFACES_EXPORT SoExtractColoredFaces : public SoSeparator { - //! Implements the runtime type system interface of this new node. - SO_NODE_HEADER(SoExtractColoredFaces); + //! Implements the runtime type system interface of this new node. + SO_NODE_HEADER(SoExtractColoredFaces); public: - //! Constructor - SoExtractColoredFaces(); + //! Constructor + SoExtractColoredFaces(); - //! Initializes this class (called on dll initialization). - static void initClass(); + //! Initializes this class (called on dll initialization). + static void initClass(); - //@{! Fields + //@{! Fields - SoSFNode input; - SoSFNode outShape; - SoSFTrigger update; - SoSFColor selectedColor; - SoSFBool valid; - SoSFBool printColors; + SoSFNode input; + SoSFNode outShape; + SoSFTrigger update; + SoSFColor selectedColor; + SoSFBool valid; + SoSFBool printColors; - //@} + //@} protected: - virtual ~SoExtractColoredFaces(); + virtual ~SoExtractColoredFaces(); - SoNodeSensor *_nodeSensor; - static void nodeChangedCB(void *data, SoSensor* sens); - void nodeChanged(SoNodeSensor* sensor); + SoNodeSensor *_nodeSensor; + static void nodeChangedCB(void *data, SoSensor* sens); + void nodeChanged(SoNodeSensor* sensor); private: - //! internal representation of the point set - SoVertexProperty* _vertexProp; - SoGroup* _itssHolder; - int _sizeCoordinate3; - //! the transformation matrix - SbMatrix _worldMatrix; + //! internal representation of the point set + SoVertexProperty* _vertexProp; + SoGroup* _itssHolder; + int _sizeCoordinate3; + //! the transformation matrix + SbMatrix _worldMatrix; - SoFieldSensor* _updateSensor; + SoFieldSensor* _updateSensor; - SoCallbackAction* _callbackAction; + SoCallbackAction* _callbackAction; - //! called, if a new child in the scenegraph will be traversed - static SoCallbackAction::Response preCB(void *userData, SoCallbackAction *action, const SoNode *node); - static void triangleCB(void* userData, SoCallbackAction* action, - const SoPrimitiveVertex* v1, - const SoPrimitiveVertex* v2, - const SoPrimitiveVertex* v3); + //! called, if a new child in the scenegraph will be traversed + static SoCallbackAction::Response preCB(void *userData, SoCallbackAction *action, const SoNode *node); + static void triangleCB(void* userData, SoCallbackAction* action, + const SoPrimitiveVertex* v1, + const SoPrimitiveVertex* v2, + const SoPrimitiveVertex* v3); - static bool epsilon(double sour, double value1, double value2); + static bool epsilon(double sour, double value1, double value2); - std::vector<SbColor> colorSearchList; + std::vector<SbColor> colorSearchList; - //! inserts the points into the hashtable - const Vertex* insertVertex(const SbVec3f vector, const SbVec3f normal, const SbVec2f texCoord); - Edge* generateEdge(const Vertex* p1, const Vertex* p2); + //! inserts the points into the hashtable + const Vertex* insertVertex(const SbVec3f vector, const SbVec3f normal, const SbVec2f texCoord); + Edge* generateEdge(const Vertex* p1, const Vertex* p2); - //! generate TriangleStripSets out of the collected triangles - void generateITSS(); + //! generate TriangleStripSets out of the collected triangles + void generateITSS(); - //! map hashtable containing all vertices - std::set<Vertex*, ltVertex>* _hashTable; + //! map hashtable containing all vertices + std::set<Vertex*, ltVertex>* _hashTable; - //! set containing all edges - std::set<Edge*, ltEdge>* _edgeSet; + //! set containing all edges + std::set<Edge*, ltEdge>* _edgeSet; - //! vector containing all triangles - std::set<Triangle*>* _triangleSet; + //! vector containing all triangles + std::set<Triangle*>* _triangleSet; - //int _extentX, _extentY, _extentZ; + //int _extentX, _extentY, _extentZ; }; +//! Helper class Vertex used by class SoExtractColoredFaces. class Vertex { public: - Vertex(SbVec3f vertex, SbVec3f normal, SbVec2f texCoord); - SbVec3f vertex; - SbVec3f normal; - SbVec2f texCoord; - int vertexIndex; + Vertex(SbVec3f vertex, SbVec3f normal, SbVec2f texCoord); + SbVec3f vertex; + SbVec3f normal; + SbVec2f texCoord; + int vertexIndex; }; +//! Helper class Edge used by class SoExtractColoredFaces. class Edge { public: - Edge(); - Edge(Edge* edge); - virtual ~Edge(); - Triangle* getOppositeTriangle(const Triangle* tri) const; - void unrefTriangle(const Triangle* tri); - const Vertex* getVertex1() const; - const Vertex* getVertex2() const; - const Triangle* getTriangle1() const; - const Triangle* getTriangle2() const; - void setVertex1(const Vertex* v); - void setVertex2(const Vertex* v); - void setTriangle1(Triangle* tri); - void setTriangle2(Triangle* tri); + Edge(); + Edge(Edge* edge); + virtual ~Edge(); + Triangle* getOppositeTriangle(const Triangle* tri) const; + void unrefTriangle(const Triangle* tri); + const Vertex* getVertex1() const; + const Vertex* getVertex2() const; + const Triangle* getTriangle1() const; + const Triangle* getTriangle2() const; + void setVertex1(const Vertex* v); + void setVertex2(const Vertex* v); + void setTriangle1(Triangle* tri); + void setTriangle2(Triangle* tri); private: - const Vertex *_vertex1, *_vertex2; - Triangle *_triangle1, *_triangle2; + const Vertex *_vertex1, *_vertex2; + Triangle *_triangle1, *_triangle2; }; +//! Helper class Triangle used by class SoExtractColoredFaces. class Triangle { public: - Triangle(); - Triangle(Triangle* triangle); - Triangle(const Vertex *vertex1, const Vertex *vertex2, const Vertex *vertex3, Edge *edge1, Edge *edge2, Edge *edge3); - virtual ~Triangle(); - const Vertex* getOppositeVertex(const Edge* edge) const; - const Edge* getCWEdge(const Vertex* vertex) const; - const Edge* getCCWEdge(const Vertex* vertex) const; - const Vertex* getVertex1() const; - const Vertex* getVertex2() const; - const Vertex* getVertex3() const; - const Edge* getEdge1() const; - const Edge* getEdge2() const; - const Edge* getEdge3() const; + Triangle(); + Triangle(Triangle* triangle); + Triangle(const Vertex *vertex1, const Vertex *vertex2, const Vertex *vertex3, Edge *edge1, Edge *edge2, Edge *edge3); + virtual ~Triangle(); + const Vertex* getOppositeVertex(const Edge* edge) const; + const Edge* getCWEdge(const Vertex* vertex) const; + const Edge* getCCWEdge(const Vertex* vertex) const; + const Vertex* getVertex1() const; + const Vertex* getVertex2() const; + const Vertex* getVertex3() const; + const Edge* getEdge1() const; + const Edge* getEdge2() const; + const Edge* getEdge3() const; private: - const Vertex *_vertex1, *_vertex2, *_vertex3; - Edge *_edge1, *_edge2, *_edge3; + const Vertex *_vertex1, *_vertex2, *_vertex3; + Edge *_edge1, *_edge2, *_edge3; }; -//! sort criterion for the hashtable set +//! Sort criterion for the hashtable set. struct ltVertex { - //! sorts points lexicographical - //! test for vertex coordinates, if they are the same, test for color index - bool operator()(const Vertex* v1, const Vertex* v2) const { - const float* p1 = v1->vertex.getValue(); - const float* p2 = v2->vertex.getValue(); + //! sorts points lexicographical + //! test for vertex coordinates, if they are the same, test for color index + bool operator()(const Vertex* v1, const Vertex* v2) const { + const float* p1 = v1->vertex.getValue(); + const float* p2 = v2->vertex.getValue(); - if (*p1 < *p2) return true; - if (*p1 > *p2) return false; - if (*(++p1) < *(++p2)) return true; - if (*p1 > *p2) return false; - if (*(++p1) < *(++p2)) return true; - if (*p1 > *p2) return false; + if (*p1 < *p2) return true; + if (*p1 > *p2) return false; + if (*(++p1) < *(++p2)) return true; + if (*p1 > *p2) return false; + if (*(++p1) < *(++p2)) return true; + if (*p1 > *p2) return false; - p1 = v1->normal.getValue(); - p2 = v2->normal.getValue(); + p1 = v1->normal.getValue(); + p2 = v2->normal.getValue(); - if (*p1 < *p2) return true; - if (*p1 > *p2) return false; - if (*(++p1) < *(++p2)) return true; - if (*p1 > *p2) return false; - if (*(++p1) < *(++p2)) return true; - if (*p1 > *p2) return false; + if (*p1 < *p2) return true; + if (*p1 > *p2) return false; + if (*(++p1) < *(++p2)) return true; + if (*p1 > *p2) return false; + if (*(++p1) < *(++p2)) return true; + if (*p1 > *p2) return false; - p1 = v1->texCoord.getValue(); - p2 = v2->texCoord.getValue(); + p1 = v1->texCoord.getValue(); + p2 = v2->texCoord.getValue(); - if (*p1 < *p2) return true; - if (*p1 > *p2) return false; - if (*(++p1) < *(++p2)) return true; - if (*p1 > *p2) return false; - return false; - } + if (*p1 < *p2) return true; + if (*p1 > *p2) return false; + if (*(++p1) < *(++p2)) return true; + if (*p1 > *p2) return false; + return false; + } }; -//! sort criterion for the edge set +//! Sort criterion for the edge set. struct ltEdge { - bool operator()(const Edge edge1, const Edge edge2) const - { - const Vertex* e1v1 = edge1.getVertex1(); - const Vertex* e2v1 = edge2.getVertex1(); + bool operator()(const Edge edge1, const Edge edge2) const + { + const Vertex* e1v1 = edge1.getVertex1(); + const Vertex* e2v1 = edge2.getVertex1(); - if (e1v1 < e2v1) return true; - else { - if (e1v1 > e2v1) return false; - else { - const Vertex* e1v2 = edge1.getVertex2(); - const Vertex* e2v2 = edge2.getVertex2(); - if (e1v2 < e2v2) return true; - else return false; - } - } - } + if (e1v1 < e2v1) return true; + else { + if (e1v1 > e2v1) return false; + else { + const Vertex* e1v2 = edge1.getVertex2(); + const Vertex* e2v2 = edge2.getVertex2(); + if (e1v2 < e2v2) return true; + else return false; + } + } + } }; +//! Helper class SomException used by class SoExtractColoredFaces. class SomeException { public: - SomeException(char* details, int code) : details(details), code(code) {std::cerr << "Exception raised: " << details << '\n';}; - int code; - char* details; + SomeException(char* details, int code) : details(details), code(code) {std::cerr << "Exception raised: " << details << '\n';}; + int code; + char* details; }; Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/SoVerticalRuler.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/SoVerticalRuler.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/SoVerticalRuler.h 2009-06-25 09:11:08 UTC (rev 154) @@ -1,3 +1,6 @@ +//! Inventor node class SoVerticalRuler derived from SoSeparator. +//! \file SoVerticalRuler.h + #ifndef __SOVERTICALRULER_H #define __SOVERTICALRULER_H @@ -5,7 +8,7 @@ #include <Inventor/fields/SoFields.h> - +//! Inventor node class SoVerticalRuler derived from SoSeparator. class SO_MEASUREMENT_CLASS_SPEC SoVerticalRuler : public SoSeparator { SO_NODE_HEADER(SoVerticalRuler); @@ -13,13 +16,13 @@ public: SoSFColor color; - + //! inventor runtime type system static void initClass(); //! Constructor SoVerticalRuler(); - + protected: //! Protected destructor virtual ~SoVerticalRuler(); Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMainAxis.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMainAxis.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMainAxis.h 2009-06-25 09:11:08 UTC (rev 154) @@ -20,23 +20,23 @@ // $Id: UMDMainAxis.h,v 1.7 2003/02/19 16:36:42 okonrad Exp $ // $Source: /projects/repositories/mevis/Libraries/InventorModules/SoMeasurement/UMDMainAxis.h,v $ -/*! +/*! Class UMDMainAxis. // \file UMDMainAxis.h // \author Christian Tietjen // \date 09/2002 */ #ifndef _UMDMainAxis -#define _UMDMainAxis +#define _UMDMainAxis #include "UMDMeasurementInit.h" -//! Some functions to compute three vectors from a set of points -//! from the R3. The vectors represent the global orientation of the +//! Some functions to compute three vectors from a set of points +//! from the R3. The vectors represent the global orientation of the //! point set. class SO_MEASUREMENT_CLASS_SPEC UMDMainAxis { - + public: - + //! Constructor UMDMainAxis(); @@ -51,18 +51,18 @@ void getMainAxis(float*& xAxis, float*& yAxis, float*& zAxis); //! returns the three extensions of the object-orientated bounding box void getExtension(float& xExt, float& yExt, float& zExt); - + //! returns a copy of the largest main axis float* getLargestMainAxis(); //! returns the largest extension of the object-orientated bounding box float getLargestExtension(); - + //! returns a copy of the barycenter void getBaryCenter(float* x, float* y, float* z); //! returns a copy of the midpoint void getMidPoint(float* x, float* y, float* z); - + private: //! the three main axis @@ -78,14 +78,14 @@ //! calculation of the inverse matrix (3x3 matrices only) //! \c invMatrix is the inverted matrix of \c aMatrix void getInverseMatrix(float** aMatrix, float** invMatrix); - + //! returns a copy of the calculated barycenter. float* calcBaryCenter(const float* vertices, int size); - + //! computes the dot (inner / scalar) product of two vectors float dotProduct(const float* vec1, const float* vec2); //! retruns the BB of the point set - void getBoundingBox(const float* pointSet, const long size, + void getBoundingBox(const float* pointSet, const long size, float& minX, float& maxX, float& minY, float& maxY, float& minZ, float& maxZ); //! returns a copy of a vector with the direction of \c vector and the length \c length Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMinimalDistance.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMinimalDistance.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDMinimalDistance.h 2009-06-25 09:11:08 UTC (rev 154) @@ -19,7 +19,7 @@ // $Id: UMDMinimalDistance.h,v 1.13 2003/09/10 09:31:14 ritter Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDMinimalDistance.h,v $ -/*! +/*! Computes the shortest euclidean distance between two pointsets. // \file UMDMinimalDistance.h // \author Christian Tietjen // \date 09/2002 @@ -39,14 +39,14 @@ //! Based on: "Efficient Distance Computation between Non-Convex Objects" by Sean Quinlan //! see: graphics.stanford.edu/courses/cs468-01-winter/papers/q-edcbnco-94.ps class SO_MEASUREMENT_CLASS_SPEC UMDMinimalDistance { - + public: - + //! Constructor UMDMinimalDistance(); //! Destructor virtual ~UMDMinimalDistance(); - + //! This method passes the two pointsets in the form of two float-arrays (x,y,z, x,y,z, ...) //! and the number of the vectors void setPointSets(float* pointSet1, float* pointSet2, long size1, long size2); @@ -67,16 +67,16 @@ int getUniqueIndex(); //! returns a pointer on the hashtable HashTable* getHashTable(); - + //! returns the spheres for debugging purposes void displaySpheres(bool onOff); //! contains transparent spheres describing the tile spheres SoSeparator *_tileSphere1, *_tileSphere2; //! dumps the console with additional debbuging info void verbose(bool onOff); - + private: - + //! the one point set float* _pointSet1; //! the other point set @@ -90,7 +90,7 @@ //! the maintainable error float _error; - + //! dumps the console with additional debbuging info bool _verbose; //! decides whether the transparent spheres should be displayed @@ -100,7 +100,7 @@ //! set by \c setNumEntries int _entries, _partition; - + //! generates the tree of spheres for each point set TileSphere* generateTree(float* pointSet, long size); //! gets the BB of the main point set @@ -112,16 +112,16 @@ //! It defines a single sub sphere for the algorithm. //! TileSphere will generate her own sub spheres if necessary class TileSphere { - + public: - + //! default Constructor TileSphere(); //! Constructor with a pointer on the main class and presets for the distance computation TileSphere(UMDMinimalDistance* minimalDistance, int maxPartition = 2, int numElements = 2000, float error = 0); //! Destructor virtual ~TileSphere(); - + //! must be called, when TileSphere was instantiated with the default constructor. void setParameter(UMDMinimalDistance* minimalDistance, int maxPartition, int numElements, float error); @@ -133,8 +133,8 @@ void getDeFactoSize(); //! computes the distance and returns a reference to the nearest points of both sets float computeDistance(TileSphere* tileSphere, float*& point1, float*& point2); - + //! returns the index of the TileSphere int32_t getSphereIndex(); @@ -145,7 +145,7 @@ private: - + //! initializes the tile sphere void initSphere(UMDMinimalDistance* minimalDistance, int partition, int numElements, float error); //! pointer on the main class @@ -163,21 +163,21 @@ bool _hasSubSpheres; //! stores the number of sub spheres, according to _partition to the power of 3 int _partition; - + //! pointer on the containing points float** _subset; //! number of containing points int _numEntries; //! maximum number of containing points int _maxEntries; - + //! dimension of the point set float _minX, _maxX, _minY, _maxY, _minZ, _maxZ; //! position vector of the tile sphere float _position[3]; //! radius of the tile sphere float _radius; - + //! returns the BB of the tile sphere void getBB(float& minX, float& maxX, float& minY, float& maxY, float& minZ, float& maxZ); //! returns the postion vector @@ -218,14 +218,14 @@ //! It defines a single sub sphere for the algorithm. //! TileSphere will generate her own sub spheres if necessary class HashTable { - + public: - + //! Constructor HashTable(); //! Destructor virtual ~HashTable(); - + //! adds a pair of spheres into the hashtable void addPair(TileSphere* tileSphere1, TileSphere* tileSphere2); //! checks, whether the pair exists or not @@ -233,9 +233,9 @@ //! hashtable statistics void getStatistics(int &addedPairs, int &hits, int &misses); - + private: - + //! size of the hashtable (1000) int _hashSize; //! the hashtable, consisting of an array of \c vector 's @@ -243,7 +243,7 @@ //! hashtable statistics int _addedPairs, _hits, _misses; - + }; Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAngleLines.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAngleLines.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAngleLines.h 2009-06-25 09:11:08 UTC (rev 154) @@ -20,7 +20,7 @@ // $Id: UMDSoAngleLines.h,v 1.7 2003/02/19 16:36:42 okonrad Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoAngleLines.h,v $ -/*! +/*! The Inventor node class UMDSoAngleLines derived from SoSeparator and UMDSoMeasureTool, implementing two lines for angle measurements. // \file UMDSoAngleLines.h // \author Henry Sonnet / Christian Tietjen // \date 09/2002 @@ -50,7 +50,7 @@ -//! UMDSoAngleLines sind zwei Linien zur Winkelbestimmung; +//! The Inventor node class UMDSoAngleLines derived from SoSeparator and UMDSoMeasureTool implementing two lines for angle measurements; //! beide Linien besitzen die gleiche Anfangsposition; //! an dieser Anfangsposition befindet sich eine Kugel, //! bei deren Picken ein Dragger erscheint, der beide @@ -58,30 +58,30 @@ //! An den Endpunkten der beiden Linien befindet sich //! jeweils ein Kegel, bei dessen Picken ein \c SoDragger3D //! erscheint, der das entsprechende Linienende bewegt. -//! Eine der beiden Linien ist in der Mitte +//! Eine der beiden Linien ist in der Mitte //! geteilt, diese Luecke dient der Plazierung des Winkels; //! //! R\xFCckgabe: eingeschlossener Winkel der beiden Linien //! Basisklasse: \c SoMeasureTool //! -//! Die Interaktionsmoeglichkeiten sind im Header von +//! Die Interaktionsmoeglichkeiten sind im Header von //! \c SoMeasureTool beschrieben class SO_MEASUREMENT_CLASS_SPEC UMDSoAngleLines : public UMDSoMeasureTool { //! macro that defines extended methods SO_NODE_HEADER(UMDSoAngleLines); - + public: - + //! Konstruktor UMDSoAngleLines(); - + //! must be called first to initialize the class in OpenInventor static void initClass(); - + //! zweiter und dritter Eckpunkt des Werkzeugs SoSFVec3f endPos, connectPos; - + //! Wert, bei dessen Unterschreiten Linie geschlossen dargestellt wird SoSFFloat minDistance; @@ -94,45 +94,45 @@ virtual ~UMDSoAngleLines(); -private: +private: - //! gibt einen Gruppenknoten zurueck, der die + //! gibt einen Gruppenknoten zurueck, der die //! Pfeilenden sowie eine Kugel am gemeinsamen Startpunkt enthaelt; void createInteractionSep(); //! haengt Knoten in Graphen void createAngleLines(); - + //! Rueckgabe eines Separators mit Text void createText(); - + //! Erzeugen der Rotationsengines etc void createRotationCalcs(); - + //! creates the orientation areas SoSeparator* createAreasSep(); - + //! verschiebt den Text an die richtige Position void getTextTrafo(); - + //! Setzt den darzustellenden Text void getTextString(); - + //! additional initializations void initAngleLines(); - + //! Feld-Sensoren initialisieren void initAngleLinesFieldSensors(); - + //! Welches Objekt wurde getroffen SbBool getPickedObjectMouseLeft(const SoPickedPoint *pickedPoint); - + //! Flaechen zur besseren Orientierung void getAreas(); - + //! die Funktionen zum Bewegen der Pfeilspitzen bei Tastatur-Events SbBool setArrowByKeyboard(float x, float y, float z, Taste taste); - + //! \c endPos changed by user static void endChangedCB(void *userData, SoSensor* s); //! \c connectPos changed by user @@ -140,9 +140,9 @@ //! called if one of the vertices was changed void pointChanged(); - + // ##### Die Instanz-Variablen ####### - + //! calculates the parameters for the four arrows and the angle SoCalculator *_arrowCalc, *_angleCalc; @@ -155,12 +155,12 @@ SoComposeRotationFromTo *_kreisInEbeneCRFT, *_kreisDrehenCRFT; //! intermediate rotation SoRotation *_rotTemp; - + //! the measure text SoExtText2 *_angleText; //! moves the cube needed for the text-LOD SoTransform *_cubeTrafo; - + //! shows the areas if activ SoSwitch *_showAreasSwitch; //! vertex property for \c _areas Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAngleToObjects.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAngleToObjects.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAngleToObjects.h 2009-06-25 09:11:08 UTC (rev 154) @@ -20,7 +20,7 @@ // $Id: UMDSoAngleToObjects.h,v 1.10 2003/09/23 17:24:33 milo Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoAngleToObjects.h,v $ -/*! +/*! Computes the angle between two objects on the basis of the main axis computation. // \file UMDSoAngleToObjects.h // \author Christian Tietjen // \date 09/2002 @@ -41,20 +41,20 @@ class SO_MEASUREMENT_CLASS_SPEC UMDSoAngleToObjects : public UMDSoAutoMeasureTool { //! macro that defines extended methods SO_NODE_HEADER(UMDSoAngleToObjects); - - + + public: - + //! Constructor UMDSoAngleToObjects(); - + //! must be called first to initialize the class in OpenInventor static void initClass(); - + // ######## Fields ############## - + //! the second input object -#ifdef ILAB5 +#ifdef ILAB5 SoSFNode inObject2Node; #else SoSFNode inputObject2; Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoArrow.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoArrow.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoArrow.h 2009-06-25 09:11:08 UTC (rev 154) @@ -13,7 +13,7 @@ // $Id: UMDSoArrow.h,v 1.6 2003/02/19 16:37:15 okonrad Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoArrow.h,v $ -/*! +/*! Inventor node class generating an arrow which has a position and a reference point, from where it is pointing. // \file UMDSoArrow.h // \author Christian Tietjen // \date 10/2001 @@ -30,8 +30,7 @@ class SoDrawStyle; class SoFieldSensor; -//! generates an arrow -//! the arrow has a position and a reference point, from where he points at +//! Inventor node class generating an arrow which has a position and a reference point, from where it is pointing. class SO_MEASUREMENT_CLASS_SPEC UMDSoArrow : public SoSeparator { //! macro that defines extended methods SO_NODE_HEADER(UMDSoArrow); @@ -44,7 +43,7 @@ //! must be called first to initialize the class in OpenInventor static void initClass(); - + // ######## Fields ############## //! Position der Pfeilspitze SoSFVec3f position; @@ -66,7 +65,7 @@ virtual ~UMDSoArrow(); -private: +private: //! im nachhinein \xFCberfl\xFCssig, wird jetzt aber zum aufrechterhalten der Hierarchie //! beim \xDCberpr\xFCfen der PickAction ben\xF6tigt Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAutoMeasureTool.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAutoMeasureTool.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoAutoMeasureTool.h 2009-06-25 09:11:08 UTC (rev 154) @@ -12,7 +12,7 @@ // $Id: UMDSoAutoMeasureTool.h,v 1.7 2003/09/23 17:24:33 milo Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoAutoMeasureTool.h,v $ -/*! +/*! The inventor node class UMDSoAutoMeasureTool which is the base class for all automatic measurement tools. // \file UMDSoAutoMeasureTool.h // \author Christian Tietjen // \date 09/2002 @@ -26,22 +26,22 @@ class SoFieldSensor; -//! This is the base class for all automatic measurement tools +//! This is the base class for all automatic measurement tools. class SO_MEASUREMENT_CLASS_SPEC UMDSoAutoMeasureTool : public SoSeparator { //! macro that defines extended methods SO_NODE_HEADER(UMDSoAutoMeasureTool); - - + + public: - + //! Constructor UMDSoAutoMeasureTool(); - + //! must be called first to initialize the class in OpenInventor static void initClass(); - + // ######## Fields ############## - + //! is true if the calculated results are valid SoSFBool resultsValid; @@ -73,7 +73,7 @@ //! Attention!: this feature is only given by special pointsets! shapes contain every point six times, //! because the points belong to several triangles //SoSFBool isUnique; - + //! forces the computation, returns true if computation was successful bool calculate(); Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoCake.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoCake.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoCake.h 2009-06-25 09:11:08 UTC (rev 154) @@ -13,7 +13,7 @@ // $Id: UMDSoCake.h,v 1.5 2003/02/19 16:37:15 okonrad Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoCake.h,v $ -/*! +/*! Inventor node class to generate a cylinder, from which a part is resected. // \file UMDSoCake.h // \author Christian Tietjen // \date 11/2001 @@ -30,7 +30,7 @@ class SoIndexedFaceSet; class SoVertexProperty; -//! Generated a cylinder, from which a part is resected +//! Inventor node class to generate a cylinder, from which a part is resected. class SO_MEASUREMENT_CLASS_SPEC UMDSoCake : public SoSeparator { //! macro that defines extended methods SO_NODE_HEADER(UMDSoCake); @@ -43,7 +43,7 @@ //! must be called first to initialize the class in OpenInventor static void initClass(); - + //! the angle in arc resp. degree SoSFFloat angleArc, angleDegree; //! the measures of the cake @@ -56,11 +56,11 @@ virtual ~UMDSoCake(); -private: +private: //! Feld-Sensoren initialisieren void initCakeFieldSensors(); - + //! additional initializations void initUMDSoCake(); Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoDistanceLine.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoDistanceLine.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoDistanceLine.h 2009-06-25 09:11:08 UTC (rev 154) @@ -20,7 +20,7 @@ // $Id: UMDSoDistanceLine.h,v 1.9 2003/02/19 16:37:15 okonrad Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoDistanceLine.h,v $ -/*! +/*! Inventor node class UMDSoDistanceLine is a line for distance measurements. // \file UMDSoDistanceLine.h // \author Henry Sonnet / Christian Tietjen // \date 10/2001 @@ -39,7 +39,7 @@ class SoTransform; -//! UMDSoDistanceLine ist eine Linie zur Abstandsmessung; +//! Inventor node class UMDSoDistanceLine is a line for distance measurements; //! Die Linie besteht, wenn sie eine bestimmte Laenge ueber- //! schreitet, aus zwei getrennten Zylindern, zwischen denen //! sich die Abstandszahl sowie auf Wunsch eine Einheit @@ -53,24 +53,24 @@ //! R\xFCckgabe: L\xE4nge der Distanz //! Basisklasse: \c SoMeasureTool //! -//! Die Interaktionsmoeglichkeiten sind im Header von +//! Die Interaktionsmoeglichkeiten sind im Header von //! \c SoMeasureTool beschrieben class SO_MEASUREMENT_CLASS_SPEC UMDSoDistanceLine : public UMDSoMeasureTool { //! macro that defines extended methods SO_NODE_HEADER(UMDSoDistanceLine); - + public: - + //! Constructor UMDSoDistanceLine(); - + //! must be called first to initialize the class in OpenInventor static void initClass(); - + //! the second vertex SoSFVec3f endPos; - + //! Wert, bei dessen Unterschreiten die Linie //! geschlossen dargestellt wird SoSFFloat minDistance; @@ -91,39 +91,39 @@ virtual ~UMDSoDistanceLine(); -private: - +private: + //! haengt Knoten in Graphen void createDistLine(); - //! gibt einen Gruppenknoten zurueck, der die beiden + //! gibt einen Gruppenknoten zurueck, der die beiden //! Pfeilenden enthaelt void createArrows(); //! Rueckgabe eines Separators mit Text void createText(); - + //! Positionsaenderungen void getTextTrafo(); - + //! Setzt den darzustellenden Text void getTextString(); - + //! additional initializations void initDistanceLine(); - + //! Feld-Sensoren initialisieren void initDistLineFieldSensors(); - + //! Welches Objekt wurde getroffen SbBool getPickedObjectMouseLeft(const SoPickedPoint *pickedPoint); - + //! called if one of the vertices was changed void pointChanged(); - + //! die Funktionen zum Bewegen der Pfeilspitzen bei Tastatur-Events SbBool setArrowByKeyboard(float x, float y, float z, Taste taste); - + //! \c endPos changed by user static void endChangedCB(void *userData, SoSensor* s); Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMainAxis.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMainAxis.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMainAxis.h 2009-06-25 09:11:08 UTC (rev 154) @@ -20,7 +20,7 @@ // $Id: UMDSoMainAxis.h,v 1.15 2003/09/05 16:14:44 milo Exp $ // $Source: /projects/repositories/mevis/Libraries/std/Inventor/SoMeasurement/UMDSoMainAxis.h,v $ -/*! +/*! This is the inventor interface for the MainAxis class. // \file UMDSoMainAxis.h // \author Christian Tietjen // \date 09/2002 @@ -42,18 +42,18 @@ class SO_MEASUREMENT_CLASS_SPEC UMDSoMainAxis : public UMDSoAutoMeasureTool { //! macro that defines extended methods SO_NODE_HEADER(UMDSoMainAxis); - - + + public: - + //! Constructor UMDSoMainAxis(); - + //! must be called first to initialize the class in OpenInventor static void initClass(); - + // ######## Fields ############## - + //! the three inertia axis SoSFVec3f xAxis, yAxis, zAxis; @@ -94,7 +94,7 @@ ORIGIN_BARYCENTER=barycenter, ORIGIN_MIDPOINT =midpoint }; - + //! indicates the first member processing to set the \c color bool _firstInit; Modified: trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDSoMeasurement/UMDSoMaximumExtension.h 2009-06-25 09:11:08 UTC (rev 154) @@ -1,3 +1,7 @@ +/*! Inventor node class UMDSoMaximumExtension calculating a maximum extension. +// \file UMDSoMaximumExtension.h +*/ + #ifndef _UMDSoMaximumExtension #define _UMDSoMaximumExtension @@ -12,140 +16,141 @@ class SoLineSet; class UMDSoShapeToPointSet; +//! Inventor node class UMDSoMaximumExtension calculating a maximum extension. class SO_MEASUREMENT_CLASS_SPEC UMDSoMaximumExtension : public SoSeparator{ - //! macro that defines extended methods - SO_NODE_HEADER(UMDSoMaximumExtension); + //! macro that defines extended methods + SO_NODE_HEADER(UMDSoMaximumExtension); public: - //! Constructor - UMDSoMaximumExtension(); + //! Constructor + UMDSoMaximumExtension(); - //! must be called first to initialize the class in OpenInventor - static void initClass(); + //! must be called first to initialize the class in OpenInventor + static void initClass(); - // ######## Fields ############## + // ######## Fields ############## - // the extensions - SoSFFloat diameter; // Z-axis - SoSFFloat depth; // Y-axis - SoSFFloat width; // X-axis + // the extensions + SoSFFloat diameter; // Z-axis + SoSFFloat depth; // Y-axis + SoSFFloat width; // X-axis - SoSFFloat midPoint; - SoSFInt32 SizeOfPointSet; + SoSFFloat midPoint; + SoSFInt32 SizeOfPointSet; - // input - SoSFNode inObjectNode; + // input + SoSFNode inObjectNode; - // decides whether the display modes will be displayed or not - SoSFBool displayInput; - SoSFBool displayDistanceLine; - SoSFBool displayUnit; - SoSFBool displayBBox; - SoSFBool displayMainAxes; - SoSFBool largestValueOnly; + // decides whether the display modes will be displayed or not + SoSFBool displayInput; + SoSFBool displayDistanceLine; + SoSFBool displayUnit; + SoSFBool displayBBox; + SoSFBool displayMainAxes; + SoSFBool largestValueOnly; - //! the entity, in which the measure of the diameters is shown - SoSFEnum unit; + //! the entity, in which the measure of the diameters is shown + SoSFEnum unit; - //! points with the maximum distance of the point set for drawing a line between them - //------------------ - //- main_objectAxis --- - //------------------ - SoSFVec3f pDiameter_1; - SoSFVec3f pDiameter_2; - //------------------ - //- x_objectAxis = depth --- - //------------------ - SoSFVec3f pDepth_1; // depth point 1 - SoSFVec3f pDepth_2; // depth point 2 - - //------------------ - //- y_objectAxis = width --- - //------------------ - SoSFVec3f pWidth_1; // width point 3 - SoSFVec3f pWidth_2; // width point 4 - + //! points with the maximum distance of the point set for drawing a line between them + //------------------ + //- main_objectAxis --- + //------------------ + SoSFVec3f pDiameter_1; + SoSFVec3f pDiameter_2; + //------------------ + //- x_objectAxis = depth --- + //------------------ + SoSFVec3f pDepth_1; // depth point 1 + SoSFVec3f pDepth_2; // depth point 2 + + //------------------ + //- y_objectAxis = width --- + //------------------ + SoSFVec3f pWidth_1; // width point 3 + SoSFVec3f pWidth_2; // width point 4 + protected: - //! Destructor - virtual ~UMDSoMaximumExtension(); + //! Destructor + virtual ~UMDSoMaximumExtension(); private: - enum eUnit {deg, mm, cmm, cm, m, ml, l}; - SoFieldSensor* _computeMaximumExtensionSens; - // Sensor f\xFCr Darstellungsver\xE4nderungen - SoFieldSensor* _lineColorSens; - SoFieldSensor* _displayDistLineSens; - SoFieldSensor* _displayInputSens; - SoFieldSensor* _displayUnitSens; - SoFieldSensor* _displayMainAxes; - SoFieldSensor* _displayLargValueOnly; - SoFieldSensor* _displayBBox; - - UMDSoShapeToPointSet* _shapeToPointSet; + enum eUnit {deg, mm, cmm, cm, m, ml, l}; + SoFieldSensor* _computeMaximumExtensionSens; + // Sensor f\xFCr Darstellungsver\xE4nderungen + SoFieldSensor* _lineColorSens; + SoFieldSensor* _displayDistLineSens; + SoFieldSensor* _displayInputSens; + SoFieldSensor* _displayUnitSens; + SoFieldSensor* _displayMainAxes; + SoFieldSensor* _displayLargValueOnly; + SoFieldSensor* _displayBBox; - //! convex hull of the point set - SoQHull3D* _convexHull; - SoGroup* group; + UMDSoShapeToPointSet* _shapeToPointSet; - static void computeMaximumExtensionCB(void *userData, SoSensor*); - static void displayChanged(void* userData, SoSensor*); - void getPointSet(SoGroup* inputGroup, float* &pointSet, int &size); - bool _computeMaximumExtension(); - UMDSoDistanceLine* insertDistanceLine(); - // calculates the euclidean distance between two points - float computeDistance(float* p_fPoint1, float* p_fPoint2); - float computeDistance(SbVec3f vec1, SbVec3f vec2); + //! convex hull of the point set + SoQHull3D* _convexHull; + SoGroup* group; - // computes the diameter - float computeMaxExtensionBruteForce(float* p_fPointSet, int lSize); - void computeWidthExtension(int &size); + static void computeMaximumExtensionCB(void *userData, SoSensor*); + static void displayChanged(void* userData, SoSensor*); + void getPointSet(SoGroup* inputGroup, float* &pointSet, int &size); + bool _computeMaximumExtension(); + UMDSoDistanceLine* insertDistanceLine(); + // calculates the euclidean distance between two points + float computeDistance(float* p_fPoint1, float* p_fPoint2); + float computeDistance(SbVec3f vec1, SbVec3f vec2); - // computes the (orthogonal)projection point q of an point p on a line - SbVec3f computeHessianPoint(SbVec3f startPos, SbVec3f endPos, float x, float y, float z); - float computeHessianPointLength(SbVec3f startPos, SbVec3f endPos, float x, float y, float z); - - // display mode -> MainAxes or BBox - void insertMainAxes(); - void insertExtentPoints(); - void insertBBox(); + // computes the diameter + float computeMaxExtensionBruteForce(float* p_fPointSet, int lSize); + void computeWidthExtension(int &size); - void clear();//bisher nur eine Fkt. enthalten, wenn es nicht mehr werden clear() aufgeben - void OnChange(); - void display(); + // computes the (orthogonal)projection point q of an point p on a line + SbVec3f computeHessianPoint(SbVec3f startPos, SbVec3f endPos, float x, float y, float z); + float computeHessianPointLength(SbVec3f startPos, SbVec3f endPos, float x, float y, float z); - float* pointSet; + // display mode -> MainAxes or BBox + void insertMainAxes(); + void insertExtentPoints(); + void insertBBox(); - // orthogonal distances from the widthpoints to the objectaxis; zur Skalierung der 3. Main Axis - float fDistPt1tooZAxis, fDistPt2tooZAxis, fDistPt3tooZAxis, fDistPt4tooZAxis; + void clear();//bisher nur eine Fkt. enthalten, wenn es nicht mehr werden clear() aufgeben + void OnChange(); + void display(); - // nur f\xFCr zwischenanzeige - float* pointSet2; // Translated pointSet - float* pointSet3; // Rotated pointSet2 to z-Axis - float* pointSet4; // Rotated pointSet3 to y-z-Face + float* pointSet; - SoSFVec3f vWidthPt1_bb; // transformed point for main axis and bbox - SoSFVec3f vWidthPt1_ortho; // corresponding point to the first width point on object x-axis - SoSFVec3f vWidthPt2_bb; // transformed point for main axis and bbox - SoSFVec3f vWidthPt2_ortho; // corresponding point to the second width point on object x-axis - SoSFVec3f vWidthPt3_bb; // transformed point for main axis and bbox - SoSFVec3f vWidthPt3_ortho; // corresponding point to the first width point on object z-axis - SoSFVec3f vWidthPt4_bb; // transformed point for main axis and bbox - SoSFVec3f vWidthPt4_ortho; // corresponding point to the first width point on object z-axis - + // orthogonal distances from the widthpoints to the objectaxis; zur Skalierung der 3. Main Axis + float fDistPt1tooZAxis, fDistPt2tooZAxis, fDistPt3tooZAxis, fDistPt4tooZAxis; - // width of the bounding box line - SoSFFloat lineWidthBBox; - SoSFColor colBBox; - - // line for dislaying the maximum and the width distance - UMDSoDistanceLine *_distanceLine; - SoSFFloat fScaleLine; - SoSFFloat lrgSide; + // nur f\xFCr zwischenanzeige + float* pointSet2; // Translated pointSet + float* pointSet3; // Rotated pointSet2 to z-Axis + float* pointSet4; // Rotated pointSet3 to y-z-Face + SoSFVec3f vWidthPt1_bb; // transformed point for main axis and bbox + SoSFVec3f vWidthPt1_ortho; // corresponding point to the first width point on object x-axis + SoSFVec3f vWidthPt2_bb; // transformed point for main axis and bbox + SoSFVec3f vWidthPt2_ortho; // corresponding point to the second width point on object x-axis + SoSFVec3f vWidthPt3_bb; // transformed point for main axis and bbox + SoSFVec3f vWidthPt3_ortho; // corresponding point to the first width point on object z-axis + SoSFVec3f vWidthPt4_bb; // transformed point for main axis and bbox + SoSFVec3f vWidthPt4_ortho; // corresponding point to the first width point on object z-axis + + + // width of the bounding box line + SoSFFloat lineWidthBBox; + SoSFColor colBBox; + + // line for dislaying the maximum and the width distance + UMDSoDistanceLine *_distanceLine; + SoSFFloat fScaleLine; + SoSFFloat lrgSide; + }; -#endif +#endif \ No newline at end of file Modified: trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.h 2009-06-25 09:11:08 UTC (rev 154) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! The Inventor module class SomnOffscreenRenderer derived from SoSeparator +//! The Inventor module class SomnOffscreenRenderer derived from SoSeparator. /*! // \file SomnOffscreenRenderer.h // \author Mathias Neugebauer // \date 2007-03-30 // -// +// */ //---------------------------------------------------------------------------------- @@ -39,7 +39,7 @@ class SbViewportRegion; -//! +//! The Inventor module class SomnOffscreenRenderer derived from SoSeparator. class UMDMNOFFSCREENRENDERER_EXPORT SomnOffscreenRenderer : public SoSeparator { //! Implements the runtime type system interface of this new node. @@ -53,17 +53,17 @@ //! Initializes this class (called on dll initialization). static void initClass(); - void setTransparency ( SoGLRenderAction::TransparencyType eTrans ); - void setSceneRoot ( SoNode *scene ); + void setTransparency ( SoGLRenderAction::TransparencyType eTrans ); + void setSceneRoot ( SoNode *scene ); SoNode* getSceneRoot() { return m_fldScene.getValue(); }; - void setInsideGlFunc ( void (*insideGlFunc) (void) ); - void setAttachmentFunc ( void (*attachmentFunc) (void) ); - void createBuffer ( void ); - void render ( void ); - void setSizeX ( int iX ); - void setSizeY ( int iY ); - int getSizeX ( void ); - int getSizeY ( void ); + void setInsideGlFunc ( void (*insideGlFunc) (void) ); + void setAttachmentFunc ( void (*attachmentFunc) (void) ); + void createBuffer ( void ); + void render ( void ); + void setSizeX ( int iX ); + void setSizeY ( int iY ); + int getSizeX ( void ); + int getSizeY ( void ); protected: @@ -90,49 +90,49 @@ bool initFramebufferExtension(); void printFrameBufferStatus(GLenum status); void saveToFile(); - + // handles to the frame buffer and render buffer objects - GLuint fbo; - GLuint colorBuffer; - GLuint depthBuffer; + GLuint fbo; + GLuint colorBuffer; + GLuint depthBuffer; CmnOGLOffscreen* m_poOff; - int m_bufferType; - int m_iBufferSizeX, m_iBufferSizeY; - SoSFNode m_fldScene; - SoSFShort bufferSizeX, bufferSizeY; - SoSFTrigger m_flCreateBuffer, m_flRender; - bool m_flHasBuffer; - SoSFBool saveImage; + int m_bufferType; + int m_iBufferSizeX, m_iBufferSizeY; + SoSFNode m_fldScene; + SoSFShort bufferSizeX, bufferSizeY; + SoSFTrigger m_flCreateBuffer, m_flRender; + bool m_flHasBuffer; + SoSFBool saveImage; #ifdef USE_AVISAVE - SoSFBool saveAVI; + SoSFBool saveAVI; #endif - SoSFString fldFilename; - SoSFEnum transparencyType; + SoSFString fldFilename; + SoSFEnum transparencyType; enum _enum_transparencyType { SCREEN_DOOR = SoGLRenderAction::SCREEN_DOOR, - ADD = SoGLRenderAction::ADD, - DELAYED_ADD = SoGLRenderAction::DELAYED_ADD, - SORTED_OBJECT_ADD = SoGLRenderAction::SORTED_OBJECT_ADD, - BLEND = SoGLRenderAction::BLEND, - DELAYED_BLEND = SoGLRenderAction::DELAYED_BLEND, - SORTED_OBJECT_BLEND = SoGLRenderAction::SORTED_OBJECT_BLEND }; + ADD = SoGLRenderAction::ADD, + DELAYED_ADD = SoGLRenderAction::DELAYED_ADD, + SORTED_OBJECT_ADD = SoGLRenderAction::SORTED_OBJECT_ADD, + BLEND = SoGLRenderAction::BLEND, + DELAYED_BLEND = SoGLRenderAction::DELAYED_BLEND, + SORTED_OBJECT_BLEND = SoGLRenderAction::SORTED_OBJECT_BLEND }; - SoSFTrigger readyTrigger; + SoSFTrigger readyTrigger; #ifdef USE_AVISAVE - SoSFTrigger finishAVI; - SoSFString aviFilename; - SoSFInt32 aviFramerate; + SoSFTrigger finishAVI; + SoSFString aviFilename; + SoSFInt32 aviFramerate; #endif - SoSFEnum bufferType; - enum _enum_BufferType { BUFFER_AUTO=0, + SoSFEnum bufferType; + enum _enum_BufferType { BUFFER_AUTO=0, #ifdef USE_WINPBUFFER - BUFFER_PBUFFER=1, BUFFER_FRAMEBUFFER=2, BUFFER_SCREENSHOT=3 + BUFFER_PBUFFER=1, BUFFER_FRAMEBUFFER=2, BUFFER_SCREENSHOT=3 #else - BUFFER_FRAMEBUFFER=1, BUFFER_SCREENSHOT=2 + BUFFER_FRAMEBUFFER=1, BUFFER_SCREENSHOT=2 #endif }; - + SoGLRenderAction* m_renderAction; const SbViewportRegion* m_region; Modified: trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.h 2009-06-25 09:11:08 UTC (rev 154) @@ -1,3 +1,6 @@ +//! Class CmnOGLOffscreen and struct PBUFFER. +//! \file mnOGLOffscreen.h + #ifndef MNOGLOFFSCREEN__H #define MNOGLOFFSCREEN__H @@ -11,6 +14,7 @@ #include "wglext.h" +//! Struct PBUFFER. typedef struct { HPBUFFERARB hPBuffer; @@ -21,6 +25,7 @@ } PBUFFER; +//! Class CmnOGLOffscreen class CmnOGLOffscreen { public: @@ -35,10 +40,10 @@ private: int iWidth, iHeight; // HGLRC m_hglrc; - HDC m_hgldc; + HDC m_hgldc; HGLRC m_hglrc_old; - HDC m_hgldc_old; - + HDC m_hgldc_old; + PBUFFER g_pbuffer; PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB; Property changes on: trunk/UMD/METK/Sources/ML/kAviWriter ___________________________________________________________________ Added: svn:ignore + MLkAviWriter.sln MLkAviWriter.suo MLkAviWriter.vcproj MLkAviWriter.vcproj.lapsus-win.wolf.user Modified: trunk/UMD/METK/Sources/common/ObjMgrCommunicator.h =================================================================== --- trunk/UMD/METK/Sources/common/ObjMgrCommunicator.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/common/ObjMgrCommunicator.h 2009-06-25 09:11:08 UTC (rev 154) @@ -1,11 +1,11 @@ //---------------------------------------------------------------------------------- -//! Class to handle communication with ObjMgr via get and set functions +//! Class to handle communication with ObjMgr via get and set functions. /*! // \file ObjMgrCommunicator.h // \author Konrad M\xFChler // \date 2006-11-02 // -// +// */ //---------------------------------------------------------------------------------- @@ -19,7 +19,7 @@ #ifndef common_EXPORTS #define __COMMON_IMPORTEXPORT __declspec(dllimport) #else -#define __COMMON_IMPORTEXPORT __declspec(dllexport) +#define __COMMON_IMPORTEXPORT __declspec(dllexport) #endif #else #define __COMMON_IMPORTEXPORT @@ -44,29 +44,30 @@ ML_START_NAMESPACE +//! Class to handle communication with ObjMgr via get and set functions. class __COMMON_IMPORTEXPORT ObjMgrCommunicator : public ObjMgrClient { public: - ObjMgrCommunicator (void); + ObjMgrCommunicator (void); - virtual void handleObjMgrNotification(); + virtual void handleObjMgrNotification(); - void setObjAttribute(const string ObjID, const string LayerID, const string InfoID, void* value, const string omInfoType, const bool createIfNotExists, const bool persistent, const bool ignoreType=false); - bool getObjAttribute(const string ObjID, const string LayerID, const string InfoID, omAttribute& attr); - bool getObjAttributeVec3f(const string ObjID, const string LayerID, const string InfoID, SbVec3f& vec3f); - bool getObjAttributeVec4f(const string ObjID, const string LayerID, const string InfoID, SbVec4f& vec4f); - bool getObjAttributeString(const string ObjID, const string LayerID, const string InfoID, string& value); - bool getObjAttributeFloat(const string ObjID, const string LayerID, const string InfoID, float& value); - bool getObjAttributeInt(const string ObjID, const string LayerID, const string InfoID, int& value); - bool getObjAttributeBool(const string ObjID, const string LayerID, const string InfoID, bool& value); + void setObjAttribute(const string ObjID, const string LayerID, const string InfoID, void* value, const string omInfoType, const bool createIfNotExists, const bool persistent, const bool ignoreType=false); + bool getObjAttribute(const string ObjID, const string LayerID, const string InfoID, omAttribute& attr); + bool getObjAttributeVec3f(const string ObjID, const string LayerID, const string InfoID, SbVec3f& vec3f); + bool getObjAttributeVec4f(const string ObjID, const string LayerID, const string InfoID, SbVec4f& vec4f); + bool getObjAttributeString(const string ObjID, const string LayerID, const string InfoID, string& value); + bool getObjAttributeFloat(const string ObjID, const string LayerID, const string InfoID, float& value); + bool getObjAttributeInt(const string ObjID, const string LayerID, const string InfoID, int& value); + bool getObjAttributeBool(const string ObjID, const string LayerID, const string InfoID, bool& value); private: - - typedef ObjMgrClient inherited; - - ML_CLASS_HEADER(ObjMgrCommunicator) - + + typedef ObjMgrClient inherited; + + ML_CLASS_HEADER(ObjMgrCommunicator) + }; Modified: trunk/UMD/METK/Sources/common/XMLParser.h =================================================================== --- trunk/UMD/METK/Sources/common/XMLParser.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/common/XMLParser.h 2009-06-25 09:11:08 UTC (rev 154) @@ -1,5 +1,5 @@ -//! An XMLParser class based on Xerces. -//! file XMLParser.h +//! Classes XMLParser and XMLParserErrorHandler based on Xerces. +//! \file XMLParser.h #ifndef _XMLParser_ #define _XMLParser_ Modified: trunk/UMD/METK/Sources/common/image_basic.h =================================================================== --- trunk/UMD/METK/Sources/common/image_basic.h 2009-06-25 09:07:51 UTC (rev 153) +++ trunk/UMD/METK/Sources/common/image_basic.h 2009-06-25 09:11:08 UTC (rev 154) @@ -1,12 +1,14 @@ // Header file for image_basic class -// image_basic is a base class for image handling +// +//! Classes of image_basic, point_2d, rect_range, and matrix_2d. +//! \file image_basic.h #pragma warning(disable:4251) #ifdef WIN32 #ifndef common_EXPORTS #define __COMMON_IMPORTEXPORT __declspec(dllimport) #else -#define __COMMON_IMPORTEXPORT __declspec(dllexport) +#define __COMMON_IMPORTEXPORT __declspec(dllexport) #endif #else #define __COMMON_IMPORTEXPORT @@ -24,146 +26,152 @@ #include <iostream> #include <algorithm> -#define GRAY_8BPP 1 -#define GRAY_16BPP 2 -#define COLOR_24BPP 3 +#define GRAY_8BPP 1 +#define GRAY_16BPP 2 +#define COLOR_24BPP 3 +//! Simple 2d point class. class __COMMON_IMPORTEXPORT point_2d{ - public: - point_2d(); - point_2d(int x, int y); - void set(int x, int y); - void get(int &x, int &y) const; - point_2d& operator +=(const point_2d& p); - point_2d& operator -=(const point_2d& p); - point_2d& operator *=(int mag); - point_2d& operator /=(int div); - bool operator !=(const point_2d& p); - bool operator ==(const point_2d& p); - double distance(const point_2d& p)const; + public: + point_2d(); + point_2d(int x, int y); + void set(int x, int y); + void get(int &x, int &y) const; + point_2d& operator +=(const point_2d& p); + point_2d& operator -=(const point_2d& p); + point_2d& operator *=(int mag); + point_2d& operator /=(int div); + bool operator !=(const point_2d& p); + bool operator ==(const point_2d& p); + double distance(const point_2d& p)const; - int x; - int y; + ... [truncated message content] |
From: <kon...@us...> - 2009-06-25 09:07:56
|
Revision: 153 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=153&view=rev Author: konrad79 Date: 2009-06-25 09:07:51 +0000 (Thu, 25 Jun 2009) Log Message: ----------- METK: correct wrong include in ViewpointInit.cpp Modified Paths: -------------- trunk/UMD/METK/Sources/ML/Viewpoint/ViewpointInit.cpp Modified: trunk/UMD/METK/Sources/ML/Viewpoint/ViewpointInit.cpp =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/ViewpointInit.cpp 2009-06-25 08:34:49 UTC (rev 152) +++ trunk/UMD/METK/Sources/ML/Viewpoint/ViewpointInit.cpp 2009-06-25 09:07:51 UTC (rev 153) @@ -16,7 +16,6 @@ // Include all module headers ... #include "METKCreateIntraOPDummy/mlMETKCreateIntraOPDummy.h" -#include "METKCreateIntraOPViewpoint/mlMETKCreateIntraOPViewpoint.h" #include "METKIntraOPViewpoint/mlMETKIntraOPViewpoint.h" #include "METKAutoFading/mlMETKAutoFading.h" #include "METKCalcCamPos/METKCalcCamPos.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-25 08:34:51
|
Revision: 152 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=152&view=rev Author: wolfspindler Date: 2009-06-25 08:34:49 +0000 (Thu, 25 Jun 2009) Log Message: ----------- ENH: -Activated and added documentation for doxygen generated file and class overviews. Modified Paths: -------------- trunk/Community/General/Sources/ML/MLCSOCommunityModules/CSODistance/CSODistance.h trunk/Community/General/Sources/ML/MLImageUtilities/AnalyzeHeader/AnalyzeHeader.h trunk/Community/General/Sources/ML/MLImageUtilities/PlaneClip/PlaneClip.h trunk/Community/General/Sources/ML/MLLoadCAT08Data/mlLoadCAT08Data.h trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMPlane/WEMMarchingCubes.h trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMPlane/WEMPlane.h Modified: trunk/Community/General/Sources/ML/MLCSOCommunityModules/CSODistance/CSODistance.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOCommunityModules/CSODistance/CSODistance.h 2009-06-25 08:00:12 UTC (rev 151) +++ trunk/Community/General/Sources/ML/MLCSOCommunityModules/CSODistance/CSODistance.h 2009-06-25 08:34:49 UTC (rev 152) @@ -1,3 +1,5 @@ +//! Implements the ML module class CSODistance. +//! \file CSODistance.h #ifndef __CSODistance_H #define __CSODistance_H @@ -14,7 +16,7 @@ //! The CSODistance calculates the smallest distance between two CSOs class MLCSOCOMMUNITYMODULES_EXPORT CSODistance : public BaseOp -{ +{ public: @@ -59,7 +61,7 @@ BoolField* _autoApplyFld; //! XMarkerList output field - BaseField *_outputXMarkerListFld; + BaseField *_outputXMarkerListFld; /* MEMBER VARIABLES */ @@ -70,7 +72,7 @@ bool _isInNotificationCB; //! Output XMarkerList - XMarkerList *_outputXMarkerList; + XMarkerList *_outputXMarkerList; /* METHODS */ Modified: trunk/Community/General/Sources/ML/MLImageUtilities/AnalyzeHeader/AnalyzeHeader.h =================================================================== --- trunk/Community/General/Sources/ML/MLImageUtilities/AnalyzeHeader/AnalyzeHeader.h 2009-06-25 08:00:12 UTC (rev 151) +++ trunk/Community/General/Sources/ML/MLImageUtilities/AnalyzeHeader/AnalyzeHeader.h 2009-06-25 08:34:49 UTC (rev 152) @@ -1,16 +1,18 @@ +//! The ML module class AnalzeHeader to extract information from Analyze files. +//! \file AnalyzeHeader.h +//! \author Bart De Dobbelaer +/* + This program is written by: -/* - This program is written by: - Bart De Dobbelaer - + Laboratory for Medical Imaging Research Radiologie/ESAT PSI Universitair Ziekenhuis Gasthuisberg Herestraat 49 B-3000 Leuven Belgium - + Email: Bar...@uz... */ @@ -26,6 +28,7 @@ //////////////////////////////////////////////////////////////////////// +//! The ML module class AnalzeHeader to extract information from Analyze files. class MLIMAGEUTILITIES_EXPORT AnalyzeHeader : public BaseOp { public: AnalyzeHeader(); Modified: trunk/Community/General/Sources/ML/MLImageUtilities/PlaneClip/PlaneClip.h =================================================================== --- trunk/Community/General/Sources/ML/MLImageUtilities/PlaneClip/PlaneClip.h 2009-06-25 08:00:12 UTC (rev 151) +++ trunk/Community/General/Sources/ML/MLImageUtilities/PlaneClip/PlaneClip.h 2009-06-25 08:34:49 UTC (rev 152) @@ -1,16 +1,18 @@ +//! The ML module class PlaneClip to intersect an image with a plane. +//! \file AnalyzeHeader.h +//! \author Bart De Dobbelaer +/* + This program is written by: -/* - This program is written by: - Bart De Dobbelaer - + Laboratory for Medical Imaging Research Radiologie/ESAT PSI Universitair Ziekenhuis Gasthuisberg Herestraat 49 B-3000 Leuven Belgium - + Email: Bar...@uz... */ @@ -28,6 +30,7 @@ //////////////////////////////////////////////////////////////////////// +//! The ML module class PlaneClip to intersect an image with a plane. class MLIMAGEUTILITIES_EXPORT PlaneClip : public BaseOp { public: PlaneClip(); Modified: trunk/Community/General/Sources/ML/MLLoadCAT08Data/mlLoadCAT08Data.h =================================================================== --- trunk/Community/General/Sources/ML/MLLoadCAT08Data/mlLoadCAT08Data.h 2009-06-25 08:00:12 UTC (rev 151) +++ trunk/Community/General/Sources/ML/MLLoadCAT08Data/mlLoadCAT08Data.h 2009-06-25 08:34:49 UTC (rev 152) @@ -15,7 +15,7 @@ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ''AS IS'' AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR THE COPYRIGHT HOLDER BE LIABLE +// DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR THE COPYRIGHT HOLDER BE LIABLE // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND @@ -23,7 +23,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //---------------------------------------------------------------------------------- -//! The ML module class LoadCAT08Data. +//! ML module class to load data for the Coronary Artery Tracking competition 2008. /*! // \file mlLoadCAT08Data.h // \author Ola Friman @@ -54,7 +54,7 @@ ML_START_NAMESPACE -//! Loads data for the Coronary Artery Tracking competition 2008 +//! ML module class to load data for the Coronary Artery Tracking competition 2008. class MLLOADCAT08DATA_EXPORT LoadCAT08Data : public BaseOp { public: @@ -99,7 +99,7 @@ #endif //! Clear all data structures. - void _clearAll(); + void _clearAll(); //@} Modified: trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMPlane/WEMMarchingCubes.h =================================================================== --- trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMPlane/WEMMarchingCubes.h 2009-06-25 08:00:12 UTC (rev 151) +++ trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMPlane/WEMMarchingCubes.h 2009-06-25 08:34:49 UTC (rev 152) @@ -1,16 +1,18 @@ - +//! 3D edge and triangle tables for Marching Cubes algorithm. +//! \file WEMMarchingCubes.h +//! \author Bart De Dobbelaer /* - This program is written by: - + This program is written by: + Bart De Dobbelaer - + Laboratory for Medical Imaging Research Radiologie/ESAT PSI Universitair Ziekenhuis Gasthuisberg Herestraat 49 B-3000 Leuven Belgium - + Email: Bar...@uz... */ @@ -19,10 +21,8 @@ //////////////////////////////////////////////////////////////////////// +//! 3D edge table in hex, see information about MC on the www for this coding. const int edge3DTable[256]={ - /* - 3D edge table in hex, see information about MC on the www for this coding - */ 0x0 , 0x109, 0x203, 0x30a, 0x406, 0x50f, 0x605, 0x70c, 0x80c, 0x905, 0xa0f, 0xb06, 0xc0a, 0xd03, 0xe09, 0xf00, 0x190, 0x99 , 0x393, 0x29a, 0x596, 0x49f, 0x795, 0x69c, @@ -59,10 +59,8 @@ //////////////////////////////////////////////////////////////////////// +//! 3D triangle table, see information about MC on the www for this coding. const int triTable[256][16] = { - /* - 3D triangle table, see information about MC on the www for this coding - */ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, Modified: trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMPlane/WEMPlane.h =================================================================== --- trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMPlane/WEMPlane.h 2009-06-25 08:00:12 UTC (rev 151) +++ trunk/Community/General/Sources/ML/MLWEMCommunityModules/WEMPlane/WEMPlane.h 2009-06-25 08:34:49 UTC (rev 152) @@ -1,16 +1,19 @@ +//! The ML WEM module class WEMPlane to intersect a WEM with a plane. +//! \file WEMPlane.h +//! \author Bart De Dobbelaer /* - This program is written by: - + This program is written by: + Bart De Dobbelaer - + Laboratory for Medical Imaging Research Radiologie/ESAT PSI Universitair Ziekenhuis Gasthuisberg Herestraat 49 B-3000 Leuven Belgium - + Email: Bar...@uz... */ @@ -28,6 +31,7 @@ //////////////////////////////////////////////////////////////////////// +//! The ML WEM module class WEMPlane to intersect a WEM with a plane. class MLWEMCOMMUNITYMODULES_EXPORT WEMPlane : public WEMProcessor { public: //! Standard constructor @@ -52,11 +56,11 @@ //! Build plane for given patch void _buildPlane(WEMPatch* wemPatch); - ML_BASEOP_CLASS_HEADER(WEMPlane) + ML_BASEOP_CLASS_HEADER(WEMPlane) }; //////////////////////////////////////////////////////////////////////// ML_END_NAMESPACE -#endif +#endif \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bar...@us...> - 2009-06-25 08:00:16
|
Revision: 151 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=151&view=rev Author: bartdedobbelaer Date: 2009-06-25 08:00:12 +0000 (Thu, 25 Jun 2009) Log Message: ----------- - Output both halves of the image as separate outputs Modified Paths: -------------- trunk/Community/General/Sources/ML/MLImageUtilities/PlaneClip/PlaneClip.cpp Modified: trunk/Community/General/Sources/ML/MLImageUtilities/PlaneClip/PlaneClip.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLImageUtilities/PlaneClip/PlaneClip.cpp 2009-06-24 15:28:12 UTC (rev 150) +++ trunk/Community/General/Sources/ML/MLImageUtilities/PlaneClip/PlaneClip.cpp 2009-06-25 08:00:12 UTC (rev 151) @@ -22,7 +22,7 @@ ML_BASEOP_CLASS_SOURCE(PlaneClip, BaseOp); -PlaneClip::PlaneClip() : BaseOp(1, 1) { +PlaneClip::PlaneClip() : BaseOp(1, 2) { ML_TRACE_IN("PlaneClip::PlaneClip()") handleNotificationOff(); @@ -42,8 +42,10 @@ (_autoApplyFld->getBoolValue() && ( field == _planeFld || field == getInField(0))) - ) - getOutField()->notifyAttachments(); + ) { + getOutField(0)->notifyAttachments(); + getOutField(1)->notifyAttachments(); + } BaseOp::handleNotification(field); } @@ -56,19 +58,19 @@ //////////////////////////////////////////////////////////////////////// -void PlaneClip::calcOutImageProps (int ) { +void PlaneClip::calcOutImageProps (int outIndex) { ML_TRACE_IN("PlaneClip::calcOutImageProps ()") PagedImg *inImg=getUpdatedInImg(0); if (inImg) { - getOutImg()->setImgExt(inImg->getImgExt()); - getOutImg()->setPageExt(inImg->getPageExt()); - getOutImg()->setVoxelSize(inImg->getVoxelSize()); - getOutImg()->setMinVoxelValue(inImg->getMinVoxelValue()); - getOutImg()->setMaxVoxelValue(inImg->getMaxVoxelValue()); - getOutImg()->setDataType(inImg->getDataType()); - getOutImg()->setUpToDate(); - } else getOutImg()->setOutOfDate(); + getOutImg(outIndex)->setImgExt(inImg->getImgExt()); + getOutImg(outIndex)->setPageExt(inImg->getPageExt()); + getOutImg(outIndex)->setVoxelSize(inImg->getVoxelSize()); + getOutImg(outIndex)->setMinVoxelValue(inImg->getMinVoxelValue()); + getOutImg(outIndex)->setMaxVoxelValue(inImg->getMaxVoxelValue()); + getOutImg(outIndex)->setDataType(inImg->getDataType()); + getOutImg(outIndex)->setUpToDate(); + } else getOutImg(outIndex)->setOutOfDate(); } //////////////////////////////////////////////////////////////////////// @@ -84,8 +86,7 @@ CALC_OUTSUBIMAGE1_CPP(PlaneClip); template <typename T> -void PlaneClip::calcOutSubImage (TSubImg<T> *outSubImg, int, - TSubImg<T> *inSubImg) { +void PlaneClip::calcOutSubImage (TSubImg<T> *outSubImg, int outIndex, TSubImg<T> *inSubImg) { ML_TRACE_IN("template <typename T> PlaneClip::calcOutSubImage ()") SubImgBox inbox = inSubImg->getBox(); @@ -102,10 +103,11 @@ for (p.y = inbox.v1.y; p.y <= inbox.v2.y; p.y++) { for (p.x = inbox.v1.x; p.x <= inbox.v2.x; p.x++) { pos = vec3(p.x,p.y,p.z); - if (plane.isInHalfSpace(pos)) - outSubImg->setImgVal(p,inSubImg->getImgVal(p)); - else - outSubImg->setImgVal(p,(T)0); + if (plane.isInHalfSpace(pos)) { + outSubImg->setImgVal(p,(outIndex == 0) ? inSubImg->getImgVal(p) : (T)0); + } else { + outSubImg->setImgVal(p,(outIndex == 0) ? (T)0 : inSubImg->getImgVal(p)); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kon...@us...> - 2009-06-24 15:28:26
|
Revision: 150 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=150&view=rev Author: konrad79 Date: 2009-06-24 15:28:12 +0000 (Wed, 24 Jun 2009) Log Message: ----------- METK: add new VisDataViewer for 2D viewpoint visualization Modified Paths: -------------- trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPos/METKCalcCamPos.cpp trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPos/METKCalcCamPos.h trunk/UMD/METK/Sources/ML/Viewpoint/Viewpoint.pro trunk/UMD/METK/Sources/ML/Viewpoint/ViewpointInit.cpp Added Paths: ----------- trunk/UMD/METK/Modules/ML/Viewpoint/UMDVisDataViewer2D/ trunk/UMD/METK/Modules/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2D.def trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/ trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/SoVisDataViewer2D.cpp trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/SoVisDataViewer2D.h trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2DInit.cpp trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2DInit.h trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2DSystem.h Added: trunk/UMD/METK/Modules/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2D.def =================================================================== --- trunk/UMD/METK/Modules/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2D.def (rev 0) +++ trunk/UMD/METK/Modules/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2D.def 2009-06-24 15:28:12 UTC (rev 150) @@ -0,0 +1,25 @@ +//---------------------------------------------------------------------------------- +//! UMDVisDataViewer2D module definitions +/*! +// \file UMDVisDataViewer2D.def +// \author +// \date 2007-04-26 +// +*/ +//---------------------------------------------------------------------------------- + + +InventorModule SoVisDataViewer2D { + DLL = "Viewpoint" + + genre = "" + author = "" + status = "work-in-progress" + comment = "" + keywords = "" + seeAlso = "" + projectSource = "$(UserProjectsPath)/sources/ML/Viewpoint/UMDVisDataViewer2D" + hasGroupInputs = FALSE + +} // InventorModule SoVisDataViewer2D + Modified: trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPos/METKCalcCamPos.cpp =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPos/METKCalcCamPos.cpp 2009-06-24 14:48:07 UTC (rev 149) +++ trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPos/METKCalcCamPos.cpp 2009-06-24 15:28:12 UTC (rev 150) @@ -5,6 +5,7 @@ #include <Inventor/nodes/SoSwitch.h> #include <Inventor/nodes/SoMaterial.h> #include "UMDVisDataViewer/SoVisDataViewer.h" +#include "UMDVisDataViewer2D/SoVisDataViewer2D.h" #include <iostream> #include <stdio.h> @@ -34,6 +35,7 @@ handleNotificationOff(); _outScene = getFieldContainer()->addSoNode("outScene"); + _outScene2 = getFieldContainer()->addSoNode("outScene2"); _calc = getFieldContainer()->addNotify("calc"); _calcMultiple = getFieldContainer()->addNotify("calcMultiple"); _init = getFieldContainer()->addNotify("init"); @@ -114,6 +116,8 @@ m_soViewer = new SoVisDataViewer(); _outScene->setSoNodeValue(m_soViewer); + m_soViewer2D = new SoVisDataViewer2D(); + _outScene2->setSoNodeValue(m_soViewer2D); clearAcceptedObjectIDs(); clearAcceptedInfoLayerNames(); @@ -162,6 +166,7 @@ m_calcVis.setFocusObject(_currentStructure->getStringValue()); m_calcVis.calc(); m_soViewer->touch(); + m_soViewer2D->touch(); setCamPosition(SUM_FIELD,false); updateObjectMgr(); timerSensor->schedule(); @@ -176,25 +181,28 @@ else if (field == _showField || field == _sphereMode) { m_soViewer->setSphereMode(_sphereMode->getEnumValue()+1); //Die ENUMs gehen 0..1 der sphereMode aber 1..2 - if (_showField->getIntValue()==0) m_soViewer->setDataField(m_calcVis.getField(VIS_FIELD)); - if (_showField->getIntValue()==1) m_soViewer->setDataField(m_calcVis.getField(STA_VIS_FIELD)); - if (_showField->getIntValue()==2) m_soViewer->setDataField(m_calcVis.getField(IMP_FIELD)); - if (_showField->getIntValue()==3) m_soViewer->setDataField(m_calcVis.getField(STA_IMP_FIELD)); - if (_showField->getIntValue()==4) m_soViewer->setDataField(m_calcVis.getField(NUM_FIELD)); - if (_showField->getIntValue()==5) m_soViewer->setDataField(m_calcVis.getField(ENT_FIELD)); - if (_showField->getIntValue()==6) m_soViewer->setDataField(m_calcVis.getField(DIS_FIELD)); - if (_showField->getIntValue()==7) m_soViewer->setDataField(m_calcVis.getField(CAM_FIELD)); - if (_showField->getIntValue()==8) m_soViewer->setDataField(m_calcVis.getField(REG_FIELD)); - if (_showField->getIntValue()==9) m_soViewer->setDataField(m_calcVis.getField(SIL_FIELD)); - if (_showField->getIntValue()==10) m_soViewer->setDataField(m_calcVis.getField(CENTER_FIELD)); - if (_showField->getIntValue()==11) m_soViewer->setDataField(m_calcVis.getField(SUM_FIELD)); + + if (_showField->getIntValue()==0) { m_soViewer->setDataField(m_calcVis.getField(VIS_FIELD)); m_soViewer2D->setDataField(m_calcVis.getField(VIS_FIELD)); } + if (_showField->getIntValue()==1) { m_soViewer->setDataField(m_calcVis.getField(STA_VIS_FIELD)); m_soViewer2D->setDataField(m_calcVis.getField(STA_VIS_FIELD)); } + if (_showField->getIntValue()==2) { m_soViewer->setDataField(m_calcVis.getField(IMP_FIELD)); m_soViewer2D->setDataField(m_calcVis.getField(IMP_FIELD)); } + if (_showField->getIntValue()==3) { m_soViewer->setDataField(m_calcVis.getField(STA_IMP_FIELD)); m_soViewer2D->setDataField(m_calcVis.getField(STA_IMP_FIELD)); } + if (_showField->getIntValue()==4) { m_soViewer->setDataField(m_calcVis.getField(NUM_FIELD)); m_soViewer2D->setDataField(m_calcVis.getField(NUM_FIELD)); } + if (_showField->getIntValue()==5) { m_soViewer->setDataField(m_calcVis.getField(ENT_FIELD)); m_soViewer2D->setDataField(m_calcVis.getField(ENT_FIELD)); } + if (_showField->getIntValue()==6) { m_soViewer->setDataField(m_calcVis.getField(DIS_FIELD)); m_soViewer2D->setDataField(m_calcVis.getField(DIS_FIELD)); } + if (_showField->getIntValue()==7) { m_soViewer->setDataField(m_calcVis.getField(CAM_FIELD)); m_soViewer2D->setDataField(m_calcVis.getField(CAM_FIELD)); } + if (_showField->getIntValue()==8) { m_soViewer->setDataField(m_calcVis.getField(REG_FIELD)); m_soViewer2D->setDataField(m_calcVis.getField(REG_FIELD)); } + if (_showField->getIntValue()==9) { m_soViewer->setDataField(m_calcVis.getField(SIL_FIELD)); m_soViewer2D->setDataField(m_calcVis.getField(SIL_FIELD)); } + if (_showField->getIntValue()==10) { m_soViewer->setDataField(m_calcVis.getField(CENTER_FIELD)); m_soViewer2D->setDataField(m_calcVis.getField(CENTER_FIELD)); } + if (_showField->getIntValue()==11) { m_soViewer->setDataField(m_calcVis.getField(SUM_FIELD)); m_soViewer2D->setDataField(m_calcVis.getField(SUM_FIELD)); } - if (_showField->getIntValue()==12) m_soViewer->setDataField(m_calcVis.getStackField(1)); - if (_showField->getIntValue()==13) m_soViewer->setDataField(m_calcVis.getStackField(2)); - if (_showField->getIntValue()==14) m_soViewer->setDataField(m_calcVis.getStackField(3)); - if (_showField->getIntValue()==15) m_soViewer->setDataField(m_calcVis.getStackField(4)); - if (_showField->getIntValue()==16) m_soViewer->setDataField(m_calcVis.getStackField(5)); + if (_showField->getIntValue()==12) { m_soViewer->setDataField(m_calcVis.getStackField(1)); m_soViewer2D->setDataField(m_calcVis.getStackField(1)); } + if (_showField->getIntValue()==13) { m_soViewer->setDataField(m_calcVis.getStackField(2)); m_soViewer2D->setDataField(m_calcVis.getStackField(2)); } + if (_showField->getIntValue()==14) { m_soViewer->setDataField(m_calcVis.getStackField(3)); m_soViewer2D->setDataField(m_calcVis.getStackField(3)); } + if (_showField->getIntValue()==15) { m_soViewer->setDataField(m_calcVis.getStackField(4)); m_soViewer2D->setDataField(m_calcVis.getStackField(4)); } + if (_showField->getIntValue()==16) { m_soViewer->setDataField(m_calcVis.getStackField(5)); m_soViewer2D->setDataField(m_calcVis.getStackField(5)); } + m_soViewer->touch(); + m_soViewer2D->touch(); } else if (field == _dataPath) @@ -214,7 +222,10 @@ { m_calcVis.getSphereValues(fX,fY,fZ,fR,iDiv); m_soViewer->createSphere(fX,fY,fZ,fR,iDiv); + m_soViewer2D->createSphere(fX,fY,fZ,fR,iDiv); m_soViewer->setSphereMode(2); + + m_vStructures = m_calcVis.getStructureNames (); for (int i=0; i<m_vStructures.size(); i++) { @@ -300,6 +311,7 @@ m_calcVis.multiplyStackFields ( 1, 2, 3 ); //Multiply the region with the sum field and store result in stack 3 std::cout << "final result is in stack 3 (Field 15)" << std::endl; m_soViewer->touch(); + m_soViewer2D->touch(); setCamPosition(3,true); updateObjectMgr(); timerSensor->schedule(); @@ -366,6 +378,7 @@ //New m_soViewer->touch(); + m_soViewer2D->touch(); setCamPosition(SUM_FIELD,false); } } @@ -586,6 +599,7 @@ } m_calcVis.getStackField(1)->normalize(); m_soViewer->touch(); + m_soViewer2D->touch(); if (setCamera) { setCamPosition(1,true); Modified: trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPos/METKCalcCamPos.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPos/METKCalcCamPos.h 2009-06-24 14:48:07 UTC (rev 149) +++ trunk/UMD/METK/Sources/ML/Viewpoint/METKCalcCamPos/METKCalcCamPos.h 2009-06-24 15:28:12 UTC (rev 150) @@ -31,6 +31,7 @@ //class SoSeparator; class SoVisDataViewer; +class SoVisDataViewer2D; class SoSwitch; ML_START_NAMESPACE @@ -59,6 +60,7 @@ //@} SoNodeField* _outScene; + SoNodeField* _outScene2; NotifyField* _calc; NotifyField* _calcMultiple; NotifyField* _init; @@ -121,6 +123,7 @@ string path; string* pathIds; SoVisDataViewer* m_soViewer; + SoVisDataViewer2D* m_soViewer2D; CvpCalcVis m_calcVis; vector<string*> m_vStructures; Added: trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/SoVisDataViewer2D.cpp =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/SoVisDataViewer2D.cpp (rev 0) +++ trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/SoVisDataViewer2D.cpp 2009-06-24 15:28:12 UTC (rev 150) @@ -0,0 +1,330 @@ +//---------------------------------------------------------------------------------- +//! The Inventor module class SoVisDataViewer2D +/*! +// \file SoVisDataViewer2D.cpp +// \author +// \date 2007-04-26 +// +// +*/ +//---------------------------------------------------------------------------------- + +// Local includes +#include "SoVisDataViewer2D.h" + +// Wrap inventor includes into XVEnterScope and XVLeaveScope to avoid +// collisions between OpenInventor and Windows headers. +#include "XVEnterScope.h" +#include <Inventor/elements/SoCacheElement.h> +#include <Inventor/actions/SoGLRenderAction.h> +#if defined(SGI_VERSION) && SGI_VERSION >= 20200 +# include <Inventor/SoTrace.h> +#endif +#ifndef SO_TRACE_IN +# define SO_TRACE_IN(__classAndMethod___) +#endif +// TODO: include more inventor things here +#include "XVLeaveScope.h" + +#include "vpBasic/vpPoint.h" +#include "vpBasic/vpTriangle.h" +#include "vpBasic/vpEdge.h" +#include "vpBasic/vpAlgorithms.h" +#include "vpBasic/vpField.h" +#include "vpBasic/vpDivSphere.h" + +#include <Inventor/SbBox.h> + +#include <fstream> + + +SO_NODE_SOURCE(SoVisDataViewer2D) + + +// -------------------------------------------------------------------------- +//! Initializes this class. Called on dll initialization. +// -------------------------------------------------------------------------- +void SoVisDataViewer2D::initClass() +{ + SO_NODE_INIT_CLASS(SoVisDataViewer2D, SoSeparator, "Separator"); +} + +// -------------------------------------------------------------------------- +//! Constructor, creates fields +// -------------------------------------------------------------------------- +SoVisDataViewer2D::SoVisDataViewer2D() +{ + SO_TRACE_IN("SoVisDataViewer2D::SoVisDataViewer2D"); + + // Execute inventor internal stuff for node construction. + SO_NODE_CONSTRUCTOR(SoVisDataViewer2D); + + // Create a sensor calling _nodeChangedCB if any field changes. Use a priority 0 + // sensor to be sure that changes are not delayed or collected. + _nodeSensor = new SoNodeSensor(SoVisDataViewer2D::nodeChangedCB, this); + _nodeSensor->setPriority(0); + _nodeSensor->attach(this); + + m_flHasSphere = false; + m_flHasData = false; + cout<<"start"<<endl; +} + +// -------------------------------------------------------------------------- +//! Protected destructor to cleans up internally created nodes and node sensor. +// -------------------------------------------------------------------------- +SoVisDataViewer2D::~SoVisDataViewer2D() +{ + SO_TRACE_IN("SoVisDataViewer2D::~SoVisDataViewer2D"); + + + // Remove the node sensor. + if (_nodeSensor){ delete _nodeSensor; _nodeSensor = NULL; } +} + +//----------------------------------------------------------------------------- +// Called by nodeSensor when any field in node changes. Only redirect the call +// of this static function to the nodeChanged method. +//----------------------------------------------------------------------------- +void SoVisDataViewer2D::nodeChangedCB(void *data, SoSensor* sens) +{ + SO_TRACE_IN("SoVisDataViewer2D::nodeChangedCB"); + + ((SoVisDataViewer2D*) data)->nodeChanged((SoNodeSensor*)sens); +} + +//----------------------------------------------------------------------------- +//! Called on any change on the node, field might by also NULL +//----------------------------------------------------------------------------- +void SoVisDataViewer2D::nodeChanged(SoNodeSensor* /*sensor*/) +{ + SO_TRACE_IN("SoVisDataViewer2D::nodeChanged"); + + // Get the field which caused the notification. + //SoField* field = sensor->getTriggerField(); + + // Handle changed fields here +} + +void SoVisDataViewer2D::createSphere (float fSx, float fSy, float fSz, float fRadius, int iDiv) +{ + m_oSphere = new CvpDivSphere(fSx, fSy, fSz, fRadius, iDiv, 1); + QuickSort(m_oSphere->vPoints); + m_flHasSphere = true; +} + +void SoVisDataViewer2D::setDataField (CvpField *oField) +{ + m_flHasData = false; + if ( !m_flHasSphere ) return; + if ( oField == NULL ) return; + if (oField->getSize() != m_oSphere->vPoints.size()) return; + m_oField = oField; + m_flHasData = true; + //logResults(); +} + + +void SoVisDataViewer2D::GLRenderBelowPath(SoGLRenderAction *action) +{ + float fColor1=1.0,fColor2=1.0,fColor3=1.0; + cout<<"ping"<<endl; + + + // Save the current transformation and attribute state of OpenGL. + glMatrixMode (GL_PROJECTION); + glPushMatrix(); + glMatrixMode (GL_MODELVIEW); + glPushMatrix(); + glPushAttrib(GL_ALL_ATTRIB_BITS); + glDisable(GL_LIGHTING); + + SoState * state = action->getState(); + const SbViewportRegion & vp = SoViewportRegionElement::get(state); + + glDisable(GL_DEPTH_TEST); + + glMatrixMode (GL_MODELVIEW); + glLoadIdentity(); //Einheitsmatrix + glMatrixMode(GL_PROJECTION); //"2D"-Modus + glLoadIdentity(); //Einheitsmatrix + + + + /*std::cout << "window: " << vp.getWindowSize()[0] << "," << vp.getWindowSize()[1] << std::endl; + glBegin(GL_POLYGON); + glColor3f(1.0,0.0,0.0); + glVertex2f(0, 0); + + glColor3f(1.0,1.0,0.0); + glVertex2f(-1, -1 ); + + glColor3f(1.0,0.0,1.0); + glVertex2f(0,-1); + + glColor3f(1.0,0.0,1.0); + glVertex2f(0,0); + + glEnd();*/ + + float maxalpha, minalpha, maxbeta, minbeta; + const float PI = 3.14159; + maxalpha=0; + maxbeta=0; + minalpha=100; + minbeta=100; + + if (m_flHasSphere) + { + cout<<"render sphere"<<endl; + + //Spehere Center + float centerX = m_oSphere->fMx; + float centerY = m_oSphere->fMy; + float centerZ = m_oSphere->fMz; + + for (unsigned int i=0; i< m_oSphere->vTriangles.size(); i++) + { + int iWrong = m_oSphere->vTriangles[i]->getWrongEdge(); + CvpPoint *oP1,*oP2,*oP3; + if(iWrong==0){ + oP1 = m_oSphere->vTriangles[i]->getEdge1()->getPoint1(); + oP2 = m_oSphere->vTriangles[i]->getEdge2()->getPoint1(); + oP3 = m_oSphere->vTriangles[i]->getEdge3()->getPoint1(); + }else{ + if (iWrong == 1) oP1 = m_oSphere->vTriangles[i]->getEdge1()->getPoint2(); + else oP1 = m_oSphere->vTriangles[i]->getEdge1()->getPoint1(); + if (iWrong == 2) oP2 = m_oSphere->vTriangles[i]->getEdge2()->getPoint2(); + else oP2 = m_oSphere->vTriangles[i]->getEdge2()->getPoint1(); + if (iWrong == 3) oP3 = m_oSphere->vTriangles[i]->getEdge3()->getPoint2(); + else oP3 = m_oSphere->vTriangles[i]->getEdge3()->getPoint1(); + } + + float alpha1, beta1; + getAlphaBeta(SbVec3f(oP1->x-centerX,oP1->y-centerY,oP1->z-centerZ),alpha1,beta1); + if (alpha1<minalpha) minalpha=alpha1; + if (beta1<minbeta) minbeta=beta1; + if (alpha1>maxalpha) maxalpha=alpha1; + if (beta1>maxbeta) maxbeta=beta1; + float alpha2, beta2; + getAlphaBeta(SbVec3f(oP2->x-centerX,oP2->y-centerY,oP2->z-centerZ),alpha2,beta2); + float alpha3, beta3; + getAlphaBeta(SbVec3f(oP3->x-centerX,oP3->y-centerY,oP3->z-centerZ),alpha3,beta3); + + + //Normierung der Winkel auf x,y [-1,1] des Viewports + alpha1=(alpha1/PI)*2.0-1.0; + alpha2=(alpha2/PI)*2.0-1.0; + alpha3=(alpha3/PI)*2.0-1.0; + beta1=(beta1/PI)*2.0-1.0; + beta2=(beta2/PI)*2.0-1.0; + beta3=(beta3/PI)*2.0-1.0; + + //std::cout << "alpha1=" << alpha1 << " beta1=" << beta1 << std::endl; + + if (m_flHasData){ + fColor1 = m_oField->getValueAt(oP1->id); + fColor2 = m_oField->getValueAt(oP2->id); + fColor3 = m_oField->getValueAt(oP3->id); + } + + glBegin(GL_POLYGON); + glColor3f(fColor1,fColor1,fColor1); + glVertex2f(alpha1,beta1); + glColor3f(fColor2,fColor2,fColor2); + glVertex2f(alpha2,beta2); + glColor3f(fColor3,fColor3,fColor3); + glVertex2f(alpha3,beta3); + glColor3f(fColor1,fColor1,fColor1); + glVertex2f(alpha1,beta1); + glEnd(); + + /*glPointSize(20.0); + glBegin(GL_POINTS); + glColor3f(fColor1,fColor1,fColor1); + glVertex2f(alpha1,beta1); + glColor3f(fColor2,fColor2,fColor2); + glVertex2f(alpha2,beta2); + glColor3f(fColor3,fColor3,fColor3); + glVertex2f(alpha3,beta3); + glColor3f(fColor1,fColor1,fColor1); + glVertex2f(alpha1,beta1); + glEnd();*/ + } + } + + //std::cout << "maxalpha=" << maxalpha << " maxbeta=" << maxbeta << std::endl; + //std::cout << "minalpha=" << minalpha << " minbeta=" << minbeta << std::endl; + + glEnable(GL_LIGHTING); + + // Restore the transformation and attribute state of OpenGL. + glPopAttrib(); + glMatrixMode (GL_MODELVIEW); + glPopMatrix(); + glMatrixMode (GL_PROJECTION); + glPopMatrix(); + glMatrixMode (GL_MODELVIEW); +} + +void SoVisDataViewer2D::getAlphaBeta(SbVec3f vec1,float& alpha, float& beta) +{ + alpha = acos(SbVec3f(0,1,0).dot(vec1)/vec1.length()); + beta = acos(SbVec3f(0,0,1).dot(vec1)/vec1.length()); +} + + + +/*void SoVisDataViewer2D::computeBBox(SoAction * action, SbBox3f & box, SbVec3f & center) +{ + if (!m_flHasSphere) + { + center.setValue(0.0f, 0.0f, 0.0f); + box.setBounds(0, 0, 0, 0, 0, 0); + } + else + { + float fX,fY,fZ,fR; + fX = m_oSphere->fMx; + fY = m_oSphere->fMy; + fZ = m_oSphere->fMz; + fR = m_oSphere->fRadius; + center.setValue(fX,fY,fZ); + //cout<<fX<<","<<fY<<","<<fZ<<","<<fR<<endl; + box.setBounds(fX-fR,fY-fR,fZ-fR,fX+fR,fY+fR,fZ+fR); + } +}*/ + + +/*void SoVisDataViewer2D::generatePrimitives(SoAction *action) +{ + SO_TRACE_IN("SoTest::generatePrimitives"); + + // TODO +}*/ + +void SoVisDataViewer2D::logResults (void) +{ + unsigned int i; + ofstream fout; + fout.open("c:/viewer.txt",ios::out); + fout<<"Spherepoints:"<<endl; + fout<<"-------------"<<endl; + + for (i = 0; i<m_oSphere->vPoints.size(); i++) + { + fout<<i<<": ("<<m_oSphere->vPoints[i]->x<<","<<m_oSphere->vPoints[i]->y<<","<<m_oSphere->vPoints[i]->z<<") : "<<m_oSphere->vPoints[i]->id<<endl; + } + fout<<"ResultMatrix:"<<endl; + fout<<"-------------"<<endl; + + fout<<"Visibility for Object 0"<<endl; + fout<<"-----------------------"<<endl; + for (i = 0; i<m_oSphere->vPoints.size(); i++) + { + fout<<i<<": "<<m_oField->getValueAt(i)<<endl; + } + fout.close(); +} + + Added: trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/SoVisDataViewer2D.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/SoVisDataViewer2D.h (rev 0) +++ trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/SoVisDataViewer2D.h 2009-06-24 15:28:12 UTC (rev 150) @@ -0,0 +1,86 @@ +//---------------------------------------------------------------------------------- +//! The Inventor module class SoVisDataViewer2D derived from SoSeparator +/*! +// \file SoVisDataViewer2D.h +// \author +// \date 2007-04-26 +// +// +*/ +//---------------------------------------------------------------------------------- + +#ifndef __SOVISDATAVIEWER2D_H__ +#define __SOVISDATAVIEWER2D_H__ + + +// Local includes +#include "UMDVisDataViewer2DSystem.h" + +// Wrap inventor includes into XVEnterScope and XVLeaveScope to avoid +// collisions between OpenInventor and Windows headers. +#include "XVEnterScope.h" +#include <Inventor/nodes/SoSubNode.h> +#include <Inventor/nodes/SoSeparator.h> +#include <Inventor/sensors/SoNodeSensor.h> +#include <Inventor/fields/SoSFTrigger.h> +#include <Inventor/elements/SoViewportRegionElement.h> +#include "XVLeaveScope.h" + +class CvpDivSphere; +class CvpField; + + + +//! +class UMDVISDATAVIEWER2D_EXPORT SoVisDataViewer2D : public SoSeparator +{ + //! Implements the runtime type system interface of this new node. + SO_NODE_HEADER(SoVisDataViewer2D); + +public: + //! Constructor + SoVisDataViewer2D(); + + //! Initializes this class (called on dll initialization). + static void initClass(); + + SoSFTrigger m_fldGenerateSphere; + + void createSphere (float fSx, float fSy, float fSz, float fRadius, int iDiv); + void setDataField (CvpField *oField); + + void GLRenderBelowPath(SoGLRenderAction *action); + //void computeBBox(SoAction * action, SbBox3f & box, SbVec3f & center); + //void generatePrimitives(SoAction *action); + void logResults (void); + + + +protected: + //! Protected destructor + virtual ~SoVisDataViewer2D(); + + //! Sensor to detect changes in node's fields. + SoNodeSensor *_nodeSensor; + + //! Called by \c _nodeSensor when any field in node changes. + //! Only redirects the call of this static function to the + //! class method \c nodeChanged. + static void nodeChangedCB(void *data, SoSensor* sens); + + //! Called by the static function \c _nodeChangedCB to notify node changes. + void nodeChanged(SoNodeSensor* sensor); + + +private: + CvpDivSphere *m_oSphere; + CvpField *m_oField; + bool m_flHasSphere; + bool m_flHasData; + void getAlphaBeta(SbVec3f vec1,float& alpha, float& beta); + +}; + +#endif // __SOVISDATAVIEWER2D_H + + Added: trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2DInit.cpp =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2DInit.cpp (rev 0) +++ trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2DInit.cpp 2009-06-24 15:28:12 UTC (rev 150) @@ -0,0 +1,27 @@ +//---------------------------------------------------------------------------------- +//! Dynamic library and runtime type system initialization +/*! +// \file UMDVisDataViewer2DInit.cpp +// \author +// \date 2007-04-26 +// +*/ +//---------------------------------------------------------------------------------- + +// Local includes +#include "UMDVisDataViewer2DSystem.h" +#include <XVBasics.h> +#include "SoVisDataViewer2D.h" + + +// Called on initialization time of this dll. Register all new stuff. +void UMDVisDataViewer2DInit() +{ + // Register the class in the inventor runtime type system. + SoVisDataViewer2D::initClass(); +}; + +// Macro implementing the platform independent dll initialization +XV_INIT_LIBRARY(UMDVisDataViewer2DInit) + + Added: trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2DInit.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2DInit.h (rev 0) +++ trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2DInit.h 2009-06-24 15:28:12 UTC (rev 150) @@ -0,0 +1,19 @@ +//---------------------------------------------------------------------------------- +//! Dynamic library and runtime type system initialization +/*! +// \file UMDVisDataViewer2DInit.h +// \author +// \date 2007-04-26 +// +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __UMDVISDATAVIEWER2DINIT_H__ +#define __UMDVISDATAVIEWER2DINIT_H__ + +void UMDVisDataViewer2DInit(); + +#endif +// __UMDVISDATAVIEWER2DINIT_H__ + Added: trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2DSystem.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2DSystem.h (rev 0) +++ trunk/UMD/METK/Sources/ML/Viewpoint/UMDVisDataViewer2D/UMDVisDataViewer2DSystem.h 2009-06-24 15:28:12 UTC (rev 150) @@ -0,0 +1,36 @@ +//---------------------------------------------------------------------------------- +//! Project global and OS specific declarations +/*! +// \file UMDVisDataViewer2DSystem.h +// \author +// \date 2007-04-26 +// +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __UMDVISDATAVIEWER2DSYSTEM_H__ +#define __UMDVISDATAVIEWER2DSYSTEM_H__ + +// include MeVis OpenGL headers first (includes GL/glew.h) +#include <mlOpenGL.h> + +// DLL export macro definition +#ifdef WIN32 +#ifdef UMDVISDATAVIEWER2D_EXPORTS +// Use the UMDVISDATAVIEWER2D_EXPORT macro to export classes and functions +#define UMDVISDATAVIEWER2D_EXPORT __declspec(dllexport) +#else +// If included by external modules, exported symbols are declared as import symbols +#define UMDVISDATAVIEWER2D_EXPORT __declspec(dllimport) +#endif + +#else +// No export declarations are necessary for non-Windows systems +#define UMDVISDATAVIEWER2D_EXPORT +#endif + + +#endif +// __UMDVISDATAVIEWER2DSYSTEM_H__ + Modified: trunk/UMD/METK/Sources/ML/Viewpoint/Viewpoint.pro =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/Viewpoint.pro 2009-06-24 14:48:07 UTC (rev 149) +++ trunk/UMD/METK/Sources/ML/Viewpoint/Viewpoint.pro 2009-06-24 15:28:12 UTC (rev 150) @@ -25,6 +25,7 @@ DEFINES += VIEWPOINT_EXPORTS DEFINES += UMDVISDATAVIEWER_EXPORTS +DEFINES += UMDVISDATAVIEWER2D_EXPORTS DEFINES += VPBASIC_EXPORTS DEFINES += UMDVISIBILITYSOLVER_EXPORTS @@ -33,10 +34,15 @@ MSVC_USE_SUBDIRS = 1 + + HEADERS += \ UMDVisDataViewer/UMDVisDataViewerInit.h \ UMDVisDataViewer/UMDVisDataViewerSystem.h \ UMDVisDataViewer/SoVisDataViewer.h \ + UMDVisDataViewer2D/UMDVisDataViewer2DInit.h \ + UMDVisDataViewer2D/UMDVisDataViewer2DSystem.h \ + UMDVisDataViewer2D/SoVisDataViewer2D.h \ METKAutoFading/mlMETKAutoFading.h \ METKCalcCamPos/METKCalcCamPos.h \ METKKeystates/METKKeystates.h \ @@ -60,9 +66,14 @@ ViewpointInit.h + + + SOURCES += \ UMDVisDataViewer/UMDVisDataViewerInit.cpp \ UMDVisDataViewer/SoVisDataViewer.cpp \ + UMDVisDataViewer2D/UMDVisDataViewer2DInit.cpp \ + UMDVisDataViewer2D/SoVisDataViewer2D.cpp \ METKAutoFading/mlMETKAutoFading.cpp \ METKCalcCamPos/METKCalcCamPos.cpp \ METKKeystates/METKKeystates.cpp \ Modified: trunk/UMD/METK/Sources/ML/Viewpoint/ViewpointInit.cpp =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/ViewpointInit.cpp 2009-06-24 14:48:07 UTC (rev 149) +++ trunk/UMD/METK/Sources/ML/Viewpoint/ViewpointInit.cpp 2009-06-24 15:28:12 UTC (rev 150) @@ -16,6 +16,7 @@ // Include all module headers ... #include "METKCreateIntraOPDummy/mlMETKCreateIntraOPDummy.h" +#include "METKCreateIntraOPViewpoint/mlMETKCreateIntraOPViewpoint.h" #include "METKIntraOPViewpoint/mlMETKIntraOPViewpoint.h" #include "METKAutoFading/mlMETKAutoFading.h" #include "METKCalcCamPos/METKCalcCamPos.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-24 15:13:32
|
Revision: 147 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=147&view=rev Author: wolfspindler Date: 2009-06-24 13:38:48 +0000 (Wed, 24 Jun 2009) Log Message: ----------- BUG: -All Windows specific PBUFFER rendering excluded with compiler flag on non windows platforms. -Extension handling for Linux is tried with glew without any tests, just to make it compile. Modified Paths: -------------- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp Modified: trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp 2009-06-24 13:14:05 UTC (rev 146) +++ trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp 2009-06-24 13:38:48 UTC (rev 147) @@ -19,6 +19,9 @@ #include <iostream> using namespace std; +#ifndef USE_WINPBUFFER +#include "GL/glew.h" +#endif // Wrap inventor includes into XVEnterScope and XVLeaveScope to avoid // collisions between OpenInventor and Windows headers. #include "XVEnterScope.h" @@ -32,6 +35,8 @@ // FAKE-Fenster um HDC zu kriegen, das muss auch besser gehen //-------------------------------------------------------------------------- + +#ifdef USE_WINPBUFFER HDC hDC=NULL; // Private GDI Device Context HWND hWnd=NULL; // Holds Our Window Handle HINSTANCE hInstance; // Holds The Instance Of The Application @@ -45,6 +50,7 @@ // Pass All Unhandled Messages To DefWindowProc return DefWindowProc(hWnd,uMsg,wParam,lParam); } +#endif //-------------------------------------------------------------------------- #include "XVLeaveScope.h" @@ -169,6 +175,8 @@ } else { + +#ifdef USE_WINPBUFFER glIsRenderbufferEXT = (PFNGLISRENDERBUFFEREXTPROC)wglGetProcAddress("glIsRenderbufferEXT"); glBindRenderbufferEXT = (PFNGLBINDRENDERBUFFEREXTPROC)wglGetProcAddress("glBindRenderbufferEXT"); glDeleteRenderbuffersEXT = (PFNGLDELETERENDERBUFFERSEXTPROC)wglGetProcAddress("glDeleteRenderbuffersEXT"); @@ -186,7 +194,7 @@ glFramebufferRenderbufferEXT = (PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC)wglGetProcAddress("glFramebufferRenderbufferEXT"); glGetFramebufferAttachmentParameterivEXT = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC)wglGetProcAddress("glGetFramebufferAttachmentParameterivEXT"); glGenerateMipmapEXT = (PFNGLGENERATEMIPMAPEXTPROC)wglGetProcAddress("glGenerateMipmapEXT"); - +#endif if( !glIsRenderbufferEXT || !glBindRenderbufferEXT || !glDeleteRenderbuffersEXT || !glGenRenderbuffersEXT || !glRenderbufferStorageEXT || !glGetRenderbufferParameterivEXT || !glIsFramebufferEXT || !glBindFramebufferEXT || !glDeleteFramebuffersEXT || This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-24 15:13:00
|
Revision: 148 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=148&view=rev Author: wolfspindler Date: 2009-06-24 14:03:01 +0000 (Wed, 24 Jun 2009) Log Message: ----------- BUG: -Platform dependent AVI functionality excluded on non WIN32 platforms. Modified Paths: -------------- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.h trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRenderer.pro trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRendererSystem.h Modified: trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp 2009-06-24 13:38:48 UTC (rev 147) +++ trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp 2009-06-24 14:03:01 UTC (rev 148) @@ -90,7 +90,9 @@ SO_NODE_ADD_FIELD(bufferSizeX, (400)); SO_NODE_ADD_FIELD(bufferSizeY, (400)); SO_NODE_ADD_FIELD(saveImage, (FALSE)); +#ifdef USE_AVISAVE SO_NODE_ADD_FIELD(saveAVI, (FALSE)); +#endif SO_NODE_ADD_FIELD(fldFilename, ("c:/temp.bmp")); SO_NODE_ADD_FIELD(m_flCreateBuffer, ()); SO_NODE_ADD_FIELD(m_flRender, ()); @@ -106,9 +108,11 @@ SO_NODE_SET_SF_ENUM_TYPE(transparencyType, _enum_transparencyType); SO_NODE_ADD_FIELD(readyTrigger, ()); +#ifdef USE_AVISAVE SO_NODE_ADD_FIELD(finishAVI, ()); SO_NODE_ADD_FIELD(aviFilename, ("c:/temp.avi")); SO_NODE_ADD_FIELD(aviFramerate, (7)); +#endif SO_NODE_ADD_FIELD(bufferType, (BUFFER_AUTO)); SO_NODE_DEFINE_ENUM_VALUE(_enum_BufferType, BUFFER_AUTO); @@ -131,8 +135,10 @@ _attachmentFunc = NULL; m_bufferType = NONE; +#ifdef USE_AVISAVE myAviWriter = new ML_NAMESPACE::kAviWriter(); myAviWriter->getFieldContainer()->getField("outputFilename")->setStringValue("c:/temp.avi"); +#endif } SomnOffscreenRenderer::SomnOffscreenRenderer(int iBufferSizeX, int iBufferSizeY) @@ -254,11 +260,11 @@ render(); } +#ifdef USE_AVISAVE else if ( field == &finishAVI) { if (myAviWriter) myAviWriter->_endRecording(); } - else if ( field == &aviFilename) { if (myAviWriter) myAviWriter->getFieldContainer()->getField("outputFilename")->setStringValue(aviFilename.getValue().getString()); @@ -268,10 +274,11 @@ { if (myAviWriter) myAviWriter->getFieldContainer()->getField("framesPerSecond")->setStringValue(kBasics::IntToString(aviFramerate.getValue())); } +#endif else if (field == &m_fldScene) //DANN HAT SICH WAS AN EINEM DER KINDER KINDERKNOTEN GE\xC4NDERT { - //std::cout << "Changing ... Render" << std::endl; + //std::cout << "Changing ... Render" << std::endl; //render(); } @@ -515,7 +522,11 @@ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); m_renderAction->apply(m_fldScene.getValue()); if ( _insideGlFunc != NULL ) _insideGlFunc(); - if (saveImage.getValue() || saveAVI.getValue()) saveToFile(); + if (saveImage.getValue() +#ifdef USE_AVISAVE + || saveAVI.getValue() +#endif + ) saveToFile(); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); glBindRenderbufferEXT( GL_RENDERBUFFER_EXT, 0 ); } @@ -535,13 +546,21 @@ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); m_renderAction->apply(m_fldScene.getValue()); if ( _insideGlFunc != NULL ) _insideGlFunc(); - if (saveImage.getValue() || saveAVI.getValue()) saveToFile(); + if (saveImage.getValue() +#ifdef USE_AVISAVE + || saveAVI.getValue() +#endif + ) saveToFile(); m_poOff->disable(); } break; #endif case SCREENSHOT: - if (saveImage.getValue() || saveAVI.getValue()) saveToFile(); + if (saveImage.getValue() +#ifdef USE_AVISAVE + || saveAVI.getValue() +#endif + ) saveToFile(); break; } readyTrigger.touch(); @@ -573,10 +592,12 @@ test.file_write_bitmap(std::string(fldFilename.getValue().getString())); } +#ifdef USE_AVISAVE if (saveAVI.getValue()) { myAviWriter->addImageToMovieByData(data, m_iBufferSizeX, m_iBufferSizeY); } +#endif delete[] data; } \ No newline at end of file Modified: trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.h 2009-06-24 13:38:48 UTC (rev 147) +++ trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.h 2009-06-24 14:03:01 UTC (rev 148) @@ -30,7 +30,9 @@ #include <Inventor/actions/SoGLRenderAction.h> #include "XVLeaveScope.h" -#include <mlkAviWriter.h> +#ifdef USE_AVISAVE + #include <mlkAviWriter.h> +#endif #include <kBasics.h> class CmnOGLOffscreen; @@ -102,7 +104,9 @@ SoSFTrigger m_flCreateBuffer, m_flRender; bool m_flHasBuffer; SoSFBool saveImage; +#ifdef USE_AVISAVE SoSFBool saveAVI; +#endif SoSFString fldFilename; SoSFEnum transparencyType; enum _enum_transparencyType { SCREEN_DOOR = SoGLRenderAction::SCREEN_DOOR, @@ -114,9 +118,11 @@ SORTED_OBJECT_BLEND = SoGLRenderAction::SORTED_OBJECT_BLEND }; SoSFTrigger readyTrigger; +#ifdef USE_AVISAVE SoSFTrigger finishAVI; SoSFString aviFilename; SoSFInt32 aviFramerate; +#endif SoSFEnum bufferType; enum _enum_BufferType { BUFFER_AUTO=0, #ifdef USE_WINPBUFFER @@ -130,7 +136,9 @@ SoGLRenderAction* m_renderAction; const SbViewportRegion* m_region; +#ifdef USE_AVISAVE ML_NAMESPACE::kAviWriter* myAviWriter; +#endif // EXT_framebuffer_object - http://oss.sgi.com/projects/ogl-sample/registry/EXT/framebuffer_object.txt PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT; Modified: trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRenderer.pro =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRenderer.pro 2009-06-24 13:38:48 UTC (rev 147) +++ trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRenderer.pro 2009-06-24 14:03:01 UTC (rev 148) @@ -7,7 +7,8 @@ DESTDIR = ../../../lib DLLDESTDIR = ../../../lib -CONFIG += dll inventor MLOpenGL ML MLBase MLkAviWriter common boost +CONFIG += dll inventor MLOpenGL ML MLBase common boost +win32:CONFIG += MLkAviWriter MLAB_PACKAGES += UMD_METK \ MeVisLab_Standard Modified: trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRendererSystem.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRendererSystem.h 2009-06-24 13:38:48 UTC (rev 147) +++ trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRendererSystem.h 2009-06-24 14:03:01 UTC (rev 148) @@ -33,6 +33,7 @@ // Enable usage of PBUFFERS only on windows systems #ifdef WIN32 #define USE_WINPBUFFER + #define USE_AVISAVE #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-24 15:12:58
|
Revision: 146 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=146&view=rev Author: wolfspindler Date: 2009-06-24 13:14:05 +0000 (Wed, 24 Jun 2009) Log Message: ----------- BUG: -All Windows specific PBUFFER rendering excluded with compiler flag on non windows platforms. Modified Paths: -------------- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.h trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRenderer.pro trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRendererSystem.h trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.cpp trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.h Modified: trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp 2009-06-24 12:22:49 UTC (rev 145) +++ trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp 2009-06-24 13:14:05 UTC (rev 146) @@ -53,8 +53,12 @@ #define NONE 0 #define FRAMEBUFFER 1 -#define PBUFFER 2 -#define SCREENSHOT 3 +#ifdef USE_WINPBUFFER + #define PBUFFER 2 + #define SCREENSHOT 3 +#else + #define SCREENSHOT 2 +#endif SO_NODE_SOURCE(SomnOffscreenRenderer) @@ -102,7 +106,9 @@ SO_NODE_ADD_FIELD(bufferType, (BUFFER_AUTO)); SO_NODE_DEFINE_ENUM_VALUE(_enum_BufferType, BUFFER_AUTO); +#ifdef USE_WINPBUFFER SO_NODE_DEFINE_ENUM_VALUE(_enum_BufferType, BUFFER_PBUFFER); +#endif SO_NODE_DEFINE_ENUM_VALUE(_enum_BufferType, BUFFER_FRAMEBUFFER); SO_NODE_DEFINE_ENUM_VALUE(_enum_BufferType, BUFFER_SCREENSHOT); SO_NODE_SET_SF_ENUM_TYPE(bufferType, _enum_BufferType); @@ -119,7 +125,7 @@ _attachmentFunc = NULL; m_bufferType = NONE; - myAviWriter = new ml::kAviWriter(); + myAviWriter = new ML_NAMESPACE::kAviWriter(); myAviWriter->getFieldContainer()->getField("outputFilename")->setStringValue("c:/temp.avi"); } @@ -323,8 +329,14 @@ } else //if ( bufferType.getValue()==_enum_BufferType(BUFFER_PBUFFER) ) { +#ifdef USE_WINPBUFFER std::cout << "Framebuffer extension not initialized, using p-buffer instead" << std::endl; m_bufferType = PBUFFER; +#else + std::cout << "Framebuffer and PBUFFER extension not initialized/available, using screenshot instead" << std::endl; + m_flHasBuffer = true; // doesn't need buffer, so always true + m_bufferType = SCREENSHOT; +#endif } @@ -354,6 +366,7 @@ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); // Unbind the FBO for now break; +#ifdef USE_WINPBUFFER case PBUFFER: // FAKE-Fenster um HDC zu kriegen, das muss auch besser gehen //-------------------------------------------------------------------------- @@ -392,6 +405,7 @@ m_poOff->init(); m_flHasBuffer = true; break; +#endif } m_region = new SbViewportRegion( m_iBufferSizeX, m_iBufferSizeY ); @@ -499,6 +513,7 @@ } } break; +#ifdef USE_WINPBUFFER case PBUFFER: if (!m_fldScene.getValue()) { @@ -516,6 +531,7 @@ m_poOff->disable(); } break; +#endif case SCREENSHOT: if (saveImage.getValue() || saveAVI.getValue()) saveToFile(); break; Modified: trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.h 2009-06-24 12:22:49 UTC (rev 145) +++ trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.h 2009-06-24 13:14:05 UTC (rev 146) @@ -118,13 +118,19 @@ SoSFString aviFilename; SoSFInt32 aviFramerate; SoSFEnum bufferType; - enum _enum_BufferType { BUFFER_AUTO=0, BUFFER_PBUFFER=1, BUFFER_FRAMEBUFFER=2, BUFFER_SCREENSHOT=3 }; + enum _enum_BufferType { BUFFER_AUTO=0, +#ifdef USE_WINPBUFFER + BUFFER_PBUFFER=1, BUFFER_FRAMEBUFFER=2, BUFFER_SCREENSHOT=3 +#else + BUFFER_FRAMEBUFFER=1, BUFFER_SCREENSHOT=2 +#endif + }; SoGLRenderAction* m_renderAction; const SbViewportRegion* m_region; - ml::kAviWriter* myAviWriter; + ML_NAMESPACE::kAviWriter* myAviWriter; // EXT_framebuffer_object - http://oss.sgi.com/projects/ogl-sample/registry/EXT/framebuffer_object.txt PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT; Modified: trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRenderer.pro =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRenderer.pro 2009-06-24 12:22:49 UTC (rev 145) +++ trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRenderer.pro 2009-06-24 13:14:05 UTC (rev 146) @@ -7,7 +7,7 @@ DESTDIR = ../../../lib DLLDESTDIR = ../../../lib -CONFIG += dll inventor MLOpenGL opengl ML MLBase MLkAviWriter common boost +CONFIG += dll inventor MLOpenGL ML MLBase MLkAviWriter common boost MLAB_PACKAGES += UMD_METK \ MeVisLab_Standard @@ -24,6 +24,8 @@ SomnOffscreenRenderer.h \ mnOGLOffscreen.h \ image_basic.h + +win32:HEADERS += wglext.h SOURCES += \ UMDmnOffscreenRendererInit.cpp \ Modified: trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRendererSystem.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRendererSystem.h 2009-06-24 12:22:49 UTC (rev 145) +++ trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/UMDmnOffscreenRendererSystem.h 2009-06-24 13:14:05 UTC (rev 146) @@ -30,7 +30,12 @@ #define UMDMNOFFSCREENRENDERER_EXPORT #endif +// Enable usage of PBUFFERS only on windows systems +#ifdef WIN32 + #define USE_WINPBUFFER +#endif + #endif // __UMDMNOFFSCREENRENDERERSYSTEM_H__ Modified: trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.cpp 2009-06-24 12:22:49 UTC (rev 145) +++ trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.cpp 2009-06-24 13:14:05 UTC (rev 146) @@ -1,6 +1,8 @@ #include "mnOGLOffscreen.h" +#ifdef USE_WINPBUFFER + CmnOGLOffscreen::CmnOGLOffscreen(HDC m_hgldc, int iWidth, int iHeight) { this->m_hgldc = m_hgldc; @@ -52,7 +54,7 @@ wglChoosePixelFormatARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)wglGetProcAddress("wglChoosePixelFormatARB"); if( !wglChoosePixelFormatARB ) return -5; - + g_pbuffer.hPBuffer = NULL; g_pbuffer.nWidth = iWidth; g_pbuffer.nHeight = iHeight; @@ -123,3 +125,4 @@ { glReadPixels(0,0,iWidth,iHeight,GL_RGBA,GL_UNSIGNED_BYTE,data); } +#endif \ No newline at end of file Modified: trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.h =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.h 2009-06-24 12:22:49 UTC (rev 145) +++ trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/mnOGLOffscreen.h 2009-06-24 13:14:05 UTC (rev 146) @@ -1,8 +1,11 @@ #ifndef MNOGLOFFSCREEN__H #define MNOGLOFFSCREEN__H -#ifdef WIN32 - #include <windows.h> -#endif + +#include "UMDmnOffscreenRendererSystem.h" + +#ifdef USE_WINPBUFFER + +#include <windows.h> #include <GL/gl.h> #include <GL/glu.h> @@ -35,6 +38,7 @@ HDC m_hgldc; HGLRC m_hglrc_old; HDC m_hgldc_old; + PBUFFER g_pbuffer; PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB; @@ -45,6 +49,6 @@ PFNWGLQUERYPBUFFERARBPROC wglQueryPbufferARB; PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB; }; +#endif - #endif \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-24 14:48:08
|
Revision: 149 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=149&view=rev Author: wolfspindler Date: 2009-06-24 14:48:07 +0000 (Wed, 24 Jun 2009) Log Message: ----------- BUG: -Implicitly constructed const objects passed as non const arguments are not allowed in ISO c++ (windows compilers don't check this). Passed as non const argument now to resolve platform dependence. Modified Paths: -------------- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp Modified: trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp 2009-06-24 14:03:01 UTC (rev 148) +++ trunk/UMD/METK/Sources/Inventor/UMDmnOffscreenRenderer/SomnOffscreenRenderer.cpp 2009-06-24 14:48:07 UTC (rev 149) @@ -589,7 +589,8 @@ } //cout << "saving image" << endl; //test.file_write_bitmap(std::string("c:\\test_neu.bmp")); - test.file_write_bitmap(std::string(fldFilename.getValue().getString())); + std::string fileName(fldFilename.getValue().getString()); + test.file_write_bitmap(fileName); } #ifdef USE_AVISAVE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-24 12:52:38
|
Revision: 145 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=145&view=rev Author: wolfspindler Date: 2009-06-24 12:22:49 +0000 (Wed, 24 Jun 2009) Log Message: ----------- BUG: -Missing lib and bin directories added to package to avoid that installer generation complains about missing directories. Added Paths: ----------- trunk/UMD/METK/bin/ trunk/UMD/METK/lib/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-24 10:49:09
|
Revision: 144 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=144&view=rev Author: wolfspindler Date: 2009-06-24 10:48:26 +0000 (Wed, 24 Jun 2009) Log Message: ----------- BUG: -Windows backslashes replaced by platform independent forwards slashes to fix Linux link problem. Modified Paths: -------------- trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModules.pro Modified: trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModules.pro =================================================================== --- trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModules.pro 2009-06-24 10:46:35 UTC (rev 143) +++ trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModules.pro 2009-06-24 10:48:26 UTC (rev 144) @@ -36,14 +36,14 @@ MinimalDistancePointClouds/MinimalDistancePointClouds.h \ MinimalDistancePointClouds/TileSphere.h \ MinimalDistancePointClouds/TileSphereHashTable.h \ - CSODistance\CSODistance.h + CSODistance/CSODistance.h SOURCES += \ MLCSOCommunityModulesInit.cpp \ MinimalDistancePointClouds/MinimalDistancePointClouds.cpp \ MinimalDistancePointClouds/TileSphere.cpp \ MinimalDistancePointClouds/TileSphereHashTable.cpp \ - CSODistance\CSODistance.cpp + CSODistance/CSODistance.cpp RELATEDFILES += \ ../../../Modules/ML/MLCSOCommunityModules/MLCSOCommunityModules.def This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-24 10:47:06
|
Revision: 143 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=143&view=rev Author: wolfspindler Date: 2009-06-24 10:46:35 +0000 (Wed, 24 Jun 2009) Log Message: ----------- BUG: -Lower/Capital letter usage fixed. Modified Paths: -------------- trunk/UMD/METK/Sources/ML/Viewpoint/ViewpointInit.cpp Modified: trunk/UMD/METK/Sources/ML/Viewpoint/ViewpointInit.cpp =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/ViewpointInit.cpp 2009-06-24 10:38:51 UTC (rev 142) +++ trunk/UMD/METK/Sources/ML/Viewpoint/ViewpointInit.cpp 2009-06-24 10:46:35 UTC (rev 143) @@ -16,7 +16,7 @@ // Include all module headers ... #include "METKCreateIntraOPDummy/mlMETKCreateIntraOPDummy.h" -#include "METKIntraOPVIewpoint/mlMETKIntraOPViewpoint.h" +#include "METKIntraOPViewpoint/mlMETKIntraOPViewpoint.h" #include "METKAutoFading/mlMETKAutoFading.h" #include "METKCalcCamPos/METKCalcCamPos.h" #include "METKShowClusteredObjects/METKShowClusteredObjects.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-24 10:39:47
|
Revision: 142 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=142&view=rev Author: wolfspindler Date: 2009-06-24 10:38:51 +0000 (Wed, 24 Jun 2009) Log Message: ----------- BUG: -Windows backslashes replaced by platform independent forwards slashes to fix Linux link problem. Modified Paths: -------------- trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModules.pro Property Changed: ---------------- trunk/Community/General/Sources/ML/MLCSOCommunityModules/ Property changes on: trunk/Community/General/Sources/ML/MLCSOCommunityModules ___________________________________________________________________ Added: svn:ignore + MLCSOCommunityModules.sln MLCSOCommunityModules.suo MLCSOCommunityModules.vcproj MLCSOCommunityModules.vcproj.lapsus-win.wolf.user Modified: trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModules.pro =================================================================== --- trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModules.pro 2009-06-24 10:34:58 UTC (rev 141) +++ trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModules.pro 2009-06-24 10:38:51 UTC (rev 142) @@ -17,7 +17,7 @@ # add dependencies of this project here -CONFIG += dll ML MLBase MLTools newmat MLCSO boost +CONFIG += dll ML MLBase MLTools newmat MLCSO boost MLAB_PACKAGES += MeVisLab_Standard @@ -33,16 +33,16 @@ MLCSOCommunityModulesInit.h \ MLCSOCommunityModulesSystem.h \ MLCSOCommunityModulesDefs.h \ - MinimalDistancePointClouds\MinimalDistancePointClouds.h \ - MinimalDistancePointClouds\TileSphere.h \ - MinimalDistancePointClouds\TileSphereHashTable.h \ + MinimalDistancePointClouds/MinimalDistancePointClouds.h \ + MinimalDistancePointClouds/TileSphere.h \ + MinimalDistancePointClouds/TileSphereHashTable.h \ CSODistance\CSODistance.h SOURCES += \ MLCSOCommunityModulesInit.cpp \ - MinimalDistancePointClouds\MinimalDistancePointClouds.cpp \ - MinimalDistancePointClouds\TileSphere.cpp \ - MinimalDistancePointClouds\TileSphereHashTable.cpp \ + MinimalDistancePointClouds/MinimalDistancePointClouds.cpp \ + MinimalDistancePointClouds/TileSphere.cpp \ + MinimalDistancePointClouds/TileSphereHashTable.cpp \ CSODistance\CSODistance.cpp RELATEDFILES += \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-24 10:36:00
|
Revision: 141 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=141&view=rev Author: wolfspindler Date: 2009-06-24 10:34:58 +0000 (Wed, 24 Jun 2009) Log Message: ----------- BUG: -New trial to fix parameter ambiguities. Modified Paths: -------------- trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.cpp trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.cpp Modified: trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.cpp =================================================================== --- trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.cpp 2009-06-24 07:27:57 UTC (rev 140) +++ trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.cpp 2009-06-24 10:34:58 UTC (rev 141) @@ -99,8 +99,9 @@ if (status == MSG_INIT && message == messageFld->getStringValue()) { // instance is responsible. Setting INF_STATUS to MSG_PROCESSING statusFld->setStringValue(MSG_PROCESSING); - obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(ML_NAMESPACE::std_string(MSG_PROCESSING)); //see line 64 for linux test - //SoDebugError::postInfo("RECEIVER: PROCESSING",""); + const omMessage processingMsg(ML_NAMESPACE::std_string(MSG_PROCESSING)); + obj[LAY_STATUSEVENTS][INF_STATUS] = processingMsg; //see line 64 for linux test + //SoDebugError::postInfo("RECEIVER: PROCESSING",""); dataFld->setStringValue(obj[LAY_STATUSEVENTS][INF_DATA]); sendNotification(); _processing = true; Modified: trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.cpp =================================================================== --- trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.cpp 2009-06-24 07:27:57 UTC (rev 140) +++ trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.cpp 2009-06-24 10:34:58 UTC (rev 141) @@ -79,22 +79,24 @@ if (obj.isValid()) { if (METKMsgManager::numListener(this) > 0) { _sending = true; - //std::cout<<"SENDER: _sending=true "<<std::endl; + //std::cout<<"SENDER: _sending=true "<<std::endl; obj[LAY_STATUSEVENTS][INF_MESSAGE] = messageFld->getStringValue(); obj[LAY_STATUSEVENTS][INF_DATA] = dataFld->getStringValue(); - obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(ML_NAMESPACE::std_string(MSG_INIT)); - //std::cout<<"SENDER: INIT"<<std::endl; + const omMessage initMsg(ML_NAMESPACE::std_string(MSG_INIT)); + obj[LAY_STATUSEVENTS][INF_STATUS] = initMsg; + //std::cout<<"SENDER: INIT"<<std::endl; sendNotification(); statusFld->setStringValue(MSG_PROCESSING); successFld->setBoolValue(false); - doneFld->setBoolValue(false); //done immer erst nach success als letztes setzen + doneFld->setBoolValue(false); //done immer erst nach success als letztes setzen } else { statusFld->setStringValue("Nobody's listening."); - obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(ML_NAMESPACE::std_string(MSG_DONE)); - //std::cout<<"SENDER: DONE NOBODYs LISTENING"<<std::endl; + const omMessage doneMsg(ML_NAMESPACE::std_string(MSG_DONE)); + obj[LAY_STATUSEVENTS][INF_STATUS] = doneMsg; + //std::cout<<"SENDER: DONE NOBODYs LISTENING"<<std::endl; sendNotification(); successFld->setBoolValue(false); - doneFld->setBoolValue(true); //done immer erst nach success als letztes setzen + doneFld->setBoolValue(true); //done immer erst nach success als letztes setzen } } } @@ -132,16 +134,17 @@ const omMessage& status = obj[LAY_STATUSEVENTS][INF_STATUS]; const std_string& message = obj[LAY_STATUSEVENTS][INF_MESSAGE]; - //SoDebugError::postInfo("METKMsgSender::handleObjMgrNotification in _sending STATUS ",(status + " " + message).c_str()); + //SoDebugError::postInfo("METKMsgSender::handleObjMgrNotification in _sending STATUS ",(status + " " + message).c_str()); // request for new process received, checking responsibility if (status == MSG_READY && message == messageFld->getStringValue()) { // instance is responsible. Setting INF_STATUS to MSG_DONE - obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(ML_NAMESPACE::std_string(MSG_DONE)); - //SoDebugError::postInfo("SENDER: DONE",""); + const omMessage doneMsg(ML_NAMESPACE::std_string(MSG_DONE)); + obj[LAY_STATUSEVENTS][INF_STATUS] = doneMsg; + //SoDebugError::postInfo("SENDER: DONE",""); sendNotification(); _sending = false; - //SoDebugError::postInfo("SENDER: _sending=false ",""); + //SoDebugError::postInfo("SENDER: _sending=false ",""); statusFld->setStringValue(MSG_DONE); successFld->setBoolValue(true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bar...@us...> - 2009-06-24 07:28:02
|
Revision: 140 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=140&view=rev Author: bartdedobbelaer Date: 2009-06-24 07:27:57 +0000 (Wed, 24 Jun 2009) Log Message: ----------- - Moved MathUtils MinimalDistancePointClouds to MLCSOCommunityModules Modified Paths: -------------- trunk/Community/General/Sources/ML/MLCSOCommunityModules/CSODistance/CSODistance.cpp trunk/Community/General/Sources/ML/MLCSOCommunityModules/CSODistance/CSODistance.h trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModules.pro Added Paths: ----------- trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModulesDefs.h trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/ trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/MinimalDistancePointClouds.cpp trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/MinimalDistancePointClouds.h trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphere.cpp trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphere.h trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphereHashTable.cpp trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphereHashTable.h Modified: trunk/Community/General/Sources/ML/MLCSOCommunityModules/CSODistance/CSODistance.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLCSOCommunityModules/CSODistance/CSODistance.cpp 2009-06-23 18:15:00 UTC (rev 139) +++ trunk/Community/General/Sources/ML/MLCSOCommunityModules/CSODistance/CSODistance.cpp 2009-06-24 07:27:57 UTC (rev 140) @@ -122,8 +122,8 @@ if (_csoList != NULL) { if ((_csoList->numCSO() >= 2) && (_csoList->getCSOAt(0)->getIsFinished()) && (_csoList->getCSOAt(1)->getIsFinished())) { - MATHUTILS_NAMESPACE::MinimalDistancePointClouds* pointSetsMinDist = NULL; - ML_CHECK_NEW(pointSetsMinDist, MATHUTILS_NAMESPACE::MinimalDistancePointClouds); + MinimalDistancePointClouds* pointSetsMinDist = NULL; + ML_CHECK_NEW(pointSetsMinDist, MinimalDistancePointClouds); std::vector<vec3>pointSet1; std::vector<vec3>pointSet2; Modified: trunk/Community/General/Sources/ML/MLCSOCommunityModules/CSODistance/CSODistance.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOCommunityModules/CSODistance/CSODistance.h 2009-06-23 18:15:00 UTC (rev 139) +++ trunk/Community/General/Sources/ML/MLCSOCommunityModules/CSODistance/CSODistance.h 2009-06-24 07:27:57 UTC (rev 140) @@ -2,10 +2,9 @@ #ifndef __CSODistance_H #define __CSODistance_H -#include "../MLCSOCommunityModulesSystem.h" +#include "../MLCSOCommunityModulesDefs.h" -#include <CSOBase/CSOList.h> -#include <MinimalDistancePointClouds.h> +#include "../MinimalDistancePointClouds/MinimalDistancePointClouds.h" #include <mlXMarkerList.h> ML_START_NAMESPACE Modified: trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModules.pro =================================================================== --- trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModules.pro 2009-06-23 18:15:00 UTC (rev 139) +++ trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModules.pro 2009-06-24 07:27:57 UTC (rev 140) @@ -17,7 +17,7 @@ # add dependencies of this project here -CONFIG += dll ML MLBase MLTools MathUtils newmat MLCSO boost +CONFIG += dll ML MLBase MLTools newmat MLCSO boost MLAB_PACKAGES += MeVisLab_Standard @@ -32,10 +32,17 @@ HEADERS += \ MLCSOCommunityModulesInit.h \ MLCSOCommunityModulesSystem.h \ + MLCSOCommunityModulesDefs.h \ + MinimalDistancePointClouds\MinimalDistancePointClouds.h \ + MinimalDistancePointClouds\TileSphere.h \ + MinimalDistancePointClouds\TileSphereHashTable.h \ CSODistance\CSODistance.h SOURCES += \ MLCSOCommunityModulesInit.cpp \ + MinimalDistancePointClouds\MinimalDistancePointClouds.cpp \ + MinimalDistancePointClouds\TileSphere.cpp \ + MinimalDistancePointClouds\TileSphereHashTable.cpp \ CSODistance\CSODistance.cpp RELATEDFILES += \ Added: trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModulesDefs.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModulesDefs.h (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOCommunityModules/MLCSOCommunityModulesDefs.h 2009-06-24 07:27:57 UTC (rev 140) @@ -0,0 +1,30 @@ +// **InsertLicense** code +//---------------------------------------------------------------------------------- +//! Often used definitions in CSO module library. +/*! +// \file CSOModuleDefs.h +// \author Bart De Dobbelaer +// \date 06/2009 +*/ +//---------------------------------------------------------------------------------- + +#ifndef __CSOModuleDefs_h +#define __CSOModuleDefs_h + +#include "MLCSOCommunityModulesSystem.h" + +#include <CSOBase/CSOList.h> + +#include <mlLibraryInitMacros.h> + +#include <math.h> +#include <string> +#include <vector> +#include <map> +#include <fstream> +#include <sstream> + + +#endif // __CSOModuleDefs_h + + Added: trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/MinimalDistancePointClouds.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/MinimalDistancePointClouds.cpp (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/MinimalDistancePointClouds.cpp 2009-06-24 07:27:57 UTC (rev 140) @@ -0,0 +1,404 @@ +//---------------------------------------------------------------------------------- +// +// Copyright 2001, MeVis gGmbH +// ALL RIGHTS RESERVED +// +// THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY +// INFORMATION OF MEVIS GGMBH. ANY DUPLICATION, MODIFICATION, +// DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY +// PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF MEVIS GGMBH +// +//---------------------------------------------------------------------------------- +//! The MinimalDistancePointClouds implements +//! a fast nearest pair search algorithm described by Sean Quinlan +//! in 'Efficient Distance Computation between Non-Convex Objects'. +/*! +// \file MinimalDistancePointClouds.cpp +// \author Christian Tietjen, Olaf Konrad, last changed by $Author: okonrad $ +// \date 11/2005 +*/ +//---------------------------------------------------------------------------------- + +#include "MinimalDistancePointClouds.h" + + +ML_START_NAMESPACE + +////////////////////////////////////////////////////////////////////////// + +MinimalDistancePointClouds::MinimalDistancePointClouds() +{ + ML_TRACE_IN("MinimalDistancePointClouds::MinimalDistancePointClouds() "); + + _pointSet1 = NULL; + _pointSet2 = NULL; + + _hashTable = NULL; + + _size1 = 0; + _size2 = 0; + + _sphereIndex = 0; + _entries = -1; + _partition = -1; + + _tileSphere1 = NULL; + _tileSphere2 = NULL; +} + +////////////////////////////////////////////////////////////////////////// + +MinimalDistancePointClouds::~MinimalDistancePointClouds() +{ + ML_TRACE_IN("MinimalDistancePointClouds::~MinimalDistancePointClouds()"); + + ML_DELETE_ARR(_pointSet1); + ML_DELETE_ARR(_pointSet2); + + ML_DELETE(_tileSphere1); + ML_DELETE(_tileSphere2); +} + +////////////////////////////////////////////////////////////////////////// + +void MinimalDistancePointClouds::setPointSets(const std::vector<ml::vec3>& pointCloud1, const std::vector<ml::vec3>& pointCloud2) +{ + ML_TRACE_IN("void MinimalDistancePointClouds::setPointSets()"); + + unsigned int i = 0; + unsigned int entry = 0; + + ML_DELETE_ARR(_pointSet1); + ML_DELETE_ARR(_pointSet2); + + _size1 = pointCloud1.size(); + _size2 = pointCloud2.size(); + + ML_CHECK_NEW(_pointSet1, float[3 * _size1]); + ML_CHECK_NEW(_pointSet2, float[3 * _size2]); + + // copy positions of the nodes to float array + + for (i = 0; i < _size1; i++){ + + const ml::vec3& currPos = pointCloud1[i]; + + _pointSet1[entry++] = static_cast<float>(currPos[0]); + _pointSet1[entry++] = static_cast<float>(currPos[1]); + _pointSet1[entry++] = static_cast<float>(currPos[2]); + } + + entry = 0; + + for (i = 0; i < _size2; i++){ + + const ml::vec3& currPos = pointCloud2[i]; + + _pointSet2[entry++] = static_cast<float>(currPos[0]); + _pointSet2[entry++] = static_cast<float>(currPos[1]); + _pointSet2[entry++] = currPos[2]; + } + + if ((_pointSet1 != NULL) && (_pointSet2 != NULL)){ + + ML_DELETE(_tileSphere1); + ML_DELETE(_tileSphere2); + + _tileSphere1 = generateTree(_pointSet1, _size1); + _tileSphere2 = generateTree(_pointSet2, _size2); + + // Determine size of both spheres + _tileSphere1->getDeFactoSize(); + _tileSphere2->getDeFactoSize(); + + + } else { + std::cout << "MinimalDistancePointClouds::setPointSets: One of the arguments was NULL" << std::endl; + } +} + +////////////////////////////////////////////////////////////////////////// + +void MinimalDistancePointClouds::setFirstSinglePoint(const ml::vec3& point) +{ + ML_TRACE_IN("void MinimalDistancePointClouds::setFirstSinglePoint()"); + + + ML_DELETE_ARR(_pointSet1); + ML_CHECK_NEW (_pointSet1, float[3]); + + // copy node position to point set. + + _pointSet1[0] = static_cast<float>(point[0]); + _pointSet1[1] = static_cast<float>(point[1]); + _pointSet1[2] = static_cast<float>(point[2]); + _size1 = 1; + + // The second tileSphere is already set + + ML_DELETE(_tileSphere1); + + _tileSphere1 = generateTree(_pointSet1, _size1); + _tileSphere1->getDeFactoSize(); +} + +////////////////////////////////////////////////////////////////////////// + +void MinimalDistancePointClouds::setFirstPointSet(const std::vector<ml::vec3>& pointCloud) +{ + ML_TRACE_IN("void MinimalDistancePointClouds::setFirstPointSet()"); + + unsigned int i = 0; + unsigned int entry = 0; + + // copy node positions to point set. + + _size1 = pointCloud.size(); + + ML_DELETE_ARR(_pointSet1); + ML_CHECK_NEW (_pointSet1, float[3 * _size1]); + + + for (i = 0; i < _size1; i++){ + + const ml::vec3& currPos = pointCloud[i]; + + _pointSet1[entry++] = static_cast<float>(currPos[0]); + _pointSet1[entry++] = static_cast<float>(currPos[1]); + _pointSet1[entry++] = static_cast<float>(currPos[2]); + } + + // The second tileSphere is already set + + if (_pointSet1 != NULL){ + + ML_DELETE(_tileSphere1); + + _tileSphere1 = generateTree(_pointSet1, _size1); + _tileSphere1->getDeFactoSize(); + + } else { + std::cout << "MinimalDistancePointClouds::setFirstPointSets: The argument was NULL" << std::endl; + } +} + +////////////////////////////////////////////////////////////////////////// + +void MinimalDistancePointClouds::computeDistance(ml::vec3& point1, ml::vec3& point2) +{ + ML_TRACE_IN("void MinimalDistancePointClouds::computeDistance()"); + + // Both tileSpheres exist + if (_tileSphere1 && _tileSphere2){ + + // Initialize index + _sphereIndex = 0; + + // Generate hash table + ML_CHECK_NEW(_hashTable, TileSphereHashTable); + + float distance; + float* p1 = NULL; // Return coordinates + float* p2 = NULL; + + // Compute the minimal distance of both point sets + distance = _tileSphere1->computeDistance(_tileSphere2, p1, p2); + + if ((p1 != NULL) && (p2 != NULL)){ + + point1[0] = p1[0]; + point1[1] = p1[1]; + point1[2] = p1[2]; + + point2[0] = p2[0]; + point2[1] = p2[1]; + point2[2] = p2[2]; + } else { + std::cout << "MinimalDistancePointClouds::computeDistance: resulting points were NULL" << std::endl; + } + + ML_DELETE(_hashTable); + } +} + +////////////////////////////////////////////////////////////////////////// + +void MinimalDistancePointClouds::computeDistance(float*& point1, float*& point2) +{ + ML_TRACE_IN("void MinimalDistancePointClouds::computeDistance(float*& point1, float*& point2) "); + + // Both tileSpheres exist + if (_tileSphere1 && _tileSphere2){ + + // Initialize index + _sphereIndex = 0; + + // Generate hash table + ML_CHECK_NEW(_hashTable, TileSphereHashTable); + + // Compute the minimal distance of both point sets + (void)_tileSphere1->computeDistance(_tileSphere2, point1, point2); + + ML_DELETE(_hashTable); + } +} + +////////////////////////////////////////////////////////////////////////// + +void MinimalDistancePointClouds::setError(float error) +{ + ML_TRACE_IN("void MinimalDistancePointClouds::setError(float error) "); + + if (error > 1) { error = 1; } + if (error < 0) { error = 0; } + + _error = error; +} + +////////////////////////////////////////////////////////////////////////// + +TileSphere* MinimalDistancePointClouds::generateTree(float* pointSet, long size) +{ + ML_TRACE_IN("TileSphere* MinimalDistancePointClouds::generateTree(float* pointSet, long size) "); + + // Do we have a valid point set? + if ((pointSet != NULL) && (size != 0)) { + + // Calculate parameters for the TileSphere: + // A single sphere should not contain more than 2000 entries. + // The size parameter should not become smaller than the number of sub spheres times 2000. + // The less sub spheres, the faster the algorithm will be. + // If the total amount of points is less than (2^3)*2000, the number of points + // in one sphere may be reduced. + // This guarantees (except for worst cases of spatial point distribution) optimal + // runtime behavior. + int partition = 0; + int entries = 0; + + if (_partition == -1) { + + partition = 1 + (int)pow(((float)size / (float)_entries), (1.0f / 3.0f)); + + if (partition < 2){ partition = 2; } + + entries = size / (int)pow(partition, 3); + + if (entries < 3){ entries = 3; } + + } else { + partition = _partition; + entries = _entries; + } + + TileSphere* tileSphere = NULL; + ML_CHECK_NEW(tileSphere, TileSphere(this, partition, entries, _error)); + + float* pointPos = pointSet; + float minX=0, maxX=0, minY=0, maxY=0, minZ=0, maxZ=0; + + // compute Bounding Box + getBB(pointSet, size, minX, maxX, minY, maxY, minZ, maxZ); + + // and assign the Bounding Box to the main sphere + tileSphere->setBB(minX, maxX, minY, maxY, minZ, maxZ); + + // insert all points + //long tmpSphereCounter = _sphereIndex; + long counter=0; + + for (counter = 0; counter < size; counter++) { + tileSphere->addPoint(pointPos); + pointPos += 3; + } + + return tileSphere; + } + + // If the point set was not valid, return a new (and empty) TileSphere. + TileSphere* dummy = NULL; + ML_CHECK_NEW(dummy, TileSphere); + return dummy; +} + +////////////////////////////////////////////////////////////////////////// + +void MinimalDistancePointClouds::getBB(float* pointSet, long size, float& minX, float& maxX, float& minY, float& maxY, float& minZ, float& maxZ) +{ + ML_TRACE_IN("void MinimalDistancePointClouds::getBB(float* pointSet, long size, float& minX, float& maxX, float& minY, float& maxY, float& minZ, float& maxZ)"); + + // Return the bounding box of a point set + if ((pointSet != NULL) && (size > 0)) { + float* pointPos = pointSet; + minX = maxX = *(pointPos++); + minY = maxY = *(pointPos++); + minZ = maxZ = *(pointPos++); + + long counter=0; + + for (counter = 1; counter < size; counter++) { + if (minX > *pointPos) { minX = *pointPos; } + if (maxX < *pointPos) { maxX = *pointPos; } + pointPos++; + if (minY > *pointPos) { minY = *pointPos; } + if (maxY < *pointPos) { maxY = *pointPos; } + pointPos++; + if (minZ > *pointPos) { minZ = *pointPos; } + if (maxZ < *pointPos) { maxZ = *pointPos; } + pointPos++; + } // for + } // if +} + +////////////////////////////////////////////////////////////////////////// + +void MinimalDistancePointClouds::verbose(bool onOff) +{ + ML_TRACE_IN("void MinimalDistancePointClouds::verbose(bool onOff) "); + + _verbose = onOff; +} + +////////////////////////////////////////////////////////////////////////// + +void MinimalDistancePointClouds::setNumEntries(int entries) +{ + ML_TRACE_IN("void MinimalDistancePointClouds::setNumEntries(int entries) "); + + _entries = entries; + _partition = -1; +} + +////////////////////////////////////////////////////////////////////////// + +void MinimalDistancePointClouds::setParams(int entries, int partition) +{ + ML_TRACE_IN("void MinimalDistancePointClouds::setParams(int entries, int partition) "); + + _entries = entries; + _partition = partition; +} + +////////////////////////////////////////////////////////////////////////// + +int MinimalDistancePointClouds::getUniqueIndex() +{ + ML_TRACE_IN("int MinimalDistancePointClouds::getUniqueIndex()"); + + return _sphereIndex++; +} + +////////////////////////////////////////////////////////////////////////// + +TileSphereHashTable* MinimalDistancePointClouds::getHashTable() +{ + ML_TRACE_IN("TileSphereHashTable* MinimalDistancePointClouds::getHashTable() "); + + return _hashTable; +} + +////////////////////////////////////////////////////////////////////////// + + +ML_END_NAMESPACE + + Added: trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/MinimalDistancePointClouds.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/MinimalDistancePointClouds.h (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/MinimalDistancePointClouds.h 2009-06-24 07:27:57 UTC (rev 140) @@ -0,0 +1,124 @@ +//---------------------------------------------------------------------------------- +// +// Copyright 2001, MeVis gGmbH +// ALL RIGHTS RESERVED +// +// THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY +// INFORMATION OF MEVIS GGMBH. ANY DUPLICATION, MODIFICATION, +// DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY +// PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF MEVIS GGMBH +// +//---------------------------------------------------------------------------------- +//! The MinimalDistancePointClouds implements +//! a fast nearest pair search algorithm described by Sean Quinlan +//! in 'Efficient Distance Computation between Non-Convex Objects'. +/*! +// \file MinimalDistancePointClouds.h +// \author Christian Tietjen, Olaf Konrad, last changed by $Author: okonrad $ +// \date 11/2005 +*/ +//---------------------------------------------------------------------------------- + + + +#ifndef __MinimalDistancePointClouds_H +#define __MinimalDistancePointClouds_H + +#include "../MLCSOCommunityModulesDefs.h" + +#include "TileSphere.h" +#include "TileSphereHashTable.h" + +#include "mlVec3.h" + + +ML_START_NAMESPACE + +//! The MinimalDistancePointClouds implements +//! a fast nearest pair search algorithm described by Sean Quinlan +//! in 'Efficient Distance Computation between Non-Convex Objects'. +class MinimalDistancePointClouds +{ + +public: + + //! Constructor. + MinimalDistancePointClouds(); + //! Destructor. + virtual ~MinimalDistancePointClouds(); + + //! This method passes the two point clouds in the form of two standard vectors. + void setPointSets(const std::vector<ml::vec3>& pointCloud1, const std::vector<ml::vec3>& pointCloud2); + //! Sets only the first point set anew. The second one (with all its TileSphere tree computations) + //! is left as it was. + void setFirstPointSet(const std::vector<ml::vec3>& pointCloud); + //! Set only the first point set anew, which consists only of a single point. + //! The second pointSet is left as it was. + void setFirstSinglePoint(const ml::vec3& point); + + + //! This parameter describes how many points can be put as maximum into one sub sphere, + //! but the designed value can be lower. The default value is 2000. + //! The concrete value for \c _entries and \c _partition will be computed automatically. + void setNumEntries(int entries); + //! Sets fix values for both objects for \c _entries and \c _partition. + void setParams(int entries, int partition); + //! Describes the maintainable error. 0 = 0% and 1 = 100%. The default value is 0. + void setError(float error); + + //! Returns a copy of the both points with the minimal distance. + //! The method \c setPointSets must have been called before. + void computeDistance(float* &point1, float* &point2); + //! Returns two points with minimal distance as vec3. + //! The method \c setPointSets must have been called before. + void computeDistance(ml::vec3& point1, ml::vec3& point2); + + + //! Returns an unique index for each tile sphere. + int getUniqueIndex(); + //! Returns a pointer to the hash table. + TileSphereHashTable* getHashTable(); + + //! Dumps the console with additional debugging info. + void verbose(bool onOff); + + +private: + + //! The one point set. + float* _pointSet1; + //! The other point set. + float* _pointSet2; + //! The sizes of the point sets. + int _size1, _size2; + //! The internal sphere index. + unsigned int _sphereIndex; + //! The internal hash table. + TileSphereHashTable* _hashTable; + + //! Pointer to the first tileSphere. + TileSphere* _tileSphere1; + //! Pointer to the second tileSphere. + TileSphere* _tileSphere2; + + //! The maintainable error. + float _error; + + //! Dumps the console with additional debugging info. + bool _verbose; + + //! Set by \c setNumEntries. + int _entries, _partition; + + //! Generates the tree of spheres for each point set. + TileSphere* generateTree(float* pointSet, long size); + + //! Gets the BB of the main point set. + void getBB(float* pointSet, long size, float& minX, float& maxX, float& minY, float& maxY, float& minZ, float& maxZ); +}; + +ML_END_NAMESPACE + + +#endif // __MinimalDistancePointClouds_H + Added: trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphere.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphere.cpp (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphere.cpp 2009-06-24 07:27:57 UTC (rev 140) @@ -0,0 +1,573 @@ +//---------------------------------------------------------------------------------- +// +// Copyright 2001, MeVis gGmbH +// ALL RIGHTS RESERVED +// +// THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY +// INFORMATION OF MEVIS GGMBH. ANY DUPLICATION, MODIFICATION, +// DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY +// PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF MEVIS GGMBH +// +//---------------------------------------------------------------------------------- +//! TileSphere is used in the class \c MinimalDistancePointClouds. +//! It defines a single sub sphere for +//! a fast nearest pair search algortihm described by Sean Quinlan +//! in 'Efficient Distance Computation between Non-Convex Objects'. +//! TileSphere will generate her own sub spheres if necessary +/*! +// \file TileSphere.cpp +// \author Christian Tietjen, Olaf Konrad, last changed by $Author: okonrad $ +// \date 11/2005 +*/ +//---------------------------------------------------------------------------------- + +#include "TileSphere.h" +#include "MinimalDistancePointClouds.h" + + +ML_START_NAMESPACE + +////////////////////////////////////////////////////////////////////////// + +TileSphere::TileSphere() +{ + ML_TRACE_IN("TileSphere::TileSphere() "); + + _initSphere(NULL, 2, 1103, 0); +} + +////////////////////////////////////////////////////////////////////////// + +TileSphere::TileSphere(MinimalDistancePointClouds* minimalDistance, int maxPartition, int numElements, float error) +{ + ML_TRACE_IN("TileSphere::TileSphere(MinimalDistancePointClouds* minimalDistance, int maxPartition, int numElements, float error) "); + + _initSphere(minimalDistance, maxPartition, numElements, error); +} + +////////////////////////////////////////////////////////////////////////// + +TileSphere::~TileSphere() +{ + ML_TRACE_IN("TileSphere::~TileSphere()"); + + ML_DELETE_ARR(_tileSpheres); + ML_DELETE_ARR(_subset); +} + +////////////////////////////////////////////////////////////////////////// + +void TileSphere::setParameter(MinimalDistancePointClouds* minimalDistance, int maxPartition, int numElements, float error) +{ + ML_TRACE_IN("void TileSphere::setParameter(MinimalDistancePointClouds* minimalDistance, int maxPartition, int numElements, float error) "); + + _minimalDistance = minimalDistance; + _maxEntries = numElements; + _partition = maxPartition; + _cubicPartition = _partition * _partition * _partition; + _sphereIndex = minimalDistance->getUniqueIndex(); + _error = error; + + _subset = NULL; + ML_CHECK_NEW(_subset, float*[numElements]); +} + +////////////////////////////////////////////////////////////////////////// + +float TileSphere::computeDistance(TileSphere* tileSphere, float*& point1, float*& point2) +{ + ML_TRACE_IN("float TileSphere::computeDistance(TileSphere* tileSphere, float*& point1, float*& point2)"); + + float distance = -1; + // Determine current distance + if ((point1 != NULL) && (point2 != NULL)){ + distance = _distance(point1, point2); + } + + if (tileSphere != NULL) { + + // Register this call in the hash table + _minimalDistance->getHashTable()->addPair(this, tileSphere); + + // Distance can not be less.. + if (fabs(distance) < FLT_EPSILON){ + return 0; + } + + // Descend recursively in both sets until leafs are reached. + // On the way, split the sphere with the largest radius. + + if ((_radius > tileSphere->_getRadius()) && _hasSubSpheresFlag) { + distance = tileSphere->computeDistance(this->_getPreciserSphere(tileSphere, distance), point2, point1); + } else { + if ((_radius < tileSphere->_getRadius()) && tileSphere->_hasSubSpheres()) { + distance = this->computeDistance(tileSphere->_getPreciserSphere(this, distance), point1, point2); + } else { + // This branch is active if the one sphere was smaller, + // but the other did not contain any sub spheres. + if (_hasSubSpheresFlag) { + distance = tileSphere->computeDistance(this->_getPreciserSphere(tileSphere, distance), point2, point1); + } + if (tileSphere->_hasSubSpheres()) { + distance = this->computeDistance(tileSphere->_getPreciserSphere(this, distance), point1, point2); + } + } + } + + if (!_hasSubSpheresFlag && !tileSphere->_hasSubSpheres()) { + // Compute direct distance between two sets of points. + + float** otherSubset = NULL; + unsigned int otherSize = 0; + float tmpDistance = 0; + float tmpDistance2 = 0; + float *tmpPoint1 = NULL; + float *tmpPoint2 = NULL; + + int otherSizeParameter=0; + tileSphere->_getSubset(otherSubset, otherSizeParameter); + otherSize = static_cast<unsigned int>(otherSizeParameter); + + if (distance == -1) { + distance = _distance(_subset[0], otherSubset[0]); + point1 = _subset[0]; + point2 = otherSubset[0]; + } + + tmpDistance2 = _fastDistance(_subset[0], otherSubset[0]); + tmpPoint1 = _subset[0]; + tmpPoint2 = otherSubset[0]; + + unsigned int counter=0, otherCounter=0; + + // Test all points pairwise + for (otherCounter = 0; otherCounter < otherSize; otherCounter++) { + for (counter = 0; counter < _numEntries; counter++) { + tmpDistance = _fastDistance(_subset[counter], otherSubset[otherCounter]); + if (tmpDistance2 > tmpDistance) { + tmpDistance2 = tmpDistance; + tmpPoint1 = _subset[counter]; + tmpPoint2 = otherSubset[otherCounter]; + } + } + } + + tmpDistance2 = sqrtf(tmpDistance2); + if (distance > tmpDistance2) { + distance = tmpDistance2; + point1 = tmpPoint1; + point2 = tmpPoint2; + } + } + if (_hasSubSpheresFlag) { + // Compare the distance with all distances to other spheres + // and test if there are other spheres within the same range. + TileSphere* tmp = this->_getPreciserSphere(tileSphere, distance); + while (tmp != NULL) { + distance = tileSphere->computeDistance(tmp, point1, point2); + tmp = this->_getPreciserSphere(tileSphere, distance); + } + } + if (tileSphere->_hasSubSpheres()) { + // Compare the distance with all distances to each other spheres + // and test if there are other spheres within the same range. + TileSphere* tmp = tileSphere->_getPreciserSphere(this, distance); + while (tmp != NULL) { + distance = this->computeDistance(tmp, point1, point2); + tmp = tileSphere->_getPreciserSphere(this, distance); + } + } + } + + return distance; +} + +////////////////////////////////////////////////////////////////////////// + +unsigned int TileSphere::getSphereIndex() +{ + ML_TRACE_IN("unsigned int TileSphere::getSphereIndex() "); + + return _sphereIndex; +} + +////////////////////////////////////////////////////////////////////////// + +void TileSphere::getDeFactoSize() +{ + ML_TRACE_IN("void TileSphere::getDeFactoSize()"); + + // Computes the central point of the BB and acquire the farthest + // sub sphere/point of the sub spheres/pointset for the radius + float minX=0, maxX=0, minY=0, maxY=0, minZ=0, maxZ=0; + bool unInit = true; + + unsigned int counter=0; + + if (_hasSubSpheresFlag) { + // Computes the BB of the contained spheres + float buffer=0; + for (counter = 0; counter < _cubicPartition; counter++) { + _tileSpheres[counter].getDeFactoSize(); + // not every sphere has + if (_tileSpheres[counter]._radius != -1) { + if (unInit) { + minX = _tileSpheres[counter]._position[0] - _tileSpheres[counter]._radius; + maxX = _tileSpheres[counter]._position[0] + _tileSpheres[counter]._radius; + minY = _tileSpheres[counter]._position[1] - _tileSpheres[counter]._radius; + maxY = _tileSpheres[counter]._position[1] + _tileSpheres[counter]._radius; + minZ = _tileSpheres[counter]._position[2] - _tileSpheres[counter]._radius; + maxZ = _tileSpheres[counter]._position[2] + _tileSpheres[counter]._radius; + unInit = false; + } else { + buffer = _tileSpheres[counter]._position[0] - _tileSpheres[counter]._radius; + if (minX > buffer) { minX = buffer; } + buffer = _tileSpheres[counter]._position[0] + _tileSpheres[counter]._radius; + if (maxX < buffer) { maxX = buffer; } + buffer = _tileSpheres[counter]._position[1] - _tileSpheres[counter]._radius; + if (minY > buffer) { minY = buffer; } + buffer = _tileSpheres[counter]._position[1] + _tileSpheres[counter]._radius; + if (maxY < buffer) { maxY = buffer; } + buffer = _tileSpheres[counter]._position[2] - _tileSpheres[counter]._radius; + if (minZ > buffer) { minZ = buffer; } + buffer = _tileSpheres[counter]._position[2] + _tileSpheres[counter]._radius; + if (maxZ < buffer) { maxZ = buffer; } + } + } + } + } else { + if (_numEntries != 0) { + unInit = false; + float* pointPos = _subset[0]; + minX = maxX = * pointPos; + minY = maxY = *(pointPos + 1); + minZ = maxZ = *(pointPos + 2); + + for (counter = 1; counter < _numEntries; counter++) { + pointPos = _subset[counter]; + if (minX > *pointPos) { minX = *pointPos; } + if (maxX < *pointPos) { maxX = *pointPos; } + pointPos++; + if (minY > *pointPos) { minY = *pointPos; } + if (maxY < *pointPos) { maxY = *pointPos; } + pointPos++; + if (minZ > *pointPos) { minZ = *pointPos; } + if (maxZ < *pointPos) { maxZ = *pointPos; } + } + } + } + if (!unInit) { + _position[0] = (maxX + minX) * 0.5f; + _position[1] = (maxY + minY) * 0.5f; + _position[2] = (maxZ + minZ) * 0.5f; + if (_hasSubSpheresFlag) { + bool init = true; + float tmpDist=0; + for (counter = 0; counter < _cubicPartition; counter++) { + if (_tileSpheres[counter]._getRadius() != -1) { + if (init) { + _radius = _distance(_position, _tileSpheres[counter]._getPosition()) + _tileSpheres[counter]._getRadius(); + init = false; + } else { + tmpDist = _distance(_position, _tileSpheres[counter]._getPosition()) + _tileSpheres[counter]._getRadius(); + if (tmpDist > _radius){ + _radius = tmpDist; + } + } + } + } + } else { + float tmpDist; + _radius = _distance(_position, _subset[0]); + for (counter = 1; counter < _numEntries; counter++) { + tmpDist = _distance(_position, _subset[counter]); + if (tmpDist > _radius){ + _radius = tmpDist; + } + } + } + } else { + _radius = -1; + } +} + +////////////////////////////////////////////////////////////////////////// + +void TileSphere::getStatistics(int &_treeDepth, int &_usedSpheres, int &_leafSpheres, int &_maxEnt) +{ + ML_TRACE_IN("void TileSphere::getStatistics(int &_treeDepth, int &_usedSpheres, int &_leafSpheres, int &_maxEnt) "); + + int treeDepth = 0, treeDepthTmp = 0; + float** dummy = NULL; + int subsetSize = 0; + + unsigned int counter=0; + + // Has sub spheres + if (_hasSubSpheresFlag) { + for (counter = 0; counter < _cubicPartition; counter++) { + _tileSpheres[counter]._getSubset(dummy, subsetSize); + if (subsetSize != 0 || _tileSpheres[counter]._hasSubSpheres()) { + _tileSpheres[counter].getStatistics(treeDepthTmp, _usedSpheres, _leafSpheres, _maxEnt); + if (treeDepthTmp > treeDepth) { + treeDepth = treeDepthTmp; + } + } + } + } else { + // Has set of points + if (_numEntries > _maxEnt){ _maxEnt = _numEntries; } + _leafSpheres++; + } + + treeDepth++; + _usedSpheres++; + + _treeDepth = treeDepth; +} + +////////////////////////////////////////////////////////////////////////// + +void TileSphere::setBB(float minX, float maxX, float minY, float maxY, float minZ, float maxZ) +{ + ML_TRACE_IN("void TileSphere::setBB(float minX, float maxX, float minY, float maxY, float minZ, float maxZ) "); + + // Assigns a bounding box to the tileSphere. + _minX = minX; + _maxX = maxX; + _minY = minY; + _maxY = maxY; + _minZ = minZ; + _maxZ = maxZ; +} + +////////////////////////////////////////////////////////////////////////// + +void TileSphere::_getBB(float& minX, float& maxX, float& minY, float& maxY, float& minZ, float& maxZ) +{ + ML_TRACE_IN("void TileSphere::_getBB(float& minX, float& maxX, float& minY, float& maxY, float& minZ, float& maxZ) "); + + // Gets the bounding box of the tileSphere. + minX = _minX; + maxX = _maxX; + minY = _minY; + maxY = _maxY; + minZ = _minZ; + maxZ = _maxZ; +} + +////////////////////////////////////////////////////////////////////////// + +void TileSphere::addPoint(float* position) +{ + ML_TRACE_IN("void TileSphere::addPoint(float* position) "); + + // Adds a point into the tile sphere. + float minX=0, maxX=0, minY=0, maxY=0, minZ=0, maxZ=0; + + int counter = 0; + + // If the sphere has sub spheres, add point into the according sub sphere. + if (_hasSubSpheresFlag) { + for (counter = 0; counter < _cubicPartition; counter++) { + _tileSpheres[counter]._getBB(minX, maxX, minY, maxY, minZ, maxZ); + + if ((*(position) >= minX) && + (*(position) <= maxX) && + (*(position + 1) >= minY) && + (*(position + 1) <= maxY) && + (*(position + 2) >= minZ) && + (*(position + 2) <= maxZ)) + { + _tileSpheres[counter].addPoint(position); + } + } + } else { + // If there is no further sub-division, integrate point into subset. + _subset[_numEntries] = position; + _numEntries++; + // If capacity is reached, establish sub spheres and transfer the containing points. + if (_numEntries == static_cast<unsigned int>(_maxEntries)) { + // Establish further sub spheres. + if (_hasSubSpheresFlag == false) { + ML_DELETE_ARR(_tileSpheres); + ML_CHECK_NEW (_tileSpheres, TileSphere[_cubicPartition]); + _hasSubSpheresFlag = true; + } + + int xCounter=0, yCounter=0, zCounter=0; + + float partitionDiv = 1.0f / static_cast<float>(_partition); + + float stepX = (_maxX - _minX) * partitionDiv; + float stepY = (_maxY - _minY) * partitionDiv; + float stepZ = (_maxZ - _minZ) * partitionDiv; + + float newMaxX = 0.0f; + float newMaxY = 0.0f; + float newMaxZ = 0.0f; + + // Constitute BBs for the sub spheres. + for (xCounter = 0; xCounter < _partition; xCounter++) { + for (yCounter = 0; yCounter < _partition; yCounter++) { + for (zCounter = 0; zCounter < _partition; zCounter++) { + _tileSpheres[counter].setParameter(_minimalDistance, _partition, _numEntries, _error); + + // to avoid rounding errors, take the real maximum value at the upper border + newMaxX = (xCounter+1 < _partition) ? (_minX + stepX * xCounter + stepX) : _maxX; + newMaxY = (yCounter+1 < _partition) ? (_minY + stepY * yCounter + stepY) : _maxY; + newMaxZ = (zCounter+1 < _partition) ? (_minZ + stepZ * zCounter + stepZ) : _maxZ; + + _tileSpheres[counter].setBB( + _minX + stepX * xCounter, + newMaxX, + _minY + stepY * yCounter, + newMaxY, + _minZ + stepZ * zCounter, + newMaxZ); + + counter++; + } + } + } + // Transfer points + for (counter = 0; counter < _maxEntries; counter++){ + addPoint(_subset[counter]); + } + } + } +} + +////////////////////////////////////////////////////////////////////////// + +void TileSphere::_initSphere(MinimalDistancePointClouds* minimalDistance, int maxPartition, int numElements, float error) +{ + ML_TRACE_IN("void TileSphere::_initSphere(MinimalDistancePointClouds* minimalDistance, int maxPartition, int numElements, float error) "); + + _numEntries = 0; + _hasSubSpheresFlag = false; + _radius = -1; + _tileSpheres = NULL; + _subset = NULL; + + if (minimalDistance != NULL){ + setParameter(minimalDistance, maxPartition, numElements, error); + } +} + +////////////////////////////////////////////////////////////////////////// + +float TileSphere::_getRadius() +{ + ML_TRACE_IN("float TileSphere::_getRadius()"); + + return _radius; +} + +////////////////////////////////////////////////////////////////////////// + +float* TileSphere::_getPosition() +{ + ML_TRACE_IN("float* TileSphere::_getPosition()"); + + return _position; +} + +////////////////////////////////////////////////////////////////////////// + +void TileSphere::_getSubset(float** &subset, int &size) +{ + ML_TRACE_IN("void TileSphere::_getSubset(float** &subset, int &size)"); + + subset = _subset; + size = _numEntries; +} + +////////////////////////////////////////////////////////////////////////// + +bool TileSphere::_hasSubSpheres() +{ + ML_TRACE_IN("bool TileSphere::_hasSubSpheres()"); + + return _hasSubSpheresFlag; +} + +////////////////////////////////////////////////////////////////////////// + +TileSphere* TileSphere::_getPreciserSphere(TileSphere* referenceSphere, float closestDistance) +{ + ML_TRACE_IN("TileSphere* TileSphere::_getPreciserSphere(TileSphere* referenceSphere, float closestDistance) "); + + bool unInit = true; + bool firstRun = false; + + if (closestDistance == -1){ + firstRun = true; + } + + TileSphere *closestTileSphere = NULL, *tmpSphere = NULL; + float tmpDistance=0; + + unsigned int counter=0; + + // Traverse each sub sphere. + + for (counter = 0; counter < _cubicPartition; counter++) { + + // Only examine further if the sphere contains more details. + if ((_tileSpheres[counter]._getRadius() != -1) && + !_minimalDistance->getHashTable()->existPair(&_tileSpheres[counter], referenceSphere)) + { + if (unInit) { + // Initialize variables once if they are yet uninitialized. + tmpDistance = _distance(&_tileSpheres[counter], referenceSphere); + if (firstRun) { + unInit = false; + closestTileSphere = &_tileSpheres[counter]; + closestDistance = tmpDistance; + } else { + if ((tmpDistance * (1 + _error)) < closestDistance) { + unInit = false; + closestTileSphere = &_tileSpheres[counter]; + closestDistance = tmpDistance; + } + } + } else { + tmpSphere = &_tileSpheres[counter]; + tmpDistance = _distance(tmpSphere, referenceSphere); + if (firstRun) { + if (tmpDistance < closestDistance) { + closestDistance = tmpDistance; + closestTileSphere = tmpSphere; + } + } else { + if ((tmpDistance * (1 + _error)) < closestDistance) { + closestDistance = tmpDistance; + closestTileSphere = tmpSphere; + } + } + } + } + } + + return closestTileSphere; +} + +////////////////////////////////////////////////////////////////////////// + +float TileSphere::_distance(TileSphere* tileSphere1, TileSphere* tileSphere2) +{ + ML_TRACE_IN("float TileSphere::_distance(TileSphere* tileSphere1, TileSphere* tileSphere2)"); + + float radiusSum = tileSphere1->_getRadius() + tileSphere2->_getRadius(); + + float result = _distance(tileSphere1->_getPosition(), tileSphere2->_getPosition()) - radiusSum; + + return (result>=0)?result:0; +} + +////////////////////////////////////////////////////////////////////////// + + +ML_END_NAMESPACE + Added: trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphere.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphere.h (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphere.h 2009-06-24 07:27:57 UTC (rev 140) @@ -0,0 +1,158 @@ +//---------------------------------------------------------------------------------- +// +// Copyright 2001, MeVis gGmbH +// ALL RIGHTS RESERVED +// +// THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY +// INFORMATION OF MEVIS GGMBH. ANY DUPLICATION, MODIFICATION, +// DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY +// PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF MEVIS GGMBH +// +//---------------------------------------------------------------------------------- +//! TileSphere is used in the class \c MinimalDistancePointClouds. +//! It defines a single sub sphere for +//! a fast nearest pair search algorithm described by Sean Quinlan +//! in 'Efficient Distance Computation between Non-Convex Objects'. +//! TileSphere will generate its own sub spheres if necessary. +/*! +// \file TileSphere.h +// \author Christian Tietjen, Olaf Konrad, last changed by $Author: okonrad $ +// \date 11/2005 +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __TileSphere_H +#define __TileSphere_H + +#include "../MLCSOCommunityModulesDefs.h" + +#include <mlVec3.h> +#include "TileSphereHashTable.h" + + +ML_START_NAMESPACE + +// Forward declaration +class MinimalDistancePointClouds; + + +//! TileSphere is used in the class \c MinimalDistancePointClouds. +//! It defines a single sub sphere for +//! a fast nearest pair search algorithm described by Sean Quinlan +//! in 'Efficient Distance Computation between Non-Convex Objects'. +//! TileSphere will generate its own sub spheres if necessary. +class TileSphere +{ + +public: + + //! Default Constructor. + TileSphere(); + //! Constructor with a pointer on the main class and presets for the distance computation. + TileSphere(MinimalDistancePointClouds* minimalDistance, int maxPartition = 2, int numElements = 1103, float error = 0); + //! Destructor. + virtual ~TileSphere(); + + //! Must be called, when TileSphere was instantiated with the default constructor. + void setParameter(MinimalDistancePointClouds* minimalDistance, int maxPartition, int numElements, float error); + + //! Defines which points will be put into this sphere. + void setBB(float minX, float maxX, float minY, float maxY, float minZ, float maxZ); + //! Put a point into this sphere (or one of its sub spheres). + void addPoint(float* position); + //! Computes the optimal bounding sphere. + void getDeFactoSize(); + //! Computes the distance and returns references to the nearest points of both sets. + float computeDistance(TileSphere* tileSphere, float*& point1, float*& point2); + + //! Computes the distance and returns a references to the entryNumbers of the nearest nodes of both sets. + float computeDistance(TileSphere* tileSphere, unsigned int& node1, unsigned int& nodet2); + + + //! Returns the index of the TileSphere. + unsigned int getSphereIndex(); + + //! Returns statistics for debugging purposes. + void getStatistics(int &_treeDepth, int &usedSpheres, int &leafSpheres, int &_maxEnt); + + +private: + + //! Initializes the tile sphere. + void _initSphere(MinimalDistancePointClouds* minimalDistance, int partition, int numElements, float error); + //! Pointer to the main class. + MinimalDistancePointClouds* _minimalDistance; + //! Pointer to the sub spheres. + TileSphere* _tileSpheres; + + //! Stores the sphere index. + unsigned int _sphereIndex; + + //! The maintainable error. + float _error; + + //! Stores whether this sphere has sub spheres. + bool _hasSubSpheresFlag; + //! Stores the number of sub spheres, according to _partition to the power of 3. + unsigned int _partition; + //! The cubic of the partition. + unsigned int _cubicPartition; + + + //! Pointer to the contained points. + float** _subset; + //! Number of contained points. + unsigned int _numEntries; + //! Maximum number of contained points. + int _maxEntries; + + //! Extend of the point set. + float _minX, _maxX, _minY, _maxY, _minZ, _maxZ; + //! Position vector of the tile sphere. + float _position[3]; + //! Radius of the tile sphere. + float _radius; + + //! Returns the BB of the tile sphere. + void _getBB(float& minX, float& maxX, float& minY, float& maxY, float& minZ, float& maxZ); + //! Returns the position vector of the tile sphere. + float* _getPosition(); + //! Returns the radius of the tile sphere. + float _getRadius(); + //! Returns the contained subset and its size. + void _getSubset(float** &subset, int &size); + //! True if this sphere has sub spheres. + bool _hasSubSpheres(); + + //! Returns a preciser sub sphere, which is closest to this sphere. + //! The method will return NULL, if there is no closer sphere then \c distance + //! or if the closest sphere was already visited. + TileSphere* _getPreciserSphere(TileSphere* referenceSphere, float distance); + + //! Returns the euclidean distance between two spheres. It returns not the distance between the + //! both position vectors, but the distance between the sphere hulls. + float _distance(TileSphere* tileSphere1, TileSphere* tileSphere2); + + //! Returns the euclidean distance between two points. + inline float _distance(register float* point1, register float* point2) { + register float d1 = * point1 - * point2; + register float d2 = *(point1 + 1) - *(point2 + 1); + register float d3 = *(point1 + 2) - *(point2 + 2); + return sqrtf(d1*d1 + d2*d2 + d3*d3); + } + + //! Returns the distance between two points without calculating the square root. + inline float _fastDistance(register float* point1, register float* point2) { + register float d1 = * point1 - * point2; + register float d2 = *(point1 + 1) - *(point2 + 1); + register float d3 = *(point1 + 2) - *(point2 + 2); + return (d1*d1 + d2*d2 + d3*d3); + } +}; + + +ML_END_NAMESPACE + +#endif // __TileSphere_H + Added: trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphereHashTable.cpp =================================================================== --- trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphereHashTable.cpp (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphereHashTable.cpp 2009-06-24 07:27:57 UTC (rev 140) @@ -0,0 +1,148 @@ +//---------------------------------------------------------------------------------- +// +// Copyright 2001, MeVis gGmbH +// ALL RIGHTS RESERVED +// +// THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY +// INFORMATION OF MEVIS GGMBH. ANY DUPLICATION, MODIFICATION, +// DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY +// PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF MEVIS GGMBH +// +//---------------------------------------------------------------------------------- +//! TileSphereHashTable is used in the classes \c MinimalDistancePointClouds and \c TileSphere. +//! It defines a single sub sphere for an efficient nearest pair search algorithm. +//! TileSphere will generate its own sub spheres if necessary +/*! +// \file TileSphereHashTable.cpp +// \author Christian Tietjen, Olaf Konrad, last changed by $Author: okonrad $ +// \date 11/2005 +*/ +//---------------------------------------------------------------------------------- + +#include "TileSphereHashTable.h" +#include "TileSphere.h" + + +ML_START_NAMESPACE + + +////////////////////////////////////////////////////////////////////////// + +TileSphereHashTable::TileSphereHashTable() +{ + ML_TRACE_IN("TileSphereHashTable::TileSphereHashTable()"); + + _hashSize = 1103; // prime number + _hashTable = NULL; + ML_CHECK_NEW(_hashTable, std::vector<MLuint32>[_hashSize]); + + _addedPairs = + _hits = + _misses = 0; +} + +////////////////////////////////////////////////////////////////////////// + +TileSphereHashTable::~TileSphereHashTable() +{ + ML_TRACE_IN("TileSphereHashTable::~TileSphereHashTable() "); + + ML_DELETE_ARR(_hashTable); +} + +////////////////////////////////////////////////////////////////////////// + +void TileSphereHashTable::addPair(TileSphere* tileSphere1, TileSphere* tileSphere2) +{ + ML_TRACE_IN("void TileSphereHashTable::addPair(TileSphere* tileSphere1, TileSphere* tileSphere2) "); + + MLuint32 tmpIndex1 = tileSphere1->getSphereIndex(); + MLuint32 tmpIndex2 = tileSphere2->getSphereIndex(); + + // if one of the indices is larger than 16bit, the entry value is no longer unique + if ( (tmpIndex1 <= ML_UINT16_MAX) && (tmpIndex2 <= ML_UINT16_MAX) ){ + MLuint16 index1 = (MLuint16)tileSphere1->getSphereIndex(); + MLuint16 index2 = (MLuint16)tileSphere2->getSphereIndex(); + + int hashKey = 0; + MLuint32 entry = 0; + + // Always smaller index first. + // Concatenate both indices to one entry value. + if (index1 < index2){ + entry = (index1 << 16) | index2; + } else{ + entry = (index2 << 16) | index1; + } + + hashKey = (int)entry % _hashSize; + + _hashTable[hashKey].push_back(entry); + + _addedPairs++; + } + else { + std::cout << "TileSphereHashTable::addPair: one of the indices was greater than ML_UINT16_MAX" << std::endl; + } +} + +////////////////////////////////////////////////////////////////////////// + +bool TileSphereHashTable::existPair(TileSphere* tileSphere1, TileSphere* tileSphere2) +{ + ML_TRACE_IN("bool TileSphereHashTable::existPair(TileSphere* tileSphere1, TileSphere* tileSphere2) "); + + MLuint32 tmpIndex1 = tileSphere1->getSphereIndex(); + MLuint32 tmpIndex2 = tileSphere2->getSphereIndex(); + + // if one of the indices is larger than 16bit, the entry value is no longer unique + if ( (tmpIndex1 <= ML_UINT16_MAX) && (tmpIndex2 <= ML_UINT16_MAX) ) { + MLuint16 index1 = (MLuint16)tileSphere1->getSphereIndex(); + MLuint16 index2 = (MLuint16)tileSphere2->getSphereIndex(); + + int hashKey = 0; + MLuint32 entry = 0; + + // Always smaller index first. + // Concatenate both indices to one entry value. + if (index1 < index2){ + entry = (index1 << 16) | index2; + } else{ + entry = (index2 << 16) | index1; + } + + hashKey = (int)entry % _hashSize; + + std::vector<MLuint32>::iterator i; + + for(i = _hashTable[hashKey].begin(); i != _hashTable[hashKey].end(); i++) { + if (*i == entry) { + _hits++; + return true; + } + } + _misses++; + } + else { + std::cout << "TileSphereHashTable::existPair: one of the indices was greater than ML_UINT16_MAX" << std::endl; + } + + return false; +} + +////////////////////////////////////////////////////////////////////////// + +void TileSphereHashTable::getStatistics(int &addedPairs, int &hits, int &misses) +{ + ML_TRACE_IN("void TileSphereHashTable::getStatistics(int &addedPairs, int &hits, int &misses) "); + + addedPairs = _addedPairs; + hits = _hits; + misses = _misses; +} + +////////////////////////////////////////////////////////////////////////// + + +ML_END_NAMESPACE + Added: trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphereHashTable.h =================================================================== --- trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphereHashTable.h (rev 0) +++ trunk/Community/General/Sources/ML/MLCSOCommunityModules/MinimalDistancePointClouds/TileSphereHashTable.h 2009-06-24 07:27:57 UTC (rev 140) @@ -0,0 +1,74 @@ +//---------------------------------------------------------------------------------- +// +// Copyright 2001, MeVis gGmbH +// ALL RIGHTS RESERVED +// +// THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY +// INFORMATION OF MEVIS GGMBH. ANY DUPLICATION, MODIFICATION, +// DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY +// PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF MEVIS GGMBH +// +//---------------------------------------------------------------------------------- +//! TileSphereHashTable is used in the classes \c MinimalDistancePointClouds and \c TileSphere. +//! The TileSphereHashTable is the underlying data structure for +//! a fast nearest pair search algorithm described by Sean Quinlan +//! in 'Efficient Distance Computation between Non-Convex Objects'. +/*! +// \file TileSphereHashTable.h +// \author Christian Tietjen, Olaf Konrad, last changed by $Author: okonrad $ +// \date 11/2005 +*/ +//---------------------------------------------------------------------------------- + + +#ifndef __TileSphereHashTable_H +#define __TileSphereHashTable_H + +#include "../MLCSOCommunityModulesDefs.h" + + +ML_START_NAMESPACE + +// Forward declaration +class TileSphere; + + +//! TileSphereHashTable is used in the classes \c MinimalDistancePointClouds and \c TileSphere. +//! The TileSphereHashTable is the underlying data structure for +//! a fast nearest pair search algorithm described by Sean Quinlan +//! in 'Efficient Distance Computation between Non-Convex Objects'. +class TileSphereHashTable +{ + +public: + + //! Constructor. + TileSphereHashTable(); + //! Destructor. + virtual ~TileSphereHashTable(); + + //! Adds a pair of spheres into the hash table. + void addPair(TileSphere* tileSphere1, TileSphere* tileSphere2); + //! Checks whether the given pair exists or not. + bool existPair(TileSphere* tileSphere1, TileSphere* tileSphere2); + + //! Hash table statistics. + void getStatistics(int &addedPairs, int &hits, int &misses); + + +private: + + //! Size of the hash table. + int _hashSi... [truncated message content] |
From: <wol...@us...> - 2009-06-23 19:55:28
|
Revision: 123 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=123&view=rev Author: wolfspindler Date: 2009-06-23 12:19:05 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Original package group restored, because package cannot be located under community any more. It must be moved back under its own package group UMD. Modified Paths: -------------- trunk/Community/METK/Package.def Modified: trunk/Community/METK/Package.def =================================================================== --- trunk/Community/METK/Package.def 2009-06-23 11:43:35 UTC (rev 122) +++ trunk/Community/METK/Package.def 2009-06-23 12:19:05 UTC (rev 123) @@ -1,6 +1,6 @@ Package { - packageGroup = "Community" + packageGroup = "UMD" packageName = "METK" owner = "Konrad" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 18:28:18
|
Revision: 120 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=120&view=rev Author: wolfspindler Date: 2009-06-23 11:15:22 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Missing iostream include added. Modified Paths: -------------- trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp Modified: trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp =================================================================== --- trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp 2009-06-23 11:13:40 UTC (rev 119) +++ trunk/Community/METK/Sources/Inventor/SoQHull3D/SoQHull3D.cpp 2009-06-23 11:15:22 UTC (rev 120) @@ -20,6 +20,7 @@ #include "XVLeaveScope.h" #include <list> +#include <iostream> SO_NODE_SOURCE(SoQHull3D) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 18:15:01
|
Revision: 139 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=139&view=rev Author: wolfspindler Date: 2009-06-23 18:15:00 +0000 (Tue, 23 Jun 2009) Log Message: ----------- CHANGE: -Adopted to new location of METK. Modified Paths: -------------- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt Modified: trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt =================================================================== --- trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-23 18:14:05 UTC (rev 138) +++ trunk/Community/General/Documentation/Sources/CommunitySourcesDoxygenConfig.txt 2009-06-23 18:15:00 UTC (rev 139) @@ -1,5 +1,5 @@ PROJECT_NAME = "C++ Reference of MeVisLab Community Sources" -INPUT = $${MLAB_Community_General}/Sources $${MLAB_Community_General}/Modules $${MLAB_Community_METK}/Sources $${MLAB_Community_METK}/Modules +INPUT = $${MLAB_Community_General}/Sources $${MLAB_Community_General}/Modules $${MLAB_UMD_METK}/Sources $${MLAB_UMD_METK}/Modules FILE_PATTERNS = *.h *.hxx *.py *.js ENABLED_SECTIONS = USE_MCS_GLOBAL_DOXYGEN_DOC IGNORE_PREFIX = MLAB This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 18:14:07
|
Revision: 138 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=138&view=rev Author: wolfspindler Date: 2009-06-23 18:14:05 +0000 (Tue, 23 Jun 2009) Log Message: ----------- CHANGE: -Adopted to new location of METK. Modified Paths: -------------- trunk/Community/General/Configuration/Installers/AddOns/MeVisLabCommunityAddOn.mlinstall Modified: trunk/Community/General/Configuration/Installers/AddOns/MeVisLabCommunityAddOn.mlinstall =================================================================== --- trunk/Community/General/Configuration/Installers/AddOns/MeVisLabCommunityAddOn.mlinstall 2009-06-23 15:19:37 UTC (rev 137) +++ trunk/Community/General/Configuration/Installers/AddOns/MeVisLabCommunityAddOn.mlinstall 2009-06-23 18:14:05 UTC (rev 138) @@ -24,7 +24,7 @@ + Modules + Documentation\Publish -SWITCH_PACKAGE Community/METK +SWITCH_PACKAGE UMD/METK + Package.def INCLUDE $(MLAB_MeVis_Foundation)/Configuration/Installers/Shared/LibDll/typicalPackage.mli + Modules This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 15:19:38
|
Revision: 137 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=137&view=rev Author: wolfspindler Date: 2009-06-23 15:19:37 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Missing export symbol definition for non WIN32 platforms added. Modified Paths: -------------- trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpAlgorithms.h trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpCalcVis.h trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpDivSphere.h trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpEdge.h trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpField.h trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpPoint.h trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpTriangle.h Modified: trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpAlgorithms.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpAlgorithms.h 2009-06-23 15:10:50 UTC (rev 136) +++ trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpAlgorithms.h 2009-06-23 15:19:37 UTC (rev 137) @@ -1,10 +1,14 @@ #ifndef VPALGORITHMS__H #define VPALGORITHMS__H -#ifndef VPBASIC_EXPORTS -#define __VPBASIC_IMPORTEXPORT __declspec(dllimport) +#ifdef WIN32 + #ifndef VPBASIC_EXPORTS + #define __VPBASIC_IMPORTEXPORT __declspec(dllimport) + #else + #define __VPBASIC_IMPORTEXPORT __declspec(dllexport) + #endif #else -#define __VPBASIC_IMPORTEXPORT __declspec(dllexport) + #define __VPBASIC_IMPORTEXPORT #endif #include "vpPoint.h" Modified: trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpCalcVis.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpCalcVis.h 2009-06-23 15:10:50 UTC (rev 136) +++ trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpCalcVis.h 2009-06-23 15:19:37 UTC (rev 137) @@ -1,10 +1,14 @@ #ifndef VP_CALC_VIS_H #define VP_CALC_VIS_H -#ifndef VPBASIC_EXPORTS -#define __VPBASIC_IMPORTEXPORT __declspec(dllimport) +#ifdef WIN32 + #ifndef VPBASIC_EXPORTS + #define __VPBASIC_IMPORTEXPORT __declspec(dllimport) + #else + #define __VPBASIC_IMPORTEXPORT __declspec(dllexport) + #endif #else -#define __VPBASIC_IMPORTEXPORT __declspec(dllexport) + #define __VPBASIC_IMPORTEXPORT #endif #pragma warning(disable:4786) Modified: trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpDivSphere.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpDivSphere.h 2009-06-23 15:10:50 UTC (rev 136) +++ trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpDivSphere.h 2009-06-23 15:19:37 UTC (rev 137) @@ -3,10 +3,14 @@ #pragma warning(disable: 4251) -#ifndef VPBASIC_EXPORTS -#define __VPBASIC_IMPORTEXPORT __declspec(dllimport) +#ifdef WIN32 + #ifndef VPBASIC_EXPORTS + #define __VPBASIC_IMPORTEXPORT __declspec(dllimport) + #else + #define __VPBASIC_IMPORTEXPORT __declspec(dllexport) + #endif #else -#define __VPBASIC_IMPORTEXPORT __declspec(dllexport) + #define __VPBASIC_IMPORTEXPORT #endif #include <vector> Modified: trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpEdge.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpEdge.h 2009-06-23 15:10:50 UTC (rev 136) +++ trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpEdge.h 2009-06-23 15:19:37 UTC (rev 137) @@ -1,10 +1,14 @@ #ifndef CVPEDGE_H #define CVPEDGE_H -#ifndef VPBASIC_EXPORTS -#define __VPBASIC_IMPORTEXPORT __declspec(dllimport) +#ifdef WIN32 + #ifndef VPBASIC_EXPORTS + #define __VPBASIC_IMPORTEXPORT __declspec(dllimport) + #else + #define __VPBASIC_IMPORTEXPORT __declspec(dllexport) + #endif #else -#define __VPBASIC_IMPORTEXPORT __declspec(dllexport) + #define __VPBASIC_IMPORTEXPORT #endif class CvpPoint; Modified: trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpField.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpField.h 2009-06-23 15:10:50 UTC (rev 136) +++ trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpField.h 2009-06-23 15:19:37 UTC (rev 137) @@ -11,10 +11,14 @@ aber eines Tage vielleicht, wer weiss. */ -#ifndef VPBASIC_EXPORTS -#define __VPBASIC_IMPORTEXPORT __declspec(dllimport) +#ifdef WIN32 + #ifndef VPBASIC_EXPORTS + #define __VPBASIC_IMPORTEXPORT __declspec(dllimport) + #else + #define __VPBASIC_IMPORTEXPORT __declspec(dllexport) + #endif #else -#define __VPBASIC_IMPORTEXPORT __declspec(dllexport) + #define __VPBASIC_IMPORTEXPORT #endif class __VPBASIC_IMPORTEXPORT CvpField{ Modified: trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpPoint.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpPoint.h 2009-06-23 15:10:50 UTC (rev 136) +++ trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpPoint.h 2009-06-23 15:19:37 UTC (rev 137) @@ -1,10 +1,14 @@ #ifndef CVPPOINT_H #define CVPPOINT_H -#ifndef VPBASIC_EXPORTS -#define __VPBASIC_IMPORTEXPORT __declspec(dllimport) +#ifdef WIN32 + #ifndef VPBASIC_EXPORTS + #define __VPBASIC_IMPORTEXPORT __declspec(dllimport) + #else + #define __VPBASIC_IMPORTEXPORT __declspec(dllexport) + #endif #else -#define __VPBASIC_IMPORTEXPORT __declspec(dllexport) + #define __VPBASIC_IMPORTEXPORT #endif #pragma warning(disable: 4251) Modified: trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpTriangle.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpTriangle.h 2009-06-23 15:10:50 UTC (rev 136) +++ trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpTriangle.h 2009-06-23 15:19:37 UTC (rev 137) @@ -1,10 +1,14 @@ #ifndef CVPTRIANGLE_H #define CVPTRIANGLE_H -#ifndef VPBASIC_EXPORTS -#define __VPBASIC_IMPORTEXPORT __declspec(dllimport) +#ifdef WIN32 + #ifndef VPBASIC_EXPORTS + #define __VPBASIC_IMPORTEXPORT __declspec(dllimport) + #else + #define __VPBASIC_IMPORTEXPORT __declspec(dllexport) + #endif #else -#define __VPBASIC_IMPORTEXPORT __declspec(dllexport) + #define __VPBASIC_IMPORTEXPORT #endif #include <vector> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 15:10:51
|
Revision: 136 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=136&view=rev Author: wolfspindler Date: 2009-06-23 15:10:50 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -MOre precise type passed instead of std::string. Modified Paths: -------------- trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.cpp trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.cpp Modified: trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.cpp =================================================================== --- trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.cpp 2009-06-23 15:05:12 UTC (rev 135) +++ trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.cpp 2009-06-23 15:10:50 UTC (rev 136) @@ -99,7 +99,7 @@ if (status == MSG_INIT && message == messageFld->getStringValue()) { // instance is responsible. Setting INF_STATUS to MSG_PROCESSING statusFld->setStringValue(MSG_PROCESSING); - obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(std::string(MSG_PROCESSING)); //see line 64 for linux test + obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(ML_NAMESPACE::std_string(MSG_PROCESSING)); //see line 64 for linux test //SoDebugError::postInfo("RECEIVER: PROCESSING",""); dataFld->setStringValue(obj[LAY_STATUSEVENTS][INF_DATA]); sendNotification(); Modified: trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.cpp =================================================================== --- trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.cpp 2009-06-23 15:05:12 UTC (rev 135) +++ trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.cpp 2009-06-23 15:10:50 UTC (rev 136) @@ -82,7 +82,7 @@ //std::cout<<"SENDER: _sending=true "<<std::endl; obj[LAY_STATUSEVENTS][INF_MESSAGE] = messageFld->getStringValue(); obj[LAY_STATUSEVENTS][INF_DATA] = dataFld->getStringValue(); - obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(std::string(MSG_INIT)); + obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(ML_NAMESPACE::std_string(MSG_INIT)); //std::cout<<"SENDER: INIT"<<std::endl; sendNotification(); statusFld->setStringValue(MSG_PROCESSING); @@ -90,7 +90,7 @@ doneFld->setBoolValue(false); //done immer erst nach success als letztes setzen } else { statusFld->setStringValue("Nobody's listening."); - obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(std::string(MSG_DONE)); + obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(ML_NAMESPACE::std_string(MSG_DONE)); //std::cout<<"SENDER: DONE NOBODYs LISTENING"<<std::endl; sendNotification(); successFld->setBoolValue(false); @@ -137,7 +137,7 @@ // request for new process received, checking responsibility if (status == MSG_READY && message == messageFld->getStringValue()) { // instance is responsible. Setting INF_STATUS to MSG_DONE - obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(std::string(MSG_DONE)); + obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(ML_NAMESPACE::std_string(MSG_DONE)); //SoDebugError::postInfo("SENDER: DONE",""); sendNotification(); _sending = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 15:05:13
|
Revision: 135 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=135&view=rev Author: wolfspindler Date: 2009-06-23 15:05:12 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Implicitly constructed non const objects passed as arguments are not allowed in ISO c++. Passed as parameters now. Modified Paths: -------------- trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.cpp Modified: trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.cpp =================================================================== --- trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.cpp 2009-06-23 15:00:22 UTC (rev 134) +++ trunk/UMD/METK/Sources/Inventor/UMDSoView2DExtensions/SoTextureMaskedArea.cpp 2009-06-23 15:05:12 UTC (rev 135) @@ -361,10 +361,9 @@ case 0 : //inTexture.getTile3D(textureData, MLuint8Type, 0, 0, 0, tx, ty, tz); if (tc == 3) { - inTexture.getTile6D(textureData, - static_cast<MLDataType>(MLuint8Type), - XVImageSize(0, 0, 0, 0, 0, 0), - XVImageSize(tx, ty, tz, 3, 1, 1)); + XVImageSize p1(0, 0, 0, 0, 0, 0); + XVImageSize p2(tx, ty, tz, 3, 1, 1); + inTexture.getTile6D(textureData, static_cast<MLDataType>(MLuint8Type), p1, p2); } else if (tc == 1) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 15:00:30
|
Revision: 134 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=134&view=rev Author: wolfspindler Date: 2009-06-23 15:00:22 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Parameter ambiguities fixed. Modified Paths: -------------- trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.cpp trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.cpp Modified: trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.cpp =================================================================== --- trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.cpp 2009-06-23 14:44:10 UTC (rev 133) +++ trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgReceiver.cpp 2009-06-23 15:00:22 UTC (rev 134) @@ -99,7 +99,7 @@ if (status == MSG_INIT && message == messageFld->getStringValue()) { // instance is responsible. Setting INF_STATUS to MSG_PROCESSING statusFld->setStringValue(MSG_PROCESSING); - obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(MSG_PROCESSING); //see line 64 for linux test + obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(std::string(MSG_PROCESSING)); //see line 64 for linux test //SoDebugError::postInfo("RECEIVER: PROCESSING",""); dataFld->setStringValue(obj[LAY_STATUSEVENTS][INF_DATA]); sendNotification(); Modified: trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.cpp =================================================================== --- trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.cpp 2009-06-23 14:44:10 UTC (rev 133) +++ trunk/UMD/METK/Sources/ML/METKMessaging/mlMETKMsgSender.cpp 2009-06-23 15:00:22 UTC (rev 134) @@ -82,7 +82,7 @@ //std::cout<<"SENDER: _sending=true "<<std::endl; obj[LAY_STATUSEVENTS][INF_MESSAGE] = messageFld->getStringValue(); obj[LAY_STATUSEVENTS][INF_DATA] = dataFld->getStringValue(); - obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(MSG_INIT); + obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(std::string(MSG_INIT)); //std::cout<<"SENDER: INIT"<<std::endl; sendNotification(); statusFld->setStringValue(MSG_PROCESSING); @@ -90,7 +90,7 @@ doneFld->setBoolValue(false); //done immer erst nach success als letztes setzen } else { statusFld->setStringValue("Nobody's listening."); - obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(MSG_DONE); + obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(std::string(MSG_DONE)); //std::cout<<"SENDER: DONE NOBODYs LISTENING"<<std::endl; sendNotification(); successFld->setBoolValue(false); @@ -137,7 +137,7 @@ // request for new process received, checking responsibility if (status == MSG_READY && message == messageFld->getStringValue()) { // instance is responsible. Setting INF_STATUS to MSG_DONE - obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(MSG_DONE); + obj[LAY_STATUSEVENTS][INF_STATUS] = omMessage(std::string(MSG_DONE)); //SoDebugError::postInfo("SENDER: DONE",""); sendNotification(); _sending = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 14:44:13
|
Revision: 133 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=133&view=rev Author: wolfspindler Date: 2009-06-23 14:44:10 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Lower/Capital letter usage fixed. Modified Paths: -------------- trunk/UMD/METK/Sources/ML/Viewpoint/METKAutoFading/mlMETKAutoFading.h trunk/UMD/METK/Sources/ML/Viewpoint/METKCreateIntraOPDummy/mlMETKCreateIntraOPDummy.h trunk/UMD/METK/Sources/ML/Viewpoint/METKKeystates/METKKeystates.h trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpCalcVis.cpp Property Changed: ---------------- trunk/UMD/METK/Sources/ML/Viewpoint/ Property changes on: trunk/UMD/METK/Sources/ML/Viewpoint ___________________________________________________________________ Added: svn:ignore + Viewpoint.sln Viewpoint.suo Viewpoint.vcproj Viewpoint.vcproj.lapsus-win.wolf.user Modified: trunk/UMD/METK/Sources/ML/Viewpoint/METKAutoFading/mlMETKAutoFading.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/METKAutoFading/mlMETKAutoFading.h 2009-06-23 14:35:23 UTC (rev 132) +++ trunk/UMD/METK/Sources/ML/Viewpoint/METKAutoFading/mlMETKAutoFading.h 2009-06-23 14:44:10 UTC (rev 133) @@ -25,7 +25,7 @@ #include "kBasics.h" #include "kCamera.h" #include "METK.h" -#include "Hashtable.h" +#include "HashTable.h" #include "vpBasic/vpCalcVis.h" #include "vpBasic/vpField.h" Modified: trunk/UMD/METK/Sources/ML/Viewpoint/METKCreateIntraOPDummy/mlMETKCreateIntraOPDummy.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/METKCreateIntraOPDummy/mlMETKCreateIntraOPDummy.h 2009-06-23 14:35:23 UTC (rev 132) +++ trunk/UMD/METK/Sources/ML/Viewpoint/METKCreateIntraOPDummy/mlMETKCreateIntraOPDummy.h 2009-06-23 14:44:10 UTC (rev 133) @@ -23,7 +23,7 @@ #include <ObjMgr/mlObjMgrClient.h> #include "kBasics.h" -#include "Hashtable.h" +#include "HashTable.h" #include "ObjMgrCommunicator.h" ML_START_NAMESPACE Modified: trunk/UMD/METK/Sources/ML/Viewpoint/METKKeystates/METKKeystates.h =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/METKKeystates/METKKeystates.h 2009-06-23 14:35:23 UTC (rev 132) +++ trunk/UMD/METK/Sources/ML/Viewpoint/METKKeystates/METKKeystates.h 2009-06-23 14:44:10 UTC (rev 133) @@ -21,7 +21,7 @@ #include <inttypes.h> #include "kBasics.h" -#include "Hashtable.h" +#include "HashTable.h" #include "kCamera.h" #include "kDebug.h" #include "METK.h" Modified: trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpCalcVis.cpp =================================================================== --- trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpCalcVis.cpp 2009-06-23 14:35:23 UTC (rev 132) +++ trunk/UMD/METK/Sources/ML/Viewpoint/vpBasic/vpCalcVis.cpp 2009-06-23 14:44:10 UTC (rev 133) @@ -84,74 +84,74 @@ bool CvpCalcVis::setData (string cPath) { - string pathVis(cPath); - pathVis.append("camera_data.dat"); - string pathIds(cPath); - pathIds.append("camera_ids.dat"); - - _loadIds(pathIds.c_str()); + string pathVis(cPath); + pathVis.append("camera_data.dat"); + string pathIds(cPath); + pathIds.append("camera_ids.dat"); - FILE * pFile; - pFile = fopen (pathVis.c_str(),"rb"); - fread(&m_iViewportX,sizeof(int),1,pFile); - fread(&m_iViewportY,sizeof(int),1,pFile); - fread(&m_iDiv,sizeof(int),1,pFile); - fread(&m_iNrOfObjects,sizeof(int),1,pFile); - fread(&m_cVersionChar[0],sizeof(char),1,pFile); - fread(&m_cVersionChar[1],sizeof(char),1,pFile); - fread(&m_cVersionChar[2],sizeof(char),1,pFile); + _loadIds(pathIds.c_str()); - if (m_cVersionChar[0]!='V' || m_cVersionChar[1]!='0' || m_cVersionChar[2]!='3') - { - cout << "wrong version of viewpoint data (without silhouette and imageSpaceCenter information) ... please re-generate viewpoint data for this dataset" << endl; - return false; - } + FILE * pFile; + pFile = fopen (pathVis.c_str(),"rb"); + fread(&m_iViewportX,sizeof(int),1,pFile); + fread(&m_iViewportY,sizeof(int),1,pFile); + fread(&m_iDiv,sizeof(int),1,pFile); + fread(&m_iNrOfObjects,sizeof(int),1,pFile); + fread(&m_cVersionChar[0],sizeof(char),1,pFile); + fread(&m_cVersionChar[1],sizeof(char),1,pFile); + fread(&m_cVersionChar[2],sizeof(char),1,pFile); - m_oSphere = new CvpDivSphere( m_fSphereX, m_fSphereY, m_fSphereZ, m_fSphereRadius, m_iDiv, 1 ); - std::cout << "sphere data: x:" << m_fSphereX << " y:" << m_fSphereY << " z:" << m_fSphereZ << " radius:" << m_fSphereRadius << " div:" << m_iDiv << std::endl; - QuickSort(m_oSphere->vPoints); + if (m_cVersionChar[0]!='V' || m_cVersionChar[1]!='0' || m_cVersionChar[2]!='3') + { + cout << "wrong version of viewpoint data (without silhouette and imageSpaceCenter information) ... please re-generate viewpoint data for this dataset" << endl; + return false; + } - m_fResultMatrix = new float**[m_oSphere->vPoints.size()]; - for ( unsigned int ri1 = 0; ri1 < m_oSphere->vPoints.size(); ri1++) - { - m_fResultMatrix[ri1] = new float*[m_iNrOfObjects]; - for (int ri2 = 0; ri2 < m_iNrOfObjects; ri2++) - { - m_fResultMatrix[ri1][ri2] = new float[m_iNrOfObjects+PARAM_COUNT]; - } - } - - unsigned int i = 0; - for ( i = 0; i< m_oSphere->vPoints.size(); i++) - { - for ( int j = 0; j< m_iNrOfObjects;j++) - { - fread(m_fResultMatrix[i][j],sizeof(float),m_iNrOfObjects+PARAM_COUNT,pFile); - } - } - fclose (pFile); + m_oSphere = new CvpDivSphere( m_fSphereX, m_fSphereY, m_fSphereZ, m_fSphereRadius, m_iDiv, 1 ); + std::cout << "sphere data: x:" << m_fSphereX << " y:" << m_fSphereY << " z:" << m_fSphereZ << " radius:" << m_fSphereRadius << " div:" << m_iDiv << std::endl; + QuickSort(m_oSphere->vPoints); - m_oObjectImportance = new CvpField( m_iNrOfObjects ); - m_oObjectStatus = new CvpField( m_iNrOfObjects ); - for ( i = 0; (int)i < m_iNrOfObjects; i++ ) m_oObjectStatus->setValueAt( i, 0 ); + m_fResultMatrix = new float**[m_oSphere->vPoints.size()]; + for ( unsigned int ri1 = 0; ri1 < m_oSphere->vPoints.size(); ri1++) + { + m_fResultMatrix[ri1] = new float*[m_iNrOfObjects]; + for (int ri2 = 0; ri2 < m_iNrOfObjects; ri2++) + { + m_fResultMatrix[ri1][ri2] = new float[m_iNrOfObjects+PARAM_COUNT]; + } + } - m_oVisField = new CvpField(m_oSphere->vPoints.size()); - m_oImpField = new CvpField(m_oSphere->vPoints.size()); - m_oNumField = new CvpField(m_oSphere->vPoints.size()); - m_oEntField = new CvpField(m_oSphere->vPoints.size()); - m_oDisField = new CvpField(m_oSphere->vPoints.size()); - m_oCamField = new CvpField(m_oSphere->vPoints.size()); - m_oVisStaField = new CvpField(m_oSphere->vPoints.size()); - m_oImpStaField = new CvpField(m_oSphere->vPoints.size()); - m_oSilField = new CvpField(m_oSphere->vPoints.size()); - m_oCenterField = new CvpField(m_oSphere->vPoints.size()); - m_oSumField = new CvpField(m_oSphere->vPoints.size()); + unsigned int i = 0; + for ( i = 0; i< m_oSphere->vPoints.size(); i++) + { + for ( int j = 0; j< m_iNrOfObjects;j++) + { + fread(m_fResultMatrix[i][j],sizeof(float),m_iNrOfObjects+PARAM_COUNT,pFile); + } + } + fclose (pFile); - m_oTempField = new CvpField(m_oSphere->vPoints.size()); - m_oTempField2 = new CvpField(m_oSphere->vPoints.size()); + m_oObjectImportance = new CvpField( m_iNrOfObjects ); + m_oObjectStatus = new CvpField( m_iNrOfObjects ); + for ( i = 0; (int)i < m_iNrOfObjects; i++ ) m_oObjectStatus->setValueAt( i, 0 ); - m_flHasData=true; - return m_flHasData; + m_oVisField = new CvpField(m_oSphere->vPoints.size()); + m_oImpField = new CvpField(m_oSphere->vPoints.size()); + m_oNumField = new CvpField(m_oSphere->vPoints.size()); + m_oEntField = new CvpField(m_oSphere->vPoints.size()); + m_oDisField = new CvpField(m_oSphere->vPoints.size()); + m_oCamField = new CvpField(m_oSphere->vPoints.size()); + m_oVisStaField = new CvpField(m_oSphere->vPoints.size()); + m_oImpStaField = new CvpField(m_oSphere->vPoints.size()); + m_oSilField = new CvpField(m_oSphere->vPoints.size()); + m_oCenterField = new CvpField(m_oSphere->vPoints.size()); + m_oSumField = new CvpField(m_oSphere->vPoints.size()); + + m_oTempField = new CvpField(m_oSphere->vPoints.size()); + m_oTempField2 = new CvpField(m_oSphere->vPoints.size()); + + m_flHasData=true; + return m_flHasData; } @@ -178,7 +178,7 @@ int CvpCalcVis::getSphereValues (float &fX,float &fY,float &fZ,float &fR,int &iDiv) const -{ +{ fX = m_fSphereX; fY = m_fSphereY; fZ = m_fSphereZ; @@ -189,7 +189,7 @@ int CvpCalcVis::findObjectId (string sStruct) -{ +{ for ( unsigned int i=0; i<m_vStructures.size(); i++) { if ((*m_vStructures[i]).compare(sStruct) == 0) return i; @@ -198,26 +198,26 @@ } string CvpCalcVis::getObjectName (int iID) -{ +{ if (iID>0 && (unsigned int)iID<m_vStructures.size()) - return (*m_vStructures[iID]); + return (*m_vStructures[iID]); return ""; } string CvpCalcVis::getFocusObject(){ - return getObjectName(m_iCurrentId); + return getObjectName(m_iCurrentId); } int CvpCalcVis::setFocusObject (string cName) -{ +{ m_iCurrentId = findObjectId(cName); if (m_iCurrentId == -1) return 0; return 1; } int CvpCalcVis::setCamPos ( float fX, float fY, float fZ ) -{ +{ m_fCamX = fX; m_fCamY = fY; m_fCamZ = fZ; @@ -225,19 +225,19 @@ } int CvpCalcVis::setCamRange ( float fR ) -{ +{ m_fCamRange = fR; return 1; } int CvpCalcVis::setVisStability ( float fVisSta ) -{ +{ m_fVisSta = fVisSta; return 1; } int CvpCalcVis::setImpStability ( float fImpSta ) -{ +{ m_fImpSta = fImpSta; return 1; } @@ -247,7 +247,7 @@ if (!m_flHasData) return; for (int i=0; i<m_oVisField->getSize(); i++) { - m_oVisField->setValueAt(i, m_fResultMatrix[i][m_iCurrentId][m_iNrOfObjects] / + m_oVisField->setValueAt(i, m_fResultMatrix[i][m_iCurrentId][m_iNrOfObjects] / m_fResultMatrix[i][m_iCurrentId][m_iCurrentId]); } } @@ -262,13 +262,13 @@ for (int j=0; j<m_iNrOfObjects; j++) { fSum+=m_oObjectStatus->getValueAt(j) * - m_oObjectImportance->getValueAt(j)*( m_fResultMatrix[i][m_iCurrentId][j] / - m_fResultMatrix[i][m_iCurrentId][m_iCurrentId] ); + m_oObjectImportance->getValueAt(j)*( m_fResultMatrix[i][m_iCurrentId][j] / + m_fResultMatrix[i][m_iCurrentId][m_iCurrentId] ); } m_oImpField->setValueAt( i, fSum ); } m_oImpField->normalize(); - m_oImpField->invert(); + m_oImpField->invert(); } void CvpCalcVis::_calcNumField (void) @@ -283,12 +283,12 @@ { if ( m_fResultMatrix[i][m_iCurrentId][j] != 0 && j != m_iCurrentId && m_oObjectStatus->getValueAt(j) != 0 ) iSum++; } - fVisibility = 1 - (m_fResultMatrix[i][m_iCurrentId][m_iNrOfObjects] / - m_fResultMatrix[i][m_iCurrentId][m_iCurrentId] ); + fVisibility = 1 - (m_fResultMatrix[i][m_iCurrentId][m_iNrOfObjects] / + m_fResultMatrix[i][m_iCurrentId][m_iCurrentId] ); m_oNumField->setValueAt( i, (float) iSum ); } m_oNumField->normalize(); - m_oNumField->invert(); + m_oNumField->invert(); } void CvpCalcVis::_calcEntField (void) @@ -322,22 +322,22 @@ void CvpCalcVis::_calcPrefRegionField (void) { if (!m_flHasData) return; - m_oRegField->fillWith(0); - if (prefRegionType==PR_VECTOR) - { - //Vector-Region - addVectorRegionToStackField(0,prefRegionVectorX,prefRegionVectorY,prefRegionVectorZ,(float)prefRegionRange); - } - else - { - addPointRegionToStackField(0, - (prefRegionVectorX*m_oSphere->fRadius) + m_oSphere->fMx, - (prefRegionVectorY*m_oSphere->fRadius) + m_oSphere->fMy, - (prefRegionVectorZ*m_oSphere->fRadius) + m_oSphere->fMz, - (float)prefRegionRange); - } - setStackFieldAsRegionField(0); - m_oRegField->normalize(); + m_oRegField->fillWith(0); + if (prefRegionType==PR_VECTOR) + { + //Vector-Region + addVectorRegionToStackField(0,prefRegionVectorX,prefRegionVectorY,prefRegionVectorZ,(float)prefRegionRange); + } + else + { + addPointRegionToStackField(0, + (prefRegionVectorX*m_oSphere->fRadius) + m_oSphere->fMx, + (prefRegionVectorY*m_oSphere->fRadius) + m_oSphere->fMy, + (prefRegionVectorZ*m_oSphere->fRadius) + m_oSphere->fMz, + (float)prefRegionRange); + } + setStackFieldAsRegionField(0); + m_oRegField->normalize(); } void CvpCalcVis::_calcSilField (void) @@ -391,12 +391,12 @@ for (i=0; i<m_oTempField->getSize(); i++) m_oTempField->setValueAt( i, m_oRegField->getValueAt(i) * m_fRegW ); m_oSumField->add((*m_oTempField)); - //PrefReg f\xFCr -zus\xE4tzlich- Restrict + //PrefReg f\xFCr -zus\xE4tzlich- Restrict if (restrictToRegion) { - for (i=0; i<m_oTempField->getSize(); i++) m_oTempField->setValueAt( i, m_oRegField->getValueAt(i)); - m_oTempField->binarize(0.1f); - m_oSumField->multiply((*m_oTempField)); + for (i=0; i<m_oTempField->getSize(); i++) m_oTempField->setValueAt( i, m_oRegField->getValueAt(i)); + m_oTempField->binarize(0.1f); + m_oSumField->multiply((*m_oTempField)); } kDebug::Debug("min1: "+kBasics::FloatToString(m_oSumField->getMinValue()) ,kDebug::DL_HIGH); kDebug::Debug("max1: "+kBasics::FloatToString(m_oSumField->getMaxValue()) ,kDebug::DL_HIGH); @@ -407,7 +407,7 @@ CvpField* CvpCalcVis::getField (int iField) -{ +{ if (iField == VIS_FIELD) return m_oVisField; if (iField == IMP_FIELD) return m_oImpField; if (iField == NUM_FIELD) return m_oNumField; @@ -438,13 +438,13 @@ _calcStaField(IMP_FIELD); _calcSilField(); _calcCenterField(); - _calcPrefRegionField(); + _calcPrefRegionField(); _calcSum(); return 1; } void CvpCalcVis::setStackSize (unsigned int iSize) -{ +{ if (m_oFieldStack != NULL) delete[] m_oFieldStack; m_iStackSize = iSize; m_oFieldStack = new CvpField[iSize]; @@ -479,9 +479,9 @@ if ( iFieldType == REG_FIELD ) m_oFieldStack[iStackPos].setValueAt (i, m_oNumField->getValueAt( i ) ); if ( iFieldType == STA_VIS_FIELD ) m_oFieldStack[iStackPos].setValueAt (i, m_oVisStaField->getValueAt( i ) ); if ( iFieldType == STA_IMP_FIELD ) m_oFieldStack[iStackPos].setValueAt (i, m_oImpStaField->getValueAt( i ) ); - if ( iFieldType == SIL_FIELD ) m_oFieldStack[iStackPos].setValueAt (i, m_oSilField->getValueAt( i ) ); - if ( iFieldType == CENTER_FIELD ) m_oFieldStack[iStackPos].setValueAt (i, m_oCenterField->getValueAt( i ) ); - if ( iFieldType == SUM_FIELD ) m_oFieldStack[iStackPos].setValueAt (i, m_oSumField->getValueAt( i ) ); + if ( iFieldType == SIL_FIELD ) m_oFieldStack[iStackPos].setValueAt (i, m_oSilField->getValueAt( i ) ); + if ( iFieldType == CENTER_FIELD ) m_oFieldStack[iStackPos].setValueAt (i, m_oCenterField->getValueAt( i ) ); + if ( iFieldType == SUM_FIELD ) m_oFieldStack[iStackPos].setValueAt (i, m_oSumField->getValueAt( i ) ); } return 1; } @@ -495,8 +495,8 @@ if ( !m_oFieldStack[iToStackPos].isValid() ) m_oFieldStack[iToStackPos].setSize( m_oSphere->vPoints.size() ); for ( unsigned int i = 0; i < m_oSphere->vPoints.size(); i++ ) { - m_oFieldStack[iToStackPos].setValueAt (i, m_oFieldStack[iFromStackPos].getValueAt( i ) ); - } + m_oFieldStack[iToStackPos].setValueAt (i, m_oFieldStack[iFromStackPos].getValueAt( i ) ); + } return 1; } @@ -515,17 +515,17 @@ } int CvpCalcVis::multiplyStackField ( unsigned int iStackPos1, double factor ) -{ - if ( !m_oFieldStack[iStackPos1].isValid() ) return 0; - if ( !m_flHasData ) return 0; - if ( iStackPos1 >= m_iStackSize ) return 0; - - m_oFieldStack[iStackPos1].multiply( (float)factor ); +{ + if ( !m_oFieldStack[iStackPos1].isValid() ) return 0; + if ( !m_flHasData ) return 0; + if ( iStackPos1 >= m_iStackSize ) return 0; - return 1; + m_oFieldStack[iStackPos1].multiply( (float)factor ); + + return 1; } - + int CvpCalcVis::addStackFields ( unsigned int iStackPos1, unsigned int iStackPos2, unsigned int iStackPosResult ) { if ( iStackPos1 == iStackPos2 && iStackPos2 == iStackPosResult ) return 0; @@ -539,7 +539,7 @@ else m_oFieldStack[iStackPosResult].add( m_oFieldStack[iStackPos2] ); return 1; } - + CvpField* CvpCalcVis::getStackField ( unsigned int iStackPos ) { if ( iStackPos >= m_iStackSize ) return NULL; @@ -547,7 +547,7 @@ } int CvpCalcVis::setStackFieldAsRegionField ( int iStackPos ) -{ +{ if ( !m_flHasData ) return 0; m_oRegField = getStackField ( iStackPos ); return 1; @@ -558,7 +558,7 @@ { if ( !m_flHasData ) return 0; if ( ( unsigned int ) iStackPos >= m_iStackSize ) return 0; - if ( !m_oFieldStack[iStackPos].isValid() ) m_oFieldStack[iStackPos].setSize( m_oSphere->vPoints.size() ); + if ( !m_oFieldStack[iStackPos].isValid() ) m_oFieldStack[iStackPos].setSize( m_oSphere->vPoints.size() ); _calcPointRegion( m_oTempField, fX, fY, fZ, fRange ); m_oFieldStack[iStackPos].merge( (*m_oTempField) ); return 1; @@ -579,7 +579,7 @@ { if ( !m_flHasData ) return 0; if ( ( unsigned int ) iStackPos >= m_iStackSize ) return 0; - if ( !m_oFieldStack[iStackPos].isValid() ) m_oFieldStack[iStackPos].setSize( m_oSphere->vPoints.size() ); + if ( !m_oFieldStack[iStackPos].isValid() ) m_oFieldStack[iStackPos].setSize( m_oSphere->vPoints.size() ); m_oFieldStack[iStackPos].fillWith(0.0); return 1; } @@ -599,8 +599,8 @@ { return m_vStructures; } - + int CvpCalcVis::setImportance ( string sStruct, float fImportance ) { if ( !m_flHasData ) return 0; @@ -621,7 +621,7 @@ } void CvpCalcVis::_scaleNormalizedField (CvpField *oField, float fRange) -{ +{ for (int i=0; i<oField->getSize(); i++) { oField->setValueAt( i, max( oField->getValueAt(i) - ( 1 - fRange ), 0.0f ) ); @@ -630,84 +630,84 @@ } void CvpCalcVis::setApexAngle(int angle){ - _apexAngle=angle; + _apexAngle=angle; } int CvpCalcVis::findNeighborPointDirection(int index,SbVec3f dir, const std::list<int>& visited, SbVec3f newPosition){ - float x,y,z; - getSpherePos(index,x,y,z); - SbVec3f actPos(x,y,z); - _calcPointRegion(m_oTempField,x,y,z,1.0); - _calcPointRegion(m_oTempField2,x,y,z,1.0); - m_oTempField2->binarize(0.95); - //double minang=180.0; - double maxValue=0.0; - int ret=-1; - SbVec3f centerOfSphere(m_fSphereX,m_fSphereY,m_fSphereZ); - for(int i=0;i<m_oTempField->getSize();i++){ - if(std::find(visited.begin(),visited.end(),i)!=visited.end()){ - continue; - } - if(m_oTempField2->getValueAt(i)<=0.0){ - m_oTempField->setValueAt(i,0.0); - }else{ - if(dir.length()>0){ - SbVec3f actPoint; - getSpherePos(i,actPoint[0],actPoint[1],actPoint[2]); - SbVec3f actDir=actPoint - actPos; - if(actDir.length()>0){ - double percentage=actDir.length()/dir.length(); - SbVec3f newDir=actPos+percentage*dir; - SbVec3f centerToPoint=newDir-centerOfSphere; - percentage=m_fSphereRadius/centerToPoint.length(); - SbVec3f pointOnSphere=centerOfSphere+percentage*centerToPoint; - SbVec3f diffDir=pointOnSphere-actPos; - double skalprod=(actDir[0]*diffDir[0]+actDir[1]*diffDir[1]+actDir[2]*diffDir[2])/(actDir.length()*diffDir.length()); - double ang=0.0; - ang=acos(skalprod)/kBasics::PI*180; - if(skalprod==0.0){ - ang=90.0; - } - if(ang<=_apexAngle){ - getStackField(4)->setValueAt(i,0.5); - if(getStackField(1)->getValueAt(i)>maxValue){ - //if(getField(VIS_FIELD)->getValueAt(i)>maxValue){ - // std::cout << "(" << dir[0] << ";" << dir[1] << ";" << dir[2] << ")" << std::endl; - // std::cout << "(" << actDir[0] << ";" << actDir[1] << ";" << actDir[2] << ")" << std::endl; - // std::cout << skalprod << "::" << ang << std::endl; - maxValue=getStackField(1)->getValueAt(i); - //maxValue=getField(VIS_FIELD)->getValueAt(i); - ret=i; - } - } - } - } - } - } - if(ret>=0){ - return ret; - } - m_oTempField->setValueAt(index,0.0); - ret=m_oTempField->getMaxPos(); - if(ret==index){ - //std::cout << m_oTempField->getValueAt(ret); - //std::cout << m_oTempField->toString() << std::endl; - } - return ret; + float x,y,z; + getSpherePos(index,x,y,z); + SbVec3f actPos(x,y,z); + _calcPointRegion(m_oTempField,x,y,z,1.0); + _calcPointRegion(m_oTempField2,x,y,z,1.0); + m_oTempField2->binarize(0.95); + //double minang=180.0; + double maxValue=0.0; + int ret=-1; + SbVec3f centerOfSphere(m_fSphereX,m_fSphereY,m_fSphereZ); + for(int i=0;i<m_oTempField->getSize();i++){ + if(std::find(visited.begin(),visited.end(),i)!=visited.end()){ + continue; + } + if(m_oTempField2->getValueAt(i)<=0.0){ + m_oTempField->setValueAt(i,0.0); + }else{ + if(dir.length()>0){ + SbVec3f actPoint; + getSpherePos(i,actPoint[0],actPoint[1],actPoint[2]); + SbVec3f actDir=actPoint - actPos; + if(actDir.length()>0){ + double percentage=actDir.length()/dir.length(); + SbVec3f newDir=actPos+percentage*dir; + SbVec3f centerToPoint=newDir-centerOfSphere; + percentage=m_fSphereRadius/centerToPoint.length(); + SbVec3f pointOnSphere=centerOfSphere+percentage*centerToPoint; + SbVec3f diffDir=pointOnSphere-actPos; + double skalprod=(actDir[0]*diffDir[0]+actDir[1]*diffDir[1]+actDir[2]*diffDir[2])/(actDir.length()*diffDir.length()); + double ang=0.0; + ang=acos(skalprod)/kBasics::PI*180; + if(skalprod==0.0){ + ang=90.0; + } + if(ang<=_apexAngle){ + getStackField(4)->setValueAt(i,0.5); + if(getStackField(1)->getValueAt(i)>maxValue){ + //if(getField(VIS_FIELD)->getValueAt(i)>maxValue){ + // std::cout << "(" << dir[0] << ";" << dir[1] << ";" << dir[2] << ")" << std::endl; + // std::cout << "(" << actDir[0] << ";" << actDir[1] << ";" << actDir[2] << ")" << std::endl; + // std::cout << skalprod << "::" << ang << std::endl; + maxValue=getStackField(1)->getValueAt(i); + //maxValue=getField(VIS_FIELD)->getValueAt(i); + ret=i; + } + } + } + } + } + } + if(ret>=0){ + return ret; + } + m_oTempField->setValueAt(index,0.0); + ret=m_oTempField->getMaxPos(); + if(ret==index){ + //std::cout << m_oTempField->getValueAt(ret); + //std::cout << m_oTempField->toString() << std::endl; + } + return ret; } //Does this function get the nearest point on the bounding sphere related to a given point in space? int CvpCalcVis::getFieldPos(const float &fX, const float &fY, const float &fZ){ - _calcPointRegion(m_oTempField,fX,fY,fZ,1.0); - return m_oTempField->getMaxPos(); + _calcPointRegion(m_oTempField,fX,fY,fZ,1.0); + return m_oTempField->getMaxPos(); } void CvpCalcVis::getSpherePos(int index, float &fX, float &fY, float &fZ){ - if(index<(int)m_oSphere->vPoints.size()){ - fX = m_oSphere->vPoints[index]->x; - fY = m_oSphere->vPoints[index]->y; - fZ = m_oSphere->vPoints[index]->z; - } + if(index<(int)m_oSphere->vPoints.size()){ + fX = m_oSphere->vPoints[index]->x; + fY = m_oSphere->vPoints[index]->y; + fZ = m_oSphere->vPoints[index]->z; + } } void CvpCalcVis::_calcPointRegion ( CvpField* oField, float fX, float fY, float fZ, float fRange ) { @@ -740,7 +740,7 @@ } oField->normalize(); oField->invert(); - if ( fRange != 1 ) _scaleNormalizedField( oField, fRange ); + if ( fRange != 1 ) _scaleNormalizedField( oField, fRange ); } void CvpCalcVis::_calcStaField (int iField) @@ -751,10 +751,10 @@ int iIndex1, iIndex2, iIndexStart; bool flDiffers; float fStartColor; - + if (iField == VIS_FIELD) { oInField = m_oVisField; fThresh = m_fVisSta; } if (iField == IMP_FIELD) { oInField = m_oImpField; fThresh = m_fImpSta; } - + m_oTempField2->fillWith(0); unsigned int i=0; for (i=0; (int)i < oInField->getSize(); i++) @@ -776,7 +776,7 @@ iIndex2 = m_oSphere->vPoints[i]->getNeighbour(j)->id; if ( m_oTempField->getValueAt(iIndex2) != fStartColor ) { flDiffers = true; break; } } - if (flDiffers) + if (flDiffers) { m_oTempField2->setValueAt(iIndex1,-1.0); } @@ -820,7 +820,7 @@ int CvpCalcVis::setWeight ( int iFieldType, float fValue ) { - if ( !m_flHasData ) return 0; + if ( !m_flHasData ) return 0; if ( iFieldType == VIS_FIELD ) m_fVisW = fValue; if ( iFieldType == IMP_FIELD ) m_fImpW = fValue; if ( iFieldType == NUM_FIELD ) m_fNumW = fValue; @@ -837,7 +837,7 @@ float CvpCalcVis::getWeight ( int iFieldType ) { - if ( !m_flHasData ) return 0; + if ( !m_flHasData ) return 0; if ( iFieldType == VIS_FIELD ) return m_fVisW; if ( iFieldType == IMP_FIELD ) return m_fImpW; if ( iFieldType == NUM_FIELD ) return m_fNumW; @@ -855,27 +855,27 @@ void CvpCalcVis::setPrefRegionVector ( float fX, float fY, float fZ ) { - prefRegionVectorX = fX; - prefRegionVectorY = fY; - prefRegionVectorZ = fZ; - _calcPrefRegionField(); + prefRegionVectorX = fX; + prefRegionVectorY = fY; + prefRegionVectorZ = fZ; + _calcPrefRegionField(); } void CvpCalcVis::setPrefRegionRange ( double value ) { - prefRegionRange = value; - _calcPrefRegionField(); + prefRegionRange = value; + _calcPrefRegionField(); } void CvpCalcVis::setRestrictToRegion ( bool value ) { - restrictToRegion = value; + restrictToRegion = value; } void CvpCalcVis::setPrefRegionType ( PrefRegionTypeEnum value ) { - prefRegionType = value; - _calcPrefRegionField(); + prefRegionType = value; + _calcPrefRegionField(); } @@ -919,17 +919,17 @@ int CvpCalcVis::getMatrixValues ( int iCamID, string sStruct, std::vector<float>* vValues) { - if ( !m_flHasData ) return -1; + if ( !m_flHasData ) return -1; - vValues->clear(); - if (iCamID<0 || (unsigned int)iCamID>=m_oSphere->vPoints.size()) return -1; - int iObjID = findObjectId (sStruct); - if (iObjID==-1) return -1; - for (int k = 0; k<m_iNrOfObjects + 3; k++) - { - vValues->push_back(float(m_fResultMatrix[iCamID][iObjID][k])); - } - return 0; + vValues->clear(); + if (iCamID<0 || (unsigned int)iCamID>=m_oSphere->vPoints.size()) return -1; + int iObjID = findObjectId (sStruct); + if (iObjID==-1) return -1; + for (int k = 0; k<m_iNrOfObjects + 3; k++) + { + vValues->push_back(float(m_fResultMatrix[iCamID][iObjID][k])); + } + return 0; } @@ -956,14 +956,14 @@ fout.open("c:/calcVis.txt",ios::out); fout<<"Spherepoints:"<<endl; fout<<"-------------"<<endl; - + for (i = 0; (unsigned int)i<m_oSphere->vPoints.size(); i++) { fout<<i<<": ("<<m_oSphere->vPoints[i]->x<<","<<m_oSphere->vPoints[i]->y<<","<<m_oSphere->vPoints[i]->z<<") : "<<m_oSphere->vPoints[i]->id<<endl; } fout<<"ResultMatrix:"<<endl; fout<<"-------------"<<endl; - + for (i = 0; (unsigned int)i<m_oSphere->vPoints.size(); i++) { fout<<"Viewpoint: "<<i<<endl; @@ -989,39 +989,39 @@ int CvpCalcVis::getDataViewportX(void) { - return m_iViewportX; + return m_iViewportX; } int CvpCalcVis::getDataViewportY(void) { - return m_iViewportY; + return m_iViewportY; } int CvpCalcVis::getDataNrOfObjects(void) { - return m_iNrOfObjects; + return m_iNrOfObjects; } int CvpCalcVis::getDataDiv(void) { - return m_iDiv; + return m_iDiv; } int CvpCalcVis::getDataCamCount(void) { - if (m_oSphere) - return m_oSphere->vPoints.size(); - return -1; + if (m_oSphere) + return m_oSphere->vPoints.size(); + return -1; } string CvpCalcVis::getDataVersion(void) { - string s; - s+=m_cVersionChar[0]; - s+=m_cVersionChar[1]; - s+=m_cVersionChar[2]; - return s; + string s; + s+=m_cVersionChar[0]; + s+=m_cVersionChar[1]; + s+=m_cVersionChar[2]; + return s; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wol...@us...> - 2009-06-23 14:35:27
|
Revision: 132 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=132&view=rev Author: wolfspindler Date: 2009-06-23 14:35:23 +0000 (Tue, 23 Jun 2009) Log Message: ----------- BUG: -Lower/Capital letter usage in paths fixed. Modified Paths: -------------- trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameList.h trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameObject.h Modified: trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameList.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameList.h 2009-06-23 14:25:33 UTC (rev 131) +++ trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameList.h 2009-06-23 14:35:23 UTC (rev 132) @@ -25,7 +25,7 @@ #include "kScriptCommandObject.h" #include "kScriptFrameEntry.h" #include "HashTable.h" -#include "stdafx.h" +#include "StdAfx.h" using namespace std; Modified: trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameObject.h =================================================================== --- trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameObject.h 2009-06-23 14:25:33 UTC (rev 131) +++ trunk/UMD/METK/Sources/ML/Animation/AnimationParser/kScriptFrameObject.h 2009-06-23 14:35:23 UTC (rev 132) @@ -21,7 +21,7 @@ #include "kBasics.h" #include "HashTable.h" #include "kScriptFrameEntry.h" -#include "stdafx.h" +#include "StdAfx.h" using namespace std; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |