Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::ThreeDOutOpenSceneGraph Class Reference

a class for exporting ThreeDOut objects to OSG scene graphs More...

#include <GLviewer/ThreeDOutOpenSceneGraph.hh>

+ Inheritance diagram for BIAS::ThreeDOutOpenSceneGraph:
+ Collaboration diagram for BIAS::ThreeDOutOpenSceneGraph:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
void Dump ()
 list all internal 3d objects on cout More...
 
void GetBoundingBox (Vector3< double > &min, Vector3< double > &max)
 Get the min and max vector of the smallest bounding box, which is drawn around the added points. More...
 
Vector3< double > GetCenterOfPoints ()
 get center of gravity (mean of structure) More...
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
std::map< unsigned int,
PMatrix3DData > & 
GetMapPMatrices ()
 call by reference accessor for data member mapPMatrices_ JW More...
 
int GetOpenSceneGraph (osg::ref_ptr< osg::Group > &sg, bool exporttextures=false) const
 Get ThreeDOut object as OpenSceneGraph structure. More...
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
void OpenGLOut (const BIAS::RGBAuc &Color)
 draw all entities (with the same color) using OpenGL Includes lines, points, pmatrices etc. More...
 
void OpenGLOut ()
 render all entities (with the same color) using OpenGL Includes lines, points, pmatrices etc. More...
 
void OpenGLOutEllipsoids (const BIAS::RGBAuc &Color)
 draw all ellipsoids with the same color: More...
 
void OpenGLOutEllipsoids ()
 draw all ellipsoids with their own color: More...
 
void OpenGLOutImages (const bool &disableBlending=true)
 draw all image patches using OpenGL More...
 
void OpenGLOutIndexedFaceSets ()
 draw mesh into opengl More...
 
void OpenGLOutLines (const BIAS::RGBAuc &Color)
 draw all lines with the same color: More...
 
void OpenGLOutLines ()
 draw all pmatrices with their own color More...
 
void OpenGLOutPMatrices (const BIAS::RGBAuc &Color)
 draw all pmatrices with the same color: More...
 
void OpenGLOutPMatrices ()
 draw all pmatrices with their own color: More...
 
void OpenGLOutPoints (const BIAS::RGBAuc &Color)
 draw all points with the same color: More...
 
void OpenGLOutPoints ()
 draw all points with their own color: More...
 
void OpenGLOutWCS ()
 display the world coordinate system origin and axes More...
 
int OpenSceneGraphOut (const std::string &filename) const
 save ThreeDOut object as OpenSceneGraph saves an Open Scene Graph and the needed textures More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void RemoveAll ()
 removes all entites Essentially a clear on each entityt container. More...
 
void RemoveAllCamEllipsoids ()
 
void RemoveAllEllipsoids ()
 completely removes all ellipsoids from the internal structures, there is no way to get it back More...
 
void RemoveAllImages ()
 completely removes all images from the internal structures, there is no way to get it back More...
 
void RemoveAllIndexedFaceSets ()
 
void RemoveAllLines ()
 completely removes all lines from the internal structures JW More...
 
void RemoveAllPMatrices ()
 completely removes all images from the internal structures, there is no way to get it back More...
 
void RemoveAllPoints ()
 completely removes all points from the internal structures, there is no way to get them back More...
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void RemoveEllipsoid (const unsigned int &EIndex)
 completely removes the ellipsoid from the internal structures, there is no way to get it back More...
 
void RemoveImage (const unsigned int &EIndex)
 completely removes the image from the internal structures, there is no way to get it back More...
 
void RemoveLine (const unsigned int &LineIndex)
 completely removes the line from the internal structures, there is no way to get it back More...
 
void RemovePMatrix (int index)
 removes the P-matrix index, there is no way to get it back More...
 
void RemovePoint (const unsigned int &PointIndex)
 completely removes the point from the internal structures, there is no way to get it back More...
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void SetImageFileExtension (std::string ext)
 Set the file extension and type of the saved textures. More...
 
void SetParams (const ThreeDOutParameters &params)
 
void SetParamsCameraScale (double cameraScale)
 
void SetParamsCameraStyle (CameraDrawingStyle cameraStyle)
 
void SetParamsDrawCameraEllipse (bool drawEllipse)
 
void SetParamsDrawEllipse (bool drawEllipse)
 
void SetParamsEllipsoidScale (double ellipsoidScale)
 
void SetParamsLineDrawingStyle (const LineDrawingStyle lineStyle)
 
void SetParamsLineWidth (const int lineWidth)
 
void SetParamsPointDrawingStyle (const PointDrawingStyle pointStyle)
 
void SetParamsPointSize (const double pointSize)
 
void SetParamsWCSAxesLength (double WCSAxesLength)
 
void SetWriteViewpoints (const bool &val)
 write VRML viewpoint nodes for some P matrices ? More...
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
 ThreeDOutOpenSceneGraph (const BIAS::ThreeDOutParameters &params=BIAS::ThreeDOutParameters())
 
void Translation (const Vector3< double > &movement)
 transfers the whole scene by this offset More...
 
void UpdateEllipsoid (const unsigned int &EIndex, BIAS::CovMatrix3x3 &cov, BIAS::Vector3< double > &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE)
 
void UpdateEllipsoid (const unsigned int &EIndex, BIAS::CovMatrix3x3 &cov, BIAS::HomgPoint3D &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE)
 
void UpdateLine (const unsigned int &LineIndex, const BIAS::Vector3< double > &Start, const BIAS::Vector3< double > &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
void UpdateLine (const unsigned int &LineIndex, const BIAS::HomgPoint3D &Start, const BIAS::HomgPoint3D &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
void UpdatePMatrix (const unsigned int &PIndex, BIAS::PMatrix &P, const unsigned int &width, const unsigned int &height, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE, const double &dScale=DEF_P_SCALE)
 
void UpdatePMatrixColor (const unsigned int &PIndex, const BIAS::RGBAuc &Color)
 
void UpdatePoint (const unsigned int &PointIndex, const BIAS::Vector3< double > &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
void UpdatePoint (const unsigned int &PointIndex, const BIAS::HomgPoint3D &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
void UpdatePointColor (const unsigned int &PointIndex, const BIAS::RGBAuc &Color)
 
int VRMLOut (const std::string &sFilename)
 flush all 3d objects to a vrml file with name sFilename, this is the function most users would call More...
 
int VRMLOut (const std::string &sFilename, const BIAS::RGBAuc &Color)
 flush all 3d objects to a vrml file with name sFilename, use Color as the color for all elements More...
 
int VRMLOutEllipsoids (std::ostream &vrml, const BIAS::RGBAuc &Color)
 only write (previously stored) ellipsoids to an open vrml file, override their individual colors with Color More...
 
int VRMLOutEllipsoids (std::ostream &vrml)
 only write (previously stored) ellipsoids into an open vrml file More...
 
int VRMLOutImages (std::ostream &VRMLFile)
 only write (previously stored) images into an open vrml file More...
 
int VRMLOutIndexedFaceSets (std::ostream &VRMLFile)
 only write (previously stored) face sets into an open vrml file Will include texture into VRML as PixelTexture node. More...
 
int VRMLOutLines (std::ostream &vrml, const BIAS::RGBAuc &Color)
 only write (previously stored) lines into an open vrml file, override their individual colors with Color More...
 
int VRMLOutLines (std::ostream &vrml)
 only write (previously stored) points into an open vrml file More...
 
int VRMLOutPMatrices (std::ostream &vrml, const BIAS::RGBAuc &Color)
 only write (previously stored) cameras into an open vrml file, override their individual colors with Color More...
 
int VRMLOutPMatrices (std::ostream &vrml)
 only write (previously stored) cameras into an open vrml file More...
 
int VRMLOutPMatricesRoutine (std::ostream &VRMLFile, const PMatrix3DData *it, double r=255.0, double g=255.0, double b=255.0, double transparency=0.0, bool CenterAsSphere=false)
 only write camera into an open vrml file More...
 
int VRMLOutPoints (std::ostream &vrml, const BIAS::RGBAuc &Color)
 only write (previously stored) points into an open vrml file, override their individual colors with Color More...
 
int VRMLOutPoints (std::ostream &vrml)
 only write (previously stored) points into an open vrml file More...
 
int VRMLOutProjection (std::ostream &VRMLFile)
 only write previously stored projection objects into opened vrml file. More...
 
int VRMLOutProjectionView (std::ostream &VRMLFile)
 only write previously stored projectionview objects into opened vrml file. More...
 
void VRMLOutWCS (std::ostream &vrml)
 write world coordinate system origin and axes More...
 
int VRMLOutWriteHeader (std::ostream &vrml)
 write the VRML 2.0 header into an open file More...
 
void VRMLOutWriteNavigationInfo (std::ostream &vrml)
 write VRML 2.0 navigation info node More...
 
void VRMLOutWriteViewpoint (std::ostream &vrml)
 write VRMl 2.0 viewpoint that can selecetd in vrml viewer More...
 
virtual int WriteToFile (const std::string &filename)
 Generic write method (wrapper for OpenSceneGraphOut). More...
 
virtual ~ThreeDOutOpenSceneGraph ()
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 
static double VRMLtransparency (const unsigned char alpha)
 get alpha opacity value as VRML transparency helper mapping, usually transparency = (1-alpha) More...
 
static double VRMLtransparency (const BIAS::Vector4< unsigned char > &vRgba)
 get alpha opacity component as VRML transparency g More...
 

Public Attributes

bool visualize_viewports
 

Protected Member Functions

void AddOSGEllipsoids_ (osg::ref_ptr< osg::Group > &rootNode, bool camEllipsoids=false) const
 
void AddOSGImage_ (osg::ref_ptr< osg::Group > &Rootnode, bool exportTextures, std::string graphfilename) const
 
osg::Node * AddOSGIndexedFaceSets_ (bool exporttextures, std::string graphfilename) const
 create one transform (IndexedFaceSets), add another transform for each indexed face set, then convert all indexed face-set data from ThreeDOut More...
 
void AddOSGLines_ (osg::ref_ptr< osg::Group > &Rootnode) const
 
void AddOSGPMatrix_ (osg::ref_ptr< osg::Group > &rootNode) const
 
void AddOSGPoints_ (osg::ref_ptr< osg::Group > &Rootnode) const
 
void AddOSGTexts_ (osg::ref_ptr< osg::Group > &Rootnode) const
 
long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 
void CoordinateSystem (std::ostream &VRMLFile, double selectionRadius, double r, double g, double b, double axeslength, double scale=1.0, const std::string &name="")
 Write a projection of a camera in COORDINATE-style into VRML. More...
 
std::string CorrectDefString_ (const std::string &defstring)
 replace invalid characters in def string and return corrected More...
 
void DrawSphere_ (double radius, int lats, int longs)
 
std::string GenerateFilename_ (std::string graphfilename, std::string subname, unsigned int texnumber) const
 
int GetSceneGraph_ (osg::ref_ptr< osg::Group > &sg, bool exporttextures, const std::string &filename) const
 
void OpenGLOutPMatrices_ (const BIAS::RGBAuc &Color, bool UseOneColor)
 
void PaintCone (std::ostream &VRMLFile, double selectionRadius, double r, double g, double b, double transparency, double angle, double scale=1.0, const std::string &name="")
 Write a parameterized cone into VRMLFile. More...
 
void PaintPyramid (std::ostream &VRMLFile, double selectionRadius, double r, double g, double b, double transparency, double angle, double ratio=4.0/3.0, double scale=1.0, const std::string &name="", bool paint_lines=false)
 Write a parameterized pyramid into VRMLFile. More...
 
void VRMLOutEllipsoid_ (std::ostream &vrml, Ellipsoid3DData &E, const BIAS::RGBAuc &Color)
 
int VRMLOutPMatricesAsArrows_ (std::ostream &vrml, const BIAS::RGBAuc &Color)
 this is an optimized strategy to avoid hundred of shape nodes More...
 
int VRMLOutPMatricesAsMesh_ (std::ostream &vrml, const BIAS::RGBAuc &Color)
 
int VRMLOutPointsAsBoxes_ (std::ostream &VRMLFile)
 
int VRMLOutPointsAsPointSet_ (std::ostream &VRMLFile)
 
int VRMLOutPointsAsSpheres_ (std::ostream &VRMLFile)
 
void VRMLOutViewPortConical (std::ostream &VRMLFile, double selectionRadius, double r, double g, double b, double angle, double scale, const std::string &name, bool solid=false)
 Write a projection of a NON-PERSPECTIVE camera into VRML. More...
 
void VRMLOutViewPortPyramidal (std::ostream &VRMLFile, double selectionRadius, double r, double g, double b, double angle, double ratio, double scale, const std::string &name, bool solid=false)
 Write a projection of a PERSPECTIVE camera into VRML. More...
 

Protected Attributes

long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 
bool glewInitialized_
 
std::map< unsigned int,
Ellipsoid3DData
mapCamEllipsoids_
 map of all ellipsoid structures More...
 
std::map< unsigned int,
Ellipsoid3DData
mapEllipsoids_
 map of all ellipsoid structures More...
 
std::map< unsigned int,
Image3DData
mapImages_
 map of all image structures More...
 
std::map< unsigned int,
IndexedFaceSet
mapIndexedFaceSet_
 
std::map< unsigned int,
Line3DData
mapLines_
 map of all line structures More...
 
std::map< unsigned int,
PMatrix3DData
mapPMatrices_
 the cameras are saved in a vector for efficiency reasons More...
 
std::map< unsigned int,
Point3DData
mapPoints_
 map of all point structures More...
 
std::map< unsigned int,
Projection3DData
mapProjection3D_
 
std::map< unsigned int,
Text3DData
mapTexts_
 map of all point structures More...
 
std::vector< double > meanDraw
 
unsigned int NextCamEllipsoidIndex_
 counter for the next ellipsoid index, gaps are not reused by now More...
 
unsigned int NextEllipsoidIndex_
 counter for the next ellipsoid index, gaps are not reused by now More...
 
unsigned int NextImageIndex_
 counter for the next index, gaps (due to delete) are not reused by now More...
 
unsigned int NextIndexedFaceSetIndex_
 
unsigned int NextLineIndex_
 counter for the next line index, gaps (due to delete) arent reused More...
 
unsigned int NextPIndex_
 counter for the next index, gaps (due to delete) are not reused by now More...
 
unsigned int NextPointIndex_
 counter for the next index, gaps (due to delete) are not reused by now More...
 
unsigned int NextProjection3DIndex_
 
unsigned int NextTextIndex_
 counter for the next index, gaps (due to delete) are not reused by now More...
 
ThreeDOutParameters Params_
 holds the params set by constructor or SetParams More...
 
std::string TexImgExtension_
 
bool WriteViewpoints_
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Functions to add geometric objects for output

save the return value to update or delete the objects later

unsigned int AddPoint (const BIAS::Vector3< double > &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
unsigned int AddPoint (const BIAS::HomgPoint3D &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
unsigned int AddText (const std::string &thetext, const BIAS::Vector3< double > &position, const BIAS::Quaternion< double > &direction=BIAS::Quaternion< double >(0.0, 0.0, 0.0, 0.0), const double &thesize=-12.0, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
unsigned int AddLine (const BIAS::Vector3< double > &Start, const BIAS::Vector3< double > &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
unsigned int AddLine (const BIAS::HomgPoint3D &Start, const BIAS::HomgPoint3D &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
unsigned int AddEllipsoid (BIAS::CovMatrix3x3 &cov, const BIAS::Vector3< double > &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE, const bool cameraCov=false)
 
unsigned int AddEllipsoid (BIAS::CovMatrix3x3 &cov, const BIAS::HomgPoint3D &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE, const bool cameraCov=false)
 
void AddPlane (const HomgPlane3D &plane, const RGBAuc &colour=RGBAuc_WHITE_SEMI, const double size=1.0, const Vector3< double > &translation=Vector3< double >(0.0, 0.0, 0.0), const bool wireframe=true)
 Adds the given plane to the scene, visualising it with lines or with a colored quad. More...
 
unsigned int AddPMatrix (BIAS::PMatrix &P, const unsigned int &width, const unsigned int &height, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE, const double &dScale=DEF_P_SCALE, const std::string &name="")
 decompose P and add to internal data structures. More...
 
unsigned int AddPMatrix (BIAS::Matrix3x4< double > &M, const unsigned int &width, const unsigned int &height, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE, const double &dScale=DEF_P_SCALE, const std::string &name="")
 interface for the above More...
 
unsigned int AddImage (const Vector3< double > &UL, const Vector3< double > &UR, const Vector3< double > &LL, unsigned int Width, unsigned int Height, unsigned char *pData, unsigned int channels=1, const std::string &name="", bool billboard=false)
 add a small rectangular image patch spanned by three 3d points small means really small (only a few pixels), the patch is approximated in a very complicated way in vrml to allow for inline data More...
 
unsigned int AddImage (const Vector3< double > &UL, const Vector3< double > &UR, const Vector3< double > &LL, const Vector3< double > &LR, unsigned int Width, unsigned int Height, unsigned char *pData, unsigned int channels=1, const std::string &name="", bool billboard=false)
 add a small image patch spanned by four 3d points small means really small (only a few pixels), the patch is approximated in a very complicated way in vrml to allow for inline data More...
 
unsigned int AddTriangleMesh (const TriangleMesh &mesh, const std::string &name="", const std::string &textureOutputName="", bool writeOutTexture=true, bool calcNormals=false)
 Adds triangle mesh as IndexedFaceSet to ThreeDOut mem. More...
 
unsigned int AddProjection (const Projection &p, const RGBAuc &colorSelection=RGBAuc_WHITE_OPAQUE, const double radius=0.1, const double scale=1.0, const std::string &identifier="", const int camera_type=-1)
 Add a projection object to ThreeDOut mem. More...
 
unsigned int AddProjection (const Projection &p, const std::string &identifier)
 interface for above More...
 
unsigned int AddPose (const PoseParametrization &p, const RGBAuc &colorSelection=RGBAuc_WHITE_OPAQUE, const double radius=0.1, const double scale=1.0, const int camera_type=-1)
 
static void ComputePlaneCorners (const HomgPlane3D &plane, const double size, std::vector< Vector3< double > > &corners)
 Helper function computing the corners of a 3D plane. More...
 

Detailed Description

a class for exporting ThreeDOut objects to OSG scene graphs

Author
Grauel 10/2007

Definition at line 25 of file ThreeDOutOpenSceneGraph.hh.

Constructor & Destructor Documentation

ThreeDOutOpenSceneGraph::ThreeDOutOpenSceneGraph ( const BIAS::ThreeDOutParameters params = BIAS::ThreeDOutParameters())

Definition at line 45 of file ThreeDOutOpenSceneGraph.cpp.

References BIAS::Debug::NewDebugLevel(), and TexImgExtension_.

ThreeDOutOpenSceneGraph::~ThreeDOutOpenSceneGraph ( )
virtual

Definition at line 53 of file ThreeDOutOpenSceneGraph.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

unsigned int ThreeDOut::AddEllipsoid ( BIAS::CovMatrix3x3 cov,
const BIAS::Vector3< double > &  C,
const BIAS::RGBAuc Color = RGBAuc_WHITE_SEMI,
const double &  dConfidenceRegionScale = DEF_P_SCALE,
const bool  cameraCov = false 
)
inherited
unsigned int ThreeDOut::AddEllipsoid ( BIAS::CovMatrix3x3 cov,
const BIAS::HomgPoint3D C,
const BIAS::RGBAuc Color = RGBAuc_WHITE_SEMI,
const double &  dConfidenceRegionScale = DEF_P_SCALE,
const bool  cameraCov = false 
)
inherited
Parameters
dConfidenceRegionScalesee Quadric3D.hh for the relationship between enlarging the standard confidence region and the probability that a measurement will be inside that region, 1.0 means sigma

Definition at line 823 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::AddEllipsoid(), and BIAS::HomgPoint3D::IsHomogenized().

unsigned int BIAS::ThreeDOut::AddImage ( const Vector3< double > &  UL,
const Vector3< double > &  UR,
const Vector3< double > &  LL,
unsigned int  Width,
unsigned int  Height,
unsigned char *  pData,
unsigned int  channels = 1,
const std::string &  name = "",
bool  billboard = false 
)
inlineinherited

add a small rectangular image patch spanned by three 3d points small means really small (only a few pixels), the patch is approximated in a very complicated way in vrml to allow for inline data

Parameters
channelsnumber of channels: 1=grey, 3=rgb
Author
koeser 09/2004
Examples:
ExampleThreeDOutVRML.cpp.

Definition at line 512 of file ThreeDOut.hh.

unsigned int ThreeDOut::AddImage ( const Vector3< double > &  UL,
const Vector3< double > &  UR,
const Vector3< double > &  LL,
const Vector3< double > &  LR,
unsigned int  Width,
unsigned int  Height,
unsigned char *  pData,
unsigned int  channels = 1,
const std::string &  name = "",
bool  billboard = false 
)
inherited

add a small image patch spanned by four 3d points small means really small (only a few pixels), the patch is approximated in a very complicated way in vrml to allow for inline data

Parameters
channelsnumber of channels: 1=grey, 3=rgb
Author
koeser 09/2005

Definition at line 963 of file ThreeDOut.cpp.

References BIAS::Image3DData::BillBoard, BIAS::ThreeDOut::CorrectDefString_(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::Image3DData::ImageData, BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image3DData::LL, BIAS::Image3DData::LR, BIAS::ThreeDOut::mapImages_, BIAS::Image3DData::name, BIAS::ThreeDOut::NextImageIndex_, BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SetROI(), BIAS::Image3DData::UL, and BIAS::Image3DData::UR.

unsigned int ThreeDOut::AddLine ( const BIAS::Vector3< double > &  Start,
const BIAS::Vector3< double > &  End,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
inherited
unsigned int ThreeDOut::AddLine ( const BIAS::HomgPoint3D Start,
const BIAS::HomgPoint3D End,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
inherited
Returns
index value to change the line later
Parameters
StartStart point of line
EndEnd point of line

Definition at line 769 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::AddLine(), and BIAS::HomgPoint3D::IsHomogenized().

void ThreeDOutOpenSceneGraph::AddOSGEllipsoids_ ( osg::ref_ptr< osg::Group > &  rootNode,
bool  camEllipsoids = false 
) const
protected
void ThreeDOutOpenSceneGraph::AddOSGImage_ ( osg::ref_ptr< osg::Group > &  Rootnode,
bool  exportTextures,
std::string  graphfilename 
) const
protected
osg::Node * ThreeDOutOpenSceneGraph::AddOSGIndexedFaceSets_ ( bool  exporttextures,
std::string  graphfilename 
) const
protected

create one transform (IndexedFaceSets), add another transform for each indexed face set, then convert all indexed face-set data from ThreeDOut

Definition at line 145 of file ThreeDOutOpenSceneGraph.cpp.

References BIAS::OpenSceneGraphHelper::BIASimageToOSGimage(), GenerateFilename_(), and BIAS::ThreeDOut::mapIndexedFaceSet_.

Referenced by GetSceneGraph_().

void ThreeDOutOpenSceneGraph::AddOSGLines_ ( osg::ref_ptr< osg::Group > &  Rootnode) const
protected
void ThreeDOutOpenSceneGraph::AddOSGPMatrix_ ( osg::ref_ptr< osg::Group > &  rootNode) const
protected
void ThreeDOutOpenSceneGraph::AddOSGPoints_ ( osg::ref_ptr< osg::Group > &  Rootnode) const
protected
void ThreeDOutOpenSceneGraph::AddOSGTexts_ ( osg::ref_ptr< osg::Group > &  Rootnode) const
protected

Definition at line 894 of file ThreeDOutOpenSceneGraph.cpp.

References BIAS::ThreeDOut::mapTexts_.

Referenced by GetSceneGraph_().

void ThreeDOut::AddPlane ( const HomgPlane3D plane,
const RGBAuc colour = RGBAuc_WHITE_SEMI,
const double  size = 1.0,
const Vector3< double > &  translation = Vector3<double>(0.0, 0.0, 0.0),
const bool  wireframe = true 
)
inherited

Adds the given plane to the scene, visualising it with lines or with a colored quad.

Note
The translation vector may render the plane's distance to the center of origin inconsistent. You must compute a proper translation vector that is located on the plane by yourself, e.g. by using HomgPlane3D::ProjectPoint().
Parameters
planethe plane to add
colourthe colour used for drawing
sizeedge length of the plane
translationthe lines are moved by this vector
wireframespecifies if plane should be displayed with lines or solid
Author
rwulff
Date
09/2011

Definition at line 837 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::AddLine(), BIAS::ThreeDOut::AddTriangleMesh(), BIAS::ThreeDOut::ComputePlaneCorners(), BIAS::HomgPlane3D::GetNormalVector(), and BIAS::TriangleMesh::SetMesh().

unsigned int ThreeDOut::AddPMatrix ( BIAS::PMatrix P,
const unsigned int &  width,
const unsigned int &  height,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE,
const double &  dScale = DEF_P_SCALE,
const std::string &  name = "" 
)
inherited
unsigned int ThreeDOut::AddPMatrix ( BIAS::Matrix3x4< double > &  M,
const unsigned int &  width,
const unsigned int &  height,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE,
const double &  dScale = DEF_P_SCALE,
const std::string &  name = "" 
)
inherited

interface for the above

Author
Jan Woetzel

Definition at line 1012 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::AddPMatrix().

unsigned int ThreeDOut::AddPoint ( const BIAS::Vector3< double > &  v,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
inherited
unsigned int ThreeDOut::AddPoint ( const BIAS::HomgPoint3D v,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
inherited
Returns
index value to change the point later
Parameters
vpoint coordinates

Definition at line 729 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::AddPoint(), and BIAS::HomgPoint3D::IsHomogenized().

unsigned int ThreeDOut::AddPose ( const PoseParametrization p,
const RGBAuc colorSelection = RGBAuc_WHITE_OPAQUE,
const double  radius = 0.1,
const double  scale = 1.0,
const int  camera_type = -1 
)
inherited
unsigned int ThreeDOut::AddProjection ( const Projection p,
const RGBAuc colorSelection = RGBAuc_WHITE_OPAQUE,
const double  radius = 0.1,
const double  scale = 1.0,
const std::string &  identifier = "",
const int  camera_type = -1 
)
inherited

Add a projection object to ThreeDOut mem.

Parameters
colorSelectioncolor of the small sphere around the center Draws the four cam coordinate axes (A in red, H in Green, V in blue) and a small sphere around the center which is usefull for selection.
    VIEWPORT PART, DUE TO BE IMPLEMENTED

unsigned int wid = 0;
unsigned int hei = 0;

calculate the angle if(camera_type != -1){ calculate the size of an image p.GetParameters()->GetImageSize(wid, hei); HomgPoint2D p1_2D, p2_2D;

cout << "wid: " << wid << ", hei: " << hei << endl;

if(hei==0 && wid==0){ cout << "Unable to calculate size of an img from projection..." << endl; } else{ if(camera_type == 0){ p1_2D[0] = 0; p1_2D[1] = rint(hei/2); p2_2D[0] = rint(wid/2); p2_2D[1] = rint(hei/2); } if(camera_type == 1){ we take a point (wid/4, hei/2) and (wid/2, hei/2), 'cause the angle could be more than 180 degrees p1_2D[0] = rint(wid/4); p1_2D[1] = rint(hei/2); p2_2D[0] = rint(wid/2); p2_2D[1] = rint(hei/2); } HomgPoint3D p1_3D = p.GetParameters()->UnProjectToPoint(p1_2D, 1.0); HomgPoint3D p2_3D = p.GetParameters()->UnProjectToPoint(p2_2D, 1.0);

double dx = p1_3D[0]-p2_3D[0]; double dy = p1_3D[1]-p2_3D[1]; double dz = p1_3D[2]-p2_3D[2];

half of the distance between two 1.0-lentgh-rays from the principal point it's equal to a sin of an alpha/2 for perspective and aplpha/4 for non-perspective cameras, whereas alpha is an cutoffangle of the camera. double dist_div_2 = sqrt(dx*dx+dy*dy+dz*dz)/2;

if(camera_type == 0) data.angle = 2*asin(dist_div_2); if(camera_type == 1) data.angle = 4*asin(dist_div_2); } }

Examples:
ExampleCameraPath2Vrml.cpp, ExampleRectification.cpp, and ExampleVRMLOutProjection.cpp.

Definition at line 1308 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::AddLine(), BIAS::Projection3DData::C, BIAS::Projection3DData::ColorOfSelection, BIAS::CoordinateTransform3D::ConcatenateLocalTransform(), BIAS::CoordinateTransform3D::GetC(), BIAS::Projection::GetC(), BIAS::Projection::GetParameters(), BIAS::ProjectionParametersBase::GetPose(), BIAS::CoordinateTransform3D::GetQ(), BIAS::Projection::GetQ(), BIAS::Projection3DData::identifier, BIAS::ThreeDOut::mapProjection3D_, BIAS::ThreeDOut::NextProjection3DIndex_, BIAS::Projection3DData::radiusSelection, BIAS::Projection3DData::scale, BIAS::Projection3DData::Set(), BIAS::RMatrixBase::SetFromQuaternion(), BIAS::Projection::Size(), and BIAS::Projection3DData::type.

unsigned int BIAS::ThreeDOut::AddProjection ( const Projection p,
const std::string &  identifier 
)
inlineinherited

interface for above

Definition at line 573 of file ThreeDOut.hh.

unsigned int ThreeDOut::AddText ( const std::string &  thetext,
const BIAS::Vector3< double > &  position,
const BIAS::Quaternion< double > &  direction = BIAS::Quaternion<double>(0.0,0.0,0.0,0.0),
const double &  thesize = -12.0,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
inherited
Returns
index value to change the text later
Parameters
positiontext coordinates
orientation3d orientation (screen-aligned if zero)
thetextstring to be visualized in 3d
thesize,:if>0: 3d height of text if<0: 2d height (in pixels) of text

Definition at line 739 of file ThreeDOut.cpp.

References BIAS::Text3DData::Color, BIAS::Text3DData::Direction, BIAS::ThreeDOut::mapTexts_, BIAS::ThreeDOut::NextTextIndex_, BIAS::Text3DData::Position, BIAS::Text3DData::Size, and BIAS::Text3DData::Text.

unsigned int ThreeDOut::AddTriangleMesh ( const TriangleMesh mesh,
const std::string &  name = "",
const std::string &  textureOutputName = "",
bool  writeOutTexture = true,
bool  calcNormals = false 
)
inherited

Adds triangle mesh as IndexedFaceSet to ThreeDOut mem.

Parameters
namedefines node name in vrml - must not contain dots ('.')!
textureOutputNameis telling which name the texture shall have when writing the vrml. If this param is empty (default), the texture is integrated into the vrml as PixelMap.
writeOutTextureif true and the textureOutputName is not "" then the texture is written into textureOutputName, otherwise only the texture name or a PixelMap is integrated into vrml. (default = true)
calcNormals[in],:set whether to calculate normals (e.g. for lighting) or not. Normally normals are only calculated if no texture is present in mesh (default behaviour)
Examples:
ExampleMeshFromImage.cpp, ExampleRectification.cpp, ExampleTriangleMesh.cpp, and ExampleTriangleMeshQuad.cpp.

Definition at line 1104 of file ThreeDOut.cpp.

References BIAS::IndexedFaceSet::bbmax, BIAS::IndexedFaceSet::bbmin, BIAS::IndexedFaceSet::CASize, BIAS::IndexedFaceSet::ColorArray, BIAS::ThreeDOut::CorrectDefString_(), BIAS::Vector3< T >::CrossProduct(), BIAS::Equal(), BIAS::IndexedFaceSet::faceIndices, BIAS::IndexedFaceSet::facetArray, BIAS::IndexedFaceSet::facetIndicesCountArray, BIAS::ImageBase::GetHeight(), BIAS::TriangleMesh::GetNormals(), BIAS::TriangleMesh::GetTexCoords(), BIAS::TriangleMesh::GetTexture(), BIAS::TriangleMesh::GetTriangleIndices(), BIAS::TriangleMesh::GetVertexColors(), BIAS::TriangleMesh::GetVertices(), BIAS::ImageBase::GetWidth(), BIAS::ThreeDOut::mapIndexedFaceSet_, BIAS::IndexedFaceSet::name, BIAS::ThreeDOut::NextIndexedFaceSetIndex_, BIAS::IndexedFaceSet::NormalArray, BIAS::Vector3< T >::NormL2(), BIAS::IndexedFaceSet::NumFacets, BIAS::ImageBase::PowerOfTwoSize(), BIAS::IndexedFaceSet::TASize, BIAS::IndexedFaceSet::texCoordSet, BIAS::IndexedFaceSet::texture, BIAS::IndexedFaceSet::TextureCoordArray, BIAS::IndexedFaceSet::textureName, BIAS::IndexedFaceSet::useColoredVertices, BIAS::IndexedFaceSet::useNormals, BIAS::IndexedFaceSet::useTexture, BIAS::IndexedFaceSet::VASize, BIAS::IndexedFaceSet::VertArray, BIAS::IndexedFaceSet::vertexColorSet, BIAS::IndexedFaceSet::vertexSet, and BIAS::IndexedFaceSet::writeOutTexture.

Referenced by BIAS::ThreeDOut::AddPlane(), BIAS::ImageBlender::BlendImages(), and BIAS::ImageBlenderIncremental::BlendImages().

void ThreeDOut::ComputePlaneCorners ( const HomgPlane3D plane,
const double  size,
std::vector< Vector3< double > > &  corners 
)
staticinherited

Helper function computing the corners of a 3D plane.

Parameters
planethe plane to compute corners for
sizeedge length of the plane
cornersreturns 3D coordinates of plane corners
Author
esquivel
Date
06/2012

Definition at line 877 of file ThreeDOut.cpp.

References BIAS::Vector3< T >::CrossProduct(), BIAS::Matrix3x3< T >::GetInverse(), BIAS::HomgPlane3D::GetNormalVector(), and BIAS::Vector3< T >::ScalarProduct().

Referenced by BIAS::ThreeDOut::AddPlane().

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

void ThreeDOut::CoordinateSystem ( std::ostream &  VRMLFile,
double  selectionRadius,
double  r,
double  g,
double  b,
double  axeslength,
double  scale = 1.0,
const std::string &  name = "" 
)
protectedinherited

Write a projection of a camera in COORDINATE-style into VRML.

Parameters
VRMLFiledestination, writes to an end of the file
scalescale of the projection

VRMLFile<<" geometry Box{ size "<<selectionRadius<<" " <<selectionRadius<<" "<<selectionRadius<<" } "<<std::endl;

Definition at line 599 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::CorrectDefString_().

Referenced by BIAS::ThreeDOut::VRMLOutProjection(), and BIAS::ThreeDOut::VRMLOutWCS().

string ThreeDOut::CorrectDefString_ ( const std::string &  defstring)
protectedinherited
bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

void ThreeDOut::DrawSphere_ ( double  radius,
int  lats,
int  longs 
)
protectedinherited

Definition at line 2502 of file ThreeDOut.cpp.

Referenced by BIAS::ThreeDOut::OpenGLOutPoints().

void ThreeDOut::Dump ( )
inherited
std::string ThreeDOutOpenSceneGraph::GenerateFilename_ ( std::string  graphfilename,
std::string  subname,
unsigned int  texnumber 
) const
protected
void ThreeDOut::GetBoundingBox ( Vector3< double > &  min,
Vector3< double > &  max 
)
inherited

Get the min and max vector of the smallest bounding box, which is drawn around the added points.

uncompleted, doesn't deliver correct results (mostly 0) alpha

Definition at line 3756 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapCamEllipsoids_, BIAS::ThreeDOut::mapEllipsoids_, BIAS::ThreeDOut::mapImages_, BIAS::ThreeDOut::mapIndexedFaceSet_, BIAS::ThreeDOut::mapLines_, BIAS::ThreeDOut::mapPMatrices_, and BIAS::ThreeDOut::mapPoints_.

Vector3< double > ThreeDOut::GetCenterOfPoints ( )
inherited

get center of gravity (mean of structure)

Definition at line 3740 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapPoints_.

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

std::map< unsigned int, PMatrix3DData >& BIAS::ThreeDOut::GetMapPMatrices ( )
inlineinherited

call by reference accessor for data member mapPMatrices_ JW

Definition at line 853 of file ThreeDOut.hh.

int ThreeDOutOpenSceneGraph::GetOpenSceneGraph ( osg::ref_ptr< osg::Group > &  sg,
bool  exporttextures = false 
) const

Get ThreeDOut object as OpenSceneGraph structure.

Parameters
sgan empty ref_ptr after calling GetOpenSceneGraph sg points to the scene graph structure

Definition at line 111 of file ThreeDOutOpenSceneGraph.cpp.

References GetSceneGraph_().

int ThreeDOutOpenSceneGraph::GetSceneGraph_ ( osg::ref_ptr< osg::Group > &  sg,
bool  exporttextures,
const std::string &  filename 
) const
protected
long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
void ThreeDOut::OpenGLOut ( const BIAS::RGBAuc Color)
inherited
void ThreeDOut::OpenGLOut ( )
inherited
void ThreeDOut::OpenGLOutEllipsoids ( const BIAS::RGBAuc Color)
inherited

draw all ellipsoids with the same color:

Definition at line 2330 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::EllipsoidScale, BIAS::Vector4< T >::GetData(), BIAS::ThreeDOut::mapEllipsoids_, and BIAS::ThreeDOut::Params_.

void ThreeDOut::OpenGLOutEllipsoids ( )
inherited

draw all ellipsoids with their own color:

Definition at line 2361 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::EllipsoidScale, BIAS::ThreeDOut::mapEllipsoids_, and BIAS::ThreeDOut::Params_.

Referenced by BIAS::ThreeDOut::OpenGLOut().

void ThreeDOut::OpenGLOutImages ( const bool &  disableBlending = true)
inherited

draw all image patches using OpenGL

Parameters
disableBlendingtrue to glDisbale(GL_BLEND) temporarily
Todo:
: This implementation is very inefficient because it recreates the textures for each rendering pass! JW
Todo:
image interface (rgb<=>grey)

Definition at line 2038 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapImages_.

Referenced by BIAS::ThreeDOut::OpenGLOut().

void ThreeDOut::OpenGLOutIndexedFaceSets ( )
inherited
void ThreeDOut::OpenGLOutLines ( const BIAS::RGBAuc Color)
inherited

draw all lines with the same color:

Definition at line 2292 of file ThreeDOut.cpp.

References BIAS::Vector4< T >::GetData(), BIAS::ThreeDOutParameters::LineWidth, BIAS::ThreeDOut::mapLines_, and BIAS::ThreeDOut::Params_.

void ThreeDOut::OpenGLOutLines ( )
inherited

draw all pmatrices with their own color

Todo:
linedrawingstyle=dashed not implmented

Definition at line 2310 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::LineWidth, BIAS::ThreeDOut::mapLines_, and BIAS::ThreeDOut::Params_.

Referenced by BIAS::ThreeDOut::OpenGLOut().

void ThreeDOut::OpenGLOutPMatrices ( const BIAS::RGBAuc Color)
inherited

draw all pmatrices with the same color:

Definition at line 2028 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::OpenGLOutPMatrices_().

void ThreeDOut::OpenGLOutPMatrices ( )
inherited

draw all pmatrices with their own color:

Definition at line 2032 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::OpenGLOutPMatrices_().

Referenced by BIAS::ThreeDOut::OpenGLOut().

void ThreeDOut::OpenGLOutPMatrices_ ( const BIAS::RGBAuc Color,
bool  UseOneColor 
)
protectedinherited
void ThreeDOut::OpenGLOutPoints ( const BIAS::RGBAuc Color)
inherited
void ThreeDOut::OpenGLOutPoints ( )
inherited
void ThreeDOut::OpenGLOutWCS ( )
inherited

display the world coordinate system origin and axes

Definition at line 1631 of file ThreeDOut.cpp.

References BIAS::DrawTextGL::InitFont(), BIAS::ThreeDOut::Params_, BIAS::DrawTextGL::Print3D(), and BIAS::ThreeDOutParameters::WCSAxesLength.

Referenced by BIAS::ThreeDOut::OpenGLOut().

int ThreeDOutOpenSceneGraph::OpenSceneGraphOut ( const std::string &  filename) const

save ThreeDOut object as OpenSceneGraph saves an Open Scene Graph and the needed textures

Parameters
filenamefilename of scene graph (XXXX.osg or XXXXXXX.ive) OpenScenegraphOut() saves the textures contained in ThreeDOut to disk, since they can't be embedded in .osg-files. the filename will be used as prefix for the texture file names. In case of saving an osg binary format file (.ive) the textures will be included in this file.

Definition at line 57 of file ThreeDOutOpenSceneGraph.cpp.

References GetSceneGraph_(), and BIAS::FileHandling::SplitName().

void ThreeDOut::PaintCone ( std::ostream &  VRMLFile,
double  selectionRadius,
double  r,
double  g,
double  b,
double  transparency,
double  angle,
double  scale = 1.0,
const std::string &  name = "" 
)
protectedinherited

Write a parameterized cone into VRMLFile.

Parameters
VRMLFiledestination, writes to an end of the file
selectionRadiuslength of the side of the cone
transparencytransparency of given (r,g,b)-color
angleangle of the cone
Author
amattal

Definition at line 461 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::CorrectDefString_().

Referenced by BIAS::ThreeDOut::VRMLOutViewPortConical().

void ThreeDOut::PaintPyramid ( std::ostream &  VRMLFile,
double  selectionRadius,
double  r,
double  g,
double  b,
double  transparency,
double  angle,
double  ratio = 4.0/3.0,
double  scale = 1.0,
const std::string &  name = "",
bool  paint_lines = false 
)
protectedinherited

Write a parameterized pyramid into VRMLFile.

Parameters
VRMLFiledestination, writes to an end of the file
selectionRadiuslength of an edge of the pyramid
transparencytransparency of given (r,g,b)-color
angleangle between two opposite faces of pyramid which 3rd edges are width-of-the-projection far from eachother
ratiowidth-of-the-projection/height-of-the-projection
paint_linesredraw 4 edges of the pyramid (looks better)
Author
amattal

Definition at line 306 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::CorrectDefString_().

Referenced by BIAS::ThreeDOut::VRMLOutViewPortPyramidal().

void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

void ThreeDOut::RemoveAll ( )
inherited
void ThreeDOut::RemoveAllCamEllipsoids ( )
inherited

Definition at line 1585 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapCamEllipsoids_.

Referenced by BIAS::ThreeDOut::RemoveAll().

void ThreeDOut::RemoveAllEllipsoids ( )
inherited

completely removes all ellipsoids from the internal structures, there is no way to get it back

Definition at line 1581 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapEllipsoids_.

Referenced by BIAS::ThreeDOut::RemoveAll().

void ThreeDOut::RemoveAllImages ( )
inherited

completely removes all images from the internal structures, there is no way to get it back

Definition at line 1602 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapImages_.

Referenced by BIAS::ThreeDOut::RemoveAll().

void ThreeDOut::RemoveAllIndexedFaceSets ( )
inherited
void ThreeDOut::RemoveAllLines ( )
inherited

completely removes all lines from the internal structures JW

Definition at line 1569 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapLines_.

Referenced by BIAS::ThreeDOut::RemoveAll().

void ThreeDOut::RemoveAllPMatrices ( )
inherited

completely removes all images from the internal structures, there is no way to get it back

Definition at line 1607 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapPMatrices_.

Referenced by BIAS::ThreeDOut::RemoveAll().

void ThreeDOut::RemoveAllPoints ( )
inherited

completely removes all points from the internal structures, there is no way to get them back

Definition at line 1557 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapPoints_.

Referenced by BIAS::ThreeDOut::RemoveAll().

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void ThreeDOut::RemoveEllipsoid ( const unsigned int &  EIndex)
inherited

completely removes the ellipsoid from the internal structures, there is no way to get it back

Definition at line 1574 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapEllipsoids_.

void ThreeDOut::RemoveImage ( const unsigned int &  EIndex)
inherited

completely removes the image from the internal structures, there is no way to get it back

Definition at line 1589 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapImages_.

void ThreeDOut::RemoveLine ( const unsigned int &  LineIndex)
inherited

completely removes the line from the internal structures, there is no way to get it back

Definition at line 1562 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapLines_.

void ThreeDOut::RemovePMatrix ( int  index)
inherited

removes the P-matrix index, there is no way to get it back

Definition at line 1612 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapPMatrices_.

void ThreeDOut::RemovePoint ( const unsigned int &  PointIndex)
inherited

completely removes the point from the internal structures, there is no way to get it back

Definition at line 1550 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapPoints_.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

void BIAS::ThreeDOutOpenSceneGraph::SetImageFileExtension ( std::string  ext)
inline

Set the file extension and type of the saved textures.

Parameters
exta string with no leading point. e.g. "jpeg" if OpenScenegraphOut() is called the textures contained in ThreeDOut are saved to disk. the default type of this textures is "tif". By calling SetImageFileExtension() the file type/extension can be changed.

Definition at line 64 of file ThreeDOutOpenSceneGraph.hh.

void ThreeDOut::SetParams ( const ThreeDOutParameters params)
inherited
Examples:
ExampleCameraPath2Vrml.cpp.

Definition at line 209 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::Params_.

Referenced by BIAS::ThreeDOut::ThreeDOut().

void ThreeDOut::SetParamsCameraScale ( double  cameraScale)
inherited
void ThreeDOut::SetParamsCameraStyle ( CameraDrawingStyle  cameraStyle)
inherited
void ThreeDOut::SetParamsDrawCameraEllipse ( bool  drawEllipse)
inherited
void ThreeDOut::SetParamsDrawEllipse ( bool  drawEllipse)
inherited
void ThreeDOut::SetParamsEllipsoidScale ( double  ellipsoidScale)
inherited
void ThreeDOut::SetParamsLineDrawingStyle ( const LineDrawingStyle  lineStyle)
inherited
void ThreeDOut::SetParamsLineWidth ( const int  lineWidth)
inherited
void ThreeDOut::SetParamsPointDrawingStyle ( const PointDrawingStyle  pointStyle)
inherited
void ThreeDOut::SetParamsPointSize ( const double  pointSize)
inherited
void ThreeDOut::SetParamsWCSAxesLength ( double  WCSAxesLength)
inherited
void ThreeDOut::SetWriteViewpoints ( const bool &  val)
inherited

write VRML viewpoint nodes for some P matrices ?

Author
Jan Woetzel

Definition at line 3878 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::WriteViewpoints_.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

void ThreeDOut::Translation ( const Vector3< double > &  movement)
inherited
void ThreeDOut::UpdateEllipsoid ( const unsigned int &  EIndex,
BIAS::CovMatrix3x3 cov,
BIAS::Vector3< double > &  C,
const BIAS::RGBAuc Color = RGBAuc_WHITE_SEMI,
const double &  dConfidenceRegionScale = DEF_P_SCALE 
)
inherited
void ThreeDOut::UpdateEllipsoid ( const unsigned int &  EIndex,
BIAS::CovMatrix3x3 cov,
BIAS::HomgPoint3D C,
const BIAS::RGBAuc Color = RGBAuc_WHITE_SEMI,
const double &  dConfidenceRegionScale = DEF_P_SCALE 
)
inherited
Parameters
dConfidenceRegionScalesee Quadric3D.hh for the relationship between enlarging the standard confidence region and the probability that a measurement will be inside that region, 1.0 means sigma

Definition at line 1537 of file ThreeDOut.cpp.

References BIAS::HomgPoint3D::IsHomogenized(), and BIAS::ThreeDOut::UpdateEllipsoid().

void ThreeDOut::UpdateLine ( const unsigned int &  LineIndex,
const BIAS::Vector3< double > &  Start,
const BIAS::Vector3< double > &  End,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
inherited
Parameters
LineIndexvalue previously returned by AddLine
StartStart point of line
EndEnd point of line

Definition at line 1475 of file ThreeDOut.cpp.

References BIAS::Line3DData::Color, BIAS::Line3DData::End, BIAS::ThreeDOut::mapLines_, and BIAS::Line3DData::Start.

Referenced by BIAS::ThreeDOut::UpdateLine().

void ThreeDOut::UpdateLine ( const unsigned int &  LineIndex,
const BIAS::HomgPoint3D Start,
const BIAS::HomgPoint3D End,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
inherited
Parameters
LineIndexvalue previously returned by AddLine
StartStart point of line
EndEnd point of line

Definition at line 1489 of file ThreeDOut.cpp.

References BIAS::HomgPoint3D::IsHomogenized(), and BIAS::ThreeDOut::UpdateLine().

void ThreeDOut::UpdatePMatrix ( const unsigned int &  PIndex,
BIAS::PMatrix P,
const unsigned int &  width,
const unsigned int &  height,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE,
const double &  dScale = DEF_P_SCALE 
)
inherited
Parameters
PIndexvalue previously returned by AddPMatrix

Definition at line 1456 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::AddPMatrix(), and BIAS::ThreeDOut::NextPIndex_.

void ThreeDOut::UpdatePMatrixColor ( const unsigned int &  PIndex,
const BIAS::RGBAuc Color 
)
inherited
Parameters
PIndexvalue previously returned by AddPMatrix

Definition at line 1469 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapPMatrices_.

void ThreeDOut::UpdatePoint ( const unsigned int &  PointIndex,
const BIAS::Vector3< double > &  v,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
inherited
Parameters
PointIndexvalue previously returned by AddPoint

Definition at line 1427 of file ThreeDOut.cpp.

References BIAS::Point3DData::Color, BIAS::ThreeDOut::mapPoints_, and BIAS::Point3DData::Point.

Referenced by BIAS::ThreeDOut::UpdatePoint().

void ThreeDOut::UpdatePoint ( const unsigned int &  PointIndex,
const BIAS::HomgPoint3D v,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
inherited
Parameters
PointIndexvalue previously returned by AddPoint

Definition at line 1445 of file ThreeDOut.cpp.

References BIAS::HomgPoint3D::IsHomogenized(), and BIAS::ThreeDOut::UpdatePoint().

void ThreeDOut::UpdatePointColor ( const unsigned int &  PointIndex,
const BIAS::RGBAuc Color 
)
inherited
Parameters
PointIndexvalue previously returned by AddPoint

Definition at line 1439 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapPoints_.

int ThreeDOut::VRMLOut ( const std::string &  sFilename)
inherited
int ThreeDOut::VRMLOut ( const std::string &  sFilename,
const BIAS::RGBAuc Color 
)
inherited
void ThreeDOut::VRMLOutEllipsoid_ ( std::ostream &  vrml,
Ellipsoid3DData E,
const BIAS::RGBAuc Color 
)
protectedinherited
int ThreeDOut::VRMLOutEllipsoids ( std::ostream &  vrml,
const BIAS::RGBAuc Color 
)
inherited

only write (previously stored) ellipsoids to an open vrml file, override their individual colors with Color

Definition at line 3575 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapEllipsoids_, and BIAS::ThreeDOut::VRMLOutEllipsoid_().

Referenced by BIAS::ThreeDOut::VRMLOut().

int ThreeDOut::VRMLOutEllipsoids ( std::ostream &  vrml)
inherited
int ThreeDOut::VRMLOutImages ( std::ostream &  VRMLFile)
inherited

only write (previously stored) images into an open vrml file

Definition at line 3335 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::CorrectDefString_(), BIAS::ThreeDOut::mapImages_, BIAS::Vector3< T >::Normalize(), and BIAS::Vector3< T >::NormL2().

Referenced by BIAS::ThreeDOut::VRMLOut().

int ThreeDOut::VRMLOutIndexedFaceSets ( std::ostream &  VRMLFile)
inherited

only write (previously stored) face sets into an open vrml file Will include texture into VRML as PixelTexture node.

Examples:
ExampleTriangleMesh.cpp.

Definition at line 3203 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::CorrectDefString_(), BIAS::ThreeDOut::mapIndexedFaceSet_, and BIAS::ImageIO::Save().

Referenced by BIAS::ThreeDOut::VRMLOut().

int ThreeDOut::VRMLOutLines ( std::ostream &  vrml,
const BIAS::RGBAuc Color 
)
inherited

only write (previously stored) lines into an open vrml file, override their individual colors with Color

Definition at line 3072 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::LineStyle, BIAS::ThreeDOutParameters::LineWidth, BIAS::ThreeDOut::mapLines_, BIAS::ThreeDOut::Params_, and BIAS::Solid.

Referenced by BIAS::ThreeDOut::VRMLOut().

int ThreeDOut::VRMLOutLines ( std::ostream &  vrml)
inherited
int ThreeDOut::VRMLOutPMatrices ( std::ostream &  vrml,
const BIAS::RGBAuc Color 
)
inherited
int ThreeDOut::VRMLOutPMatrices ( std::ostream &  vrml)
inherited
int ThreeDOut::VRMLOutPMatricesAsArrows_ ( std::ostream &  vrml,
const BIAS::RGBAuc Color 
)
protectedinherited
int ThreeDOut::VRMLOutPMatricesAsMesh_ ( std::ostream &  vrml,
const BIAS::RGBAuc Color 
)
protectedinherited
int ThreeDOut::VRMLOutPMatricesRoutine ( std::ostream &  VRMLFile,
const PMatrix3DData it,
double  r = 255.0,
double  g = 255.0,
double  b = 255.0,
double  transparency = 0.0,
bool  CenterAsSphere = false 
)
inherited
int ThreeDOut::VRMLOutPoints ( std::ostream &  vrml,
const BIAS::RGBAuc Color 
)
inherited

only write (previously stored) points into an open vrml file, override their individual colors with Color

Definition at line 2533 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::mapPoints_.

Referenced by BIAS::ThreeDOut::VRMLOut().

int ThreeDOut::VRMLOutPoints ( std::ostream &  vrml)
inherited
int ThreeDOut::VRMLOutPointsAsBoxes_ ( std::ostream &  VRMLFile)
protectedinherited
int ThreeDOut::VRMLOutPointsAsPointSet_ ( std::ostream &  VRMLFile)
protectedinherited
int ThreeDOut::VRMLOutPointsAsSpheres_ ( std::ostream &  VRMLFile)
protectedinherited
int ThreeDOut::VRMLOutProjection ( std::ostream &  VRMLFile)
inherited

only write previously stored projection objects into opened vrml file.

VIEWPORT PART, DUE TO BE IMPLEMENTED

VIEWPORT PART, DUE TO BE IMPLEMENTED

Definition at line 3108 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::CameraStyle, BIAS::ThreeDOut::CoordinateSystem(), BIAS::ThreeDOut::mapProjection3D_, BIAS::ThreeDOut::Params_, BIAS::PyramidMesh, BIAS::PyramidMeshWithArrow, BIAS::PyramidSolid, BIAS::ThreeDOut::VRMLOutViewPortConical(), and BIAS::ThreeDOut::VRMLOutViewPortPyramidal().

Referenced by BIAS::ThreeDOut::VRMLOut().

int BIAS::ThreeDOut::VRMLOutProjectionView ( std::ostream &  VRMLFile)
inherited

only write previously stored projectionview objects into opened vrml file.

void ThreeDOut::VRMLOutViewPortConical ( std::ostream &  VRMLFile,
double  selectionRadius,
double  r,
double  g,
double  b,
double  angle,
double  scale,
const std::string &  name,
bool  solid = false 
)
protectedinherited

Write a projection of a NON-PERSPECTIVE camera into VRML.

Parameters
VRMLFiledestination, writes to an end of the file
selectionRadiuslength of a side of the cone(s)
anglemaximum angle of the camera-view
scalescale of the projection
solidtrue if Style = PyramidSolid
Author
amattal

Definition at line 564 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::PaintCone().

Referenced by BIAS::ThreeDOut::VRMLOutProjection().

void ThreeDOut::VRMLOutViewPortPyramidal ( std::ostream &  VRMLFile,
double  selectionRadius,
double  r,
double  g,
double  b,
double  angle,
double  ratio,
double  scale,
const std::string &  name,
bool  solid = false 
)
protectedinherited

Write a projection of a PERSPECTIVE camera into VRML.

Parameters
VRMLFiledestination, writes to an end of the file
selectionRadiuslength of an edge of the pyramid(s)
anglemaximum angle of the camera-view
ratiowidth-of-the-projection/height-of-the-projection
scalescale of the projection
solidtrue if Style = PyramidSolid
Author
amattal

Definition at line 530 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::PaintPyramid().

Referenced by BIAS::ThreeDOut::VRMLOutProjection().

void ThreeDOut::VRMLOutWCS ( std::ostream &  vrml)
inherited

write world coordinate system origin and axes

Definition at line 1622 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::CoordinateSystem(), BIAS::ThreeDOut::Params_, and BIAS::ThreeDOutParameters::WCSAxesLength.

Referenced by BIAS::ThreeDOut::VRMLOut().

int ThreeDOut::VRMLOutWriteHeader ( std::ostream &  vrml)
inherited

write the VRML 2.0 header into an open file

Examples:
ExampleTriangleMesh.cpp.

Definition at line 3696 of file ThreeDOut.cpp.

Referenced by BIAS::ThreeDOut::VRMLOut().

void ThreeDOut::VRMLOutWriteNavigationInfo ( std::ostream &  vrml)
inherited

write VRML 2.0 navigation info node

Author
Jan Woetzel

Definition at line 3883 of file ThreeDOut.cpp.

Referenced by BIAS::ThreeDOut::VRMLOutWriteViewpoint().

void ThreeDOut::VRMLOutWriteViewpoint ( std::ostream &  vrml)
inherited
double ThreeDOut::VRMLtransparency ( const unsigned char  alpha)
staticinherited
double ThreeDOut::VRMLtransparency ( const BIAS::Vector4< unsigned char > &  vRgba)
staticinherited

get alpha opacity component as VRML transparency g

Definition at line 3873 of file ThreeDOut.cpp.

References BIAS::ThreeDOut::VRMLtransparency().

virtual int BIAS::ThreeDOutOpenSceneGraph::WriteToFile ( const std::string &  filename)
inlinevirtual

Generic write method (wrapper for OpenSceneGraphOut).

Reimplemented from BIAS::ThreeDOut.

Definition at line 34 of file ThreeDOutOpenSceneGraph.hh.

References BIAS::FileHandling::Extension().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

bool BIAS::ThreeDOut::glewInitialized_
protectedinherited

Definition at line 914 of file ThreeDOut.hh.

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

std::map<unsigned int, Ellipsoid3DData> BIAS::ThreeDOut::mapCamEllipsoids_
protectedinherited
std::map<unsigned int, Ellipsoid3DData> BIAS::ThreeDOut::mapEllipsoids_
protectedinherited
std::map<unsigned int, Image3DData> BIAS::ThreeDOut::mapImages_
protectedinherited
std::map<unsigned int, IndexedFaceSet> BIAS::ThreeDOut::mapIndexedFaceSet_
protectedinherited
std::map<unsigned int, Line3DData> BIAS::ThreeDOut::mapLines_
protectedinherited
std::map<unsigned int, PMatrix3DData > BIAS::ThreeDOut::mapPMatrices_
protectedinherited
std::map<unsigned int, Point3DData> BIAS::ThreeDOut::mapPoints_
protectedinherited
std::map<unsigned int, Projection3DData> BIAS::ThreeDOut::mapProjection3D_
protectedinherited
std::map<unsigned int, Text3DData> BIAS::ThreeDOut::mapTexts_
protectedinherited

map of all point structures

Definition at line 999 of file ThreeDOut.hh.

Referenced by AddOSGTexts_(), and BIAS::ThreeDOut::AddText().

std::vector<double> BIAS::ThreeDOut::meanDraw
protectedinherited

Definition at line 1026 of file ThreeDOut.hh.

unsigned int BIAS::ThreeDOut::NextCamEllipsoidIndex_
protectedinherited

counter for the next ellipsoid index, gaps are not reused by now

Definition at line 1016 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddEllipsoid(), and BIAS::ThreeDOut::ThreeDOut().

unsigned int BIAS::ThreeDOut::NextEllipsoidIndex_
protectedinherited

counter for the next ellipsoid index, gaps are not reused by now

Definition at line 1011 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddEllipsoid(), and BIAS::ThreeDOut::ThreeDOut().

unsigned int BIAS::ThreeDOut::NextImageIndex_
protectedinherited

counter for the next index, gaps (due to delete) are not reused by now

Definition at line 991 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddImage(), and BIAS::ThreeDOut::ThreeDOut().

unsigned int BIAS::ThreeDOut::NextIndexedFaceSetIndex_
protectedinherited
unsigned int BIAS::ThreeDOut::NextLineIndex_
protectedinherited

counter for the next line index, gaps (due to delete) arent reused

Definition at line 1006 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddLine(), and BIAS::ThreeDOut::ThreeDOut().

unsigned int BIAS::ThreeDOut::NextPIndex_
protectedinherited

counter for the next index, gaps (due to delete) are not reused by now

Definition at line 986 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddPMatrix(), BIAS::ThreeDOut::ThreeDOut(), and BIAS::ThreeDOut::UpdatePMatrix().

unsigned int BIAS::ThreeDOut::NextPointIndex_
protectedinherited

counter for the next index, gaps (due to delete) are not reused by now

Definition at line 996 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddPoint(), and BIAS::ThreeDOut::ThreeDOut().

unsigned int BIAS::ThreeDOut::NextProjection3DIndex_
protectedinherited

Definition at line 1022 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddPose(), and BIAS::ThreeDOut::AddProjection().

unsigned int BIAS::ThreeDOut::NextTextIndex_
protectedinherited

counter for the next index, gaps (due to delete) are not reused by now

Definition at line 1001 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::AddText(), and BIAS::ThreeDOut::ThreeDOut().

ThreeDOutParameters BIAS::ThreeDOut::Params_
protectedinherited
std::string BIAS::ThreeDOutOpenSceneGraph::TexImgExtension_
protected

Definition at line 104 of file ThreeDOutOpenSceneGraph.hh.

Referenced by GenerateFilename_(), and ThreeDOutOpenSceneGraph().

bool BIAS::ThreeDOut::visualize_viewports
inherited

Definition at line 355 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOut::ThreeDOut().

bool BIAS::ThreeDOut::WriteViewpoints_
protectedinherited

The documentation for this class was generated from the following files: