40 #include "vtkSmartPointer.h"
52 unsigned int ImgSessionID,
64 std::cout <<
"The bounding box already exists for this track" << std::endl;
110 this->
m_MapRow[
"lineageID"] = std::string(
"0" );
111 this->
m_MapRow[
"TrackFamilyID"] = std::string(
"0" );
118 vtkMySQLDatabase *DatabaseConnector)
120 std::vector< FieldWithValue > Conditions;
125 return FindOneID(DatabaseConnector,
"track",
"trackID", Conditions);
133 return this->SaveInDBTemplate< GoDBTrackRow >(DatabaseConnector,
this);
140 vtkPolyData *TrackVisu,
144 this->SetTheDataFromTheVisuTemplate< vtkPolyDataMySQLTrackWriter >(
145 DatabaseConnector, TrackVisu, iCoordMin, iCoordMax);
153 std::string PointsString =
"0";
157 vtkSmartPointer< vtkPolyDataMySQLTrackWriter > convert =
158 vtkSmartPointer< vtkPolyDataMySQLTrackWriter >::New();
159 PointsString = convert->GetMySQLText(iTrackVisu);
161 this->
SetField(
"Points", PointsString);
int DoesThisBoundingBoxTrackExist(vtkMySQLDatabase *DatabaseConnector)
abstract class to be inherited by Contour,Mesh,Track and GoDBLineageRow
std::string m_TableIDName
manages a map with keys matching fields of the gofiguredatabase Coordinate table and values of the ma...
virtual void InitializeMap()
virtual pure. initialize all the values of the map
bool SetValuesForSpecificID(int ID, vtkMySQLDatabase *iDatabaseConnector)
int FindOneID(vtkMySQLDatabase *DatabaseConnector, const std::string &TableName, const std::string &ColumnName, const std::string &field, const std::string &value)
SELECT ColumnName FROM TableName WHERE field = value.
virtual int SaveInDB(vtkMySQLDatabase *DatabaseConnector)
save the row in the database if the TraceID is set to "0", update the existing traceRow if the TraceI...
std::string m_CollectionIDName
check in the database if the Coordinate Min adn Max already exists, if yes fill the map["CoordIDMin"]...
void SetImgSessionID(unsigned int iImgSessionID)
set the ImagingSessionID field to iImgSessionID
void SetField(const std::string &key, const T &value)
convert the value into a string and assign it to the key in the map
std::string m_CollectionName
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 ...
void SetTheDataFromTheVisu(vtkMySQLDatabase *DatabaseConnector, vtkPolyData *TrackVisu, GoDBCoordinateRow iCoordMin, GoDBCoordinateRow iCoordMax)
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"]...
void SetThePointsFromPolydata(vtkPolyData *iTrackVisu)
convert the iTrackVisu into a string and set the field 'points' of the map