GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GoDBMeshRow Class Reference

this class manages the map with the keys matching the fields of the Mesh gofiguredatabase table and values of the map matching a row of the Mesh table More...

#include <Code/IO/GoDBRow/GoDBMeshRow.h>

Inheritance diagram for GoDBMeshRow:
Inheritance graph
[legend]
Collaboration diagram for GoDBMeshRow:
Collaboration graph
[legend]

Public Member Functions

 GoDBMeshRow ()
 
 GoDBMeshRow (vtkMySQLDatabase *DatabaseConnector, vtkPolyData *TraceVisu, GoDBCoordinateRow Min, GoDBCoordinateRow Max, unsigned int ImgSessionID, GoFigureMeshAttributes *iMeshAttributes=0)
 fill the mesh map with the values gotten from the visualization More...
 
 GoDBMeshRow (const GoDBMeshRow &iRow)
 
 GoDBMeshRow (unsigned int ImagingSessionID)
 
 GoDBMeshRow (unsigned int iExistingID, vtkMySQLDatabase *iDatabaseConnector)
 
void SafeDownCast (GoDBTraceRow &iRow)
 convert a GoDBTraceRow in GoDBMeshRow More...
 
virtual int SaveInDB (vtkMySQLDatabase *DatabaseConnector)
 save the row in the database if the TraceID is set to "0", update the existing traceRow if the TraceID is <> 0 More...
 
void SaveInDBTotalIntensityPerChannel (vtkMySQLDatabase *DatabaseConnector, boost::unordered_map< std::string, int > iNameChannelWithValues)
 create the intensities per channel based on the channel names and values contained in iNameChannelWithValues More...
 
void SetCellType (vtkMySQLDatabase *DatabaseConnector, std::string CellTypeName)
 put the value of map["Celltype"] to CellTypeName More...
 
void SetSubCellType (vtkMySQLDatabase *DatabaseConnector, std::string SubCellTypeName)
 put the value of map["SubCelltype"] to SubCellTypeName More...
 
void SetTheDataFromTheVisu (vtkMySQLDatabase *DatabaseConnector, vtkPolyData *TraceVisu, GoDBCoordinateRow iCoordMin, GoDBCoordinateRow iCoordMax, GoFigureMeshAttributes *iMeshAttributes)
 
 ~GoDBMeshRow ()
 
- Public Member Functions inherited from GoDBTraceRow
int DoesThisBoundingBoxExist (vtkMySQLDatabase *DatabaseConnector)
 check if a trace already has the same bounding box More...
 
std::string GetCollectionIDName ()
 
std::string GetCollectionName ()
 
 GoDBTraceRow ()
 
 GoDBTraceRow (vtkMySQLDatabase *DatabaseConnector, vtkPolyData *TraceVisu, GoDBCoordinateRow Min, GoDBCoordinateRow Max, unsigned int ImgSessionID)
 fill the trace map with the values gotten from the visualization More...
 
void SetCollectionID (unsigned int iCollectionID)
 set the collectionID field to iCollectionID More...
 
void SetColor (unsigned int Red, unsigned int Green, unsigned int Blue, unsigned int Alpha, std::string ColorName, vtkMySQLDatabase *DatabaseConnector)
 get the colorID corresponding to the rgba values and set the colorID field of the trace with it More...
 
void SetTheBoundingBox (vtkMySQLDatabase *iDatabaseConnector, GoDBCoordinateRow Min, GoDBCoordinateRow Max)
 check in the database if the Coordinate Min and Max already exists, if yes fill the map["CoordIDMin"] and ["CoordIDmax"] with the existing CoordinateID if not, create the coordinates in the database and fill the map with the new created ID, if the bounding box already exists, a cout is generated More...
 
bool SetValuesForSpecificID (int ID, vtkMySQLDatabase *iDatabaseConnector)
 
 ~GoDBTraceRow ()
 
- Public Member Functions inherited from GoDBRow
StringMapConstIterator ConstMapBegin ()
 
StringMapConstIterator ConstMapEnd ()
 
void DeleteFromDB (vtkMySQLDatabase *iDatabaseConnector)
 delete from the database the row which has the same TableID More...
 
std::string GetMapValue (const std::string &key)
 return the value for the field map[key] after having removed the " at the beginning and at the end of the value if it is a string in order to get the original value. More...
 
template<typename T >
GetMapValue (const std::string &key)
 
std::string GetTableIDName ()
 
std::string GetTableName ()
 
std::vector< std::string > GetVectorColumnNames ()
 put all the keys of the map in a vector More...
 
 GoDBRow ()
 
StringMapIterator MapBegin ()
 
StringMapIterator MapEnd ()
 
std::string PrintColumnNames ()
 put all the keys of the map in a string separated by ',' More...
 
std::string PrintColumnNamesWithValues ()
 put all the keys and values of the map in a string as map[key] = value separated by ',' More...
 
std::vector< std::string > PrintColumnsAndValues ()
 
std::string PrintValues ()
 put all the values of the map in a string separated by ',' More...
 
template<typename T >
void SetField (const std::string &key, const T &value)
 convert the value into a string and assign it to the key in the map More...
 
void SetField (const std::string &key, const std::string &value)
 set value as the value of map[key] after having put " at the beginning and at the end of the string, as value is a string and it will be needed for the database queries. map[key] = " "value" " More...
 
virtual ~GoDBRow ()
 

Static Public Member Functions

static int GetCellTypeID (vtkMySQLDatabase *iDatabaseConnector, std::string iCellTypeName)
 static method.get the CellTypeID base on the name of the celltype More...
 
static int GetSubCellTypeID (vtkMySQLDatabase *iDatabaseConnector, std::string iSubCellTypeName)
 static method.get the SubCellTypeID base on the name of the subcelltype More...
 

Protected Member Functions

virtual void InitializeMap ()
 virtual pure. initialize all the values of the map More...
 
- Protected Member Functions inherited from GoDBTraceRow
template<typename T >
int SaveInDBTemplate (vtkMySQLDatabase *iDatabaseConnector, T *iTrace)
 save the row in the database if the TraceID is set to "0", update the existing traceRow if the TraceID is <> 0 More...
 
void SetImgSessionID (unsigned int iImgSessionID)
 set the ImagingSessionID field to iImgSessionID More...
 
template<typename T >
void SetTheDataFromTheVisuTemplate (vtkMySQLDatabase *DatabaseConnector, vtkPolyData *TraceVisu, GoDBCoordinateRow iCoordMin, GoDBCoordinateRow iCoordMax)
 
- Protected Member Functions inherited from GoDBRow
void AddConditions (const std::string &iNameOfField, std::vector< FieldWithValue > &ioFieldWithValue)
 add as an element of ioFieldWithValue the name and value of the map with the key iNameOfField More...
 

Protected Attributes

boost::unordered_map
< std::string, int > 
m_NameChannelWithValues
 
- Protected Attributes inherited from GoDBTraceRow
std::string m_CollectionIDName
 check in the database if the Coordinate Min adn Max already exists, if yes fill the map["CoordIDMin"] and ["CoordIDmax"] with the existing CoordinateID if not, create the coordinates in the database and fill the map with the new created ID, if the bounding box already exists, a cout is generated More...
 
std::string m_CollectionName
 
- Protected Attributes inherited from GoDBRow
StringMapType m_MapRow
 
std::string m_TableIDName
 
std::string m_TableName
 

Additional Inherited Members

- Public Types inherited from GoDBRow
typedef
StringMapType::const_iterator 
StringMapConstIterator
 
typedef StringMapType::iterator StringMapIterator
 
typedef std::map< std::string,
std::string > 
StringMapType
 

Detailed Description

this class manages the map with the keys matching the fields of the Mesh gofiguredatabase table and values of the map matching a row of the Mesh table

Definition at line 55 of file GoDBMeshRow.h.

Constructor & Destructor Documentation

GoDBMeshRow::GoDBMeshRow ( )

Definition at line 46 of file GoDBMeshRow.cxx.

GoDBMeshRow::GoDBMeshRow ( vtkMySQLDatabase *  DatabaseConnector,
vtkPolyData *  TraceVisu,
GoDBCoordinateRow  Min,
GoDBCoordinateRow  Max,
unsigned int  ImgSessionID,
GoFigureMeshAttributes iMeshAttributes = 0 
)
explicit

fill the mesh map with the values gotten from the visualization

Parameters
[in]DatabaseConnectorconnection to the database
[in]TraceVisuvtkPolyData the points will be extracted from to create a string for "Points"
[in]Mincoordinate row for the minimum of the bounding box
[in]Maxcoordinate row for the maximum of the bounding box
[in]ImgSessionIDID of the current imagingsession
[in]iMeshAttributescontainer for intensity values

Definition at line 60 of file GoDBMeshRow.cxx.

GoDBMeshRow::GoDBMeshRow ( const GoDBMeshRow iRow)

Definition at line 95 of file GoDBMeshRow.cxx.

GoDBMeshRow::GoDBMeshRow ( unsigned int  ImagingSessionID)
Parameters
[in]ImagingSessionIDID of the current imagingsession

Definition at line 73 of file GoDBMeshRow.cxx.

GoDBMeshRow::GoDBMeshRow ( unsigned int  iExistingID,
vtkMySQLDatabase *  iDatabaseConnector 
)

Definition at line 84 of file GoDBMeshRow.cxx.

GoDBMeshRow::~GoDBMeshRow ( )

Definition at line 55 of file GoDBMeshRow.cxx.

Member Function Documentation

int GoDBMeshRow::GetCellTypeID ( vtkMySQLDatabase *  iDatabaseConnector,
std::string  iCellTypeName 
)
static

static method.get the CellTypeID base on the name of the celltype

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iCellTypeNamename of the celltype
Returns
the ID of the celltype

Definition at line 179 of file GoDBMeshRow.cxx.

int GoDBMeshRow::GetSubCellTypeID ( vtkMySQLDatabase *  iDatabaseConnector,
std::string  iSubCellTypeName 
)
static

static method.get the SubCellTypeID base on the name of the subcelltype

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iSubCellTypeNamename of the subcelltype
Returns
the ID of the subcelltype

Definition at line 203 of file GoDBMeshRow.cxx.

void GoDBMeshRow::InitializeMap ( )
protectedvirtual

virtual pure. initialize all the values of the map

Reimplemented from GoDBTraceRow.

Definition at line 147 of file GoDBMeshRow.cxx.

void GoDBMeshRow::SafeDownCast ( GoDBTraceRow iRow)

convert a GoDBTraceRow in GoDBMeshRow

Parameters
[in]iRow

Definition at line 133 of file GoDBMeshRow.cxx.

int GoDBMeshRow::SaveInDB ( vtkMySQLDatabase *  DatabaseConnector)
virtual

save the row in the database if the TraceID is set to "0", update the existing traceRow if the TraceID is <> 0

Parameters
[in]DatabaseConnectorconnection to the database
Returns
the ID of the updated or saved trace

Implements GoDBTraceRow.

Definition at line 163 of file GoDBMeshRow.cxx.

void GoDBMeshRow::SaveInDBTotalIntensityPerChannel ( vtkMySQLDatabase *  DatabaseConnector,
boost::unordered_map< std::string, int >  iNameChannelWithValues 
)

create the intensities per channel based on the channel names and values contained in iNameChannelWithValues

Parameters
[in]DatabaseConnectorconnection to the database
[in]iNameChannelWithValuesmap with keys as channel names and values as intensities

Definition at line 227 of file GoDBMeshRow.cxx.

void GoDBMeshRow::SetCellType ( vtkMySQLDatabase *  DatabaseConnector,
std::string  CellTypeName 
)

put the value of map["Celltype"] to CellTypeName

Parameters
[in]DatabaseConnectorconnection to the database
[in]CellTypeName

Definition at line 189 of file GoDBMeshRow.cxx.

void GoDBMeshRow::SetSubCellType ( vtkMySQLDatabase *  DatabaseConnector,
std::string  SubCellTypeName 
)

put the value of map["SubCelltype"] to SubCellTypeName

Parameters
[in]DatabaseConnectorconnection to the database
[in]SubCellTypeName

Definition at line 213 of file GoDBMeshRow.cxx.

void GoDBMeshRow::SetTheDataFromTheVisu ( vtkMySQLDatabase *  DatabaseConnector,
vtkPolyData *  TraceVisu,
GoDBCoordinateRow  iCoordMin,
GoDBCoordinateRow  iCoordMax,
GoFigureMeshAttributes iMeshAttributes 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 112 of file GoDBMeshRow.cxx.

Member Data Documentation

boost::unordered_map< std::string, int > GoDBMeshRow::m_NameChannelWithValues
protected

Definition at line 156 of file GoDBMeshRow.h.


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