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

this class handles the interaction between the database and the children of QGoDBTraceManager More...

#include <Code/IO/GoDBCollectionOfTraces.h>

Public Types

typedef std::pair< std::string,
QColor > 
NameWithColorData
 
typedef
GoDBTableWidgetContainer::TWContainerType 
TWContainerType
 

Public Member Functions

template<typename T >
void ChangeColorForTrace (unsigned int iTraceID, NameWithColorData iNewColor, vtkMySQLDatabase *iDatabaseConnector)
 update the color of the specified trace with iNewColor in the database More...
 
template<typename T >
int CreateCollectionWithNoTracesNoPoints (vtkMySQLDatabase *iDatabaseConnector, NameWithColorData iColor, T iNewCollection, int iTimePoint=-1)
 save the collection in the database after getting an empty bounding box and return the corresponding ID More...
 
template<typename T >
unsigned int CreateNewTraceInDB (T iTrace, vtkMySQLDatabase *iDatabaseConnector, NameWithColorData iColor, unsigned int iCollectionID)
 set the bounding box, the color and the collectionID of the trace,save it in the database and return the new TraceID created More...
 
template<typename T >
unsigned int CreateNewTraceInDB (T iTrace, vtkMySQLDatabase *iDatabaseConnector, unsigned int iCoordIDMin, unsigned int iCoordIDMax, NameWithColorData iColor, unsigned int iCollectionID)
 
template<typename T >
unsigned int CreateNewTraceInDB (T iTrace, vtkMySQLDatabase *iDatabaseConnector, unsigned int iCoordIDMin, unsigned int iCoordIDMax, NameWithColorData iColor)
 
void DeleteTraceInDB (int TraceToDelete, vtkMySQLDatabase *DatabaseConnector)
 Delete the corresponding trace in the database. More...
 
void DeleteTracesInDB (std::list< unsigned int > TracesToDelete, vtkMySQLDatabase *DatabaseConnector)
 Delete in the Database all the traces listed in the list of int. More...
 
std::list< NameWithColorDataGetAllTracesIDsWithColor (vtkMySQLDatabase *iDatabaseConnector)
 get all the distinct traces IDs with their QColor More...
 
unsigned int GetBoundedBoxTimePoint (vtkMySQLDatabase *iDatabaseConnector, unsigned int iTraceID, bool MinTimePoint=true)
 get the timepoint min or max for the trace More...
 
std::string GetCollectionOf ()
 
std::list< double * > GetCoordinateCenterBoundingBox (vtkMySQLDatabase *iDatabaseConnector, unsigned int iTraceID)
 return a list of the coordinates of all the centers of the bounding boxes for all the collectionOf corresponding to the iTraceID More...
 
std::list< unsigned int > GetLastCreatedTracesIDs (vtkMySQLDatabase *iDatabaseConnector, int iNumberOfTraces)
 get the IDs of the last saved traces in the database More...
 
std::list< unsigned int > GetListCollectionIDs (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTracesIDs, bool ExcludeZero=true, bool Distinct=true)
 get the list of IDs that are collection of iListTraces More...
 
template<typename T >
std::list< T > GetListStructureFromDB (vtkMySQLDatabase *iDatabaseConnector, unsigned int iImgSessionID, std::list< unsigned int > iListTraces)
 get a list of structures filled with data from the database More...
 
std::list< unsigned int > GetListTimePointsFromTraceIDs (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTraceIDs)
 get the list of timepoints for each trace in iListTraceIDs More...
 
std::list< unsigned int > GetListTracesIDsFromThisCollectionOf (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTraces)
 get the list of IDs belonging to the iListTraces as collectionof More...
 
std::list< unsigned int > GetListTracesIDWithNoPoints (std::list< unsigned int > iListTracesIDs, vtkMySQLDatabase *iDatabaseConnector)
 get the list of tracesIDs that have no points More...
 
int GetMaxTraceIDsForSpecificTimePoint (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTraceIDs, unsigned int iTimePoint)
 get the max of the IDs for the traceIDs in iListTraceIDs that have a timepoint equal to iTimePoint More...
 
std::list< unsigned int > GetNonMaxTraceIDsForSpecificTimePoint (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTraceIDs, unsigned int iTimePoint, unsigned int iMaxTraceID)
 get all the traceIDs except the iMaxTraceID for the timepoint More...
 
std::string GetPoints (vtkMySQLDatabase *iDatabaseConnector, std::string iTraceName, unsigned int iTraceID)
 
std::list< unsigned int > GetTimePointsForTraceIDs (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTraceIDs)
 get the timepoints (non distinct) for all the traceIDs in iListTraceIDs More...
 
std::list< unsigned int > GetTimePointWithSeveralTracesFromTheList (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTraceIDs)
 get the list of timepoints where several traces from the list of traces have the same ones More...
 
std::list< unsigned int > GetTraceIDsBelongingToCollectionID (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTraceIDs, unsigned int iCollectionID)
 get the tracesIDs contained in iListTraceIDs that have iCollectionID as a collectionID More...
 
std::list< unsigned int > GetTraceIDsBelongingToCollectionID (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListCollectionIDs)
 get all the tracesIDs that belong to iListCollectionIDs More...
 
std::list< unsigned int > GetTraceIDsBelongingToListTimePoints (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTPs)
 
std::list< unsigned int > GetTraceIDsWithTimePointAndCollectionID (vtkMySQLDatabase *iDatabaseConnector, unsigned int iCollectionID, unsigned int iTimePoint)
 get the tracesIDs from the database which have iTimePoint as TCoordMin and iCollectionID as collectionID More...
 
std::list< unsigned int > GetTraceIDsWithTimePointInf (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTraceIDs, unsigned int iTimePoint)
 get the tracesIDs belonging to iListTraceIDs with a timepoint inf to iTimePoint More...
 
int GetTraceIDWithLowestTimePoint (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTraceIDs)
 return the traceID with the lowest timepoint or -1 if there is not only one that have the lowest timepoint More...
 
std::list< NameWithColorDataGetTracesIDsWithColorForATimePoint (vtkMySQLDatabase *iDatabaseConnector, unsigned int iTimePoint)
 get all the distinct traces IDs with their QColor for a given timepoint More...
 
std::list< unsigned int > GetTrackFamiliesForLineages (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iLineagesID)
 
std::vector< unsigned int > GetTrackFamily (vtkMySQLDatabase *iDatabaseConnector, unsigned int iTrackID)
 
std::list< unsigned int > GetTrackFamilyDataFromDB (vtkMySQLDatabase *iDatabaseConnector)
 
std::list< unsigned int > GetTrackFamilyID (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTrackIDs)
 return the trackFamilyIDs the track belongs to (as a mother or as a daughter) More...
 
 GoDBCollectionOfTraces ()
 
 GoDBCollectionOfTraces (std::string CollectionName, std::string Traces, std::string iCollectionOfName, unsigned int iImgSessionID)
 
bool isMother (vtkMySQLDatabase *iDatabaseConnector, unsigned int iTrackID)
 
void RecalculateDBBoundingBox (vtkMySQLDatabase *iDatabaseConnector, int iCollectionID)
 Calculate the bounding box of the corresponding collection and update it in the database. More...
 
void RecalculateDBBoundingBox (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTracesIDs)
 Get the list of all the collectionIDs, distinct and different from zero for the corresponding traces IDs and recalculate the bounding boxes for them. More...
 
void SetCollectionInfo (std::string iCollectionName, std::string iTracesName, std::string iCollectionOfName)
 fill the global values for the collection of traces. More...
 
void SetImgSessionID (unsigned int iImgSessionID)
 set m_ImgSessionID to iImgSessionID More...
 
void UpdateCollectionIDOfSelectedTraces (std::list< unsigned int > iListSelectedTraces, unsigned int iCollectionID, vtkMySQLDatabase *iDatabaseConnector)
 Update the collectionID of the selected traces in the DB traces table with the new collectionID. More...
 
void UpdateValueForListTraces (vtkMySQLDatabase *iDatabaseConnector, std::string iNameValue, std::string iValue, std::list< unsigned int > iListTraceIDs)
 update in the database the iNameValue with iValue for the traces from iListTraceIDs More...
 
virtual ~GoDBCollectionOfTraces ()
 

Protected Member Functions

int CreateNewCollection ()
 Create a new collection Row in the collection table and return the collectionID from the created row: More...
 
int CreateNewCollection (vtkMySQLDatabase *DatabaseConnector, GoDBTraceRow &myNewObject)
 create a new collection in the database and return the corresponding ID More...
 
std::vector< std::string > GetAttributesForTraces ()
 
GoDBCoordinateRow GetCollectionOfTracesCoordMax (vtkMySQLDatabase *DatabaseConnector, std::list< unsigned int > iListCollectionOfTracesID)
 return the coordinate max of all the coordinates of the collectionOf traces More...
 
GoDBCoordinateRow GetCollectionOfTracesCoordMin (vtkMySQLDatabase *DatabaseConnector, std::list< unsigned int > iListCollectionOfTracesID)
 return the coordinate min of all the coordinates of the selected traces More...
 
int GetCoordIDMaxForBoundingBoxWithNoTraces (vtkMySQLDatabase *iDatabaseConnector)
 return the CoordIDMax for a minimum bounding box More...
 
int GetCoordIDMinForBoundingBoxWithNoTraces (vtkMySQLDatabase *iDatabaseConnector)
 return the CoordIDMin for a minimum bounding box More...
 
int GetCoordMaxID (vtkMySQLDatabase *DatabaseConnector, int iTraceID)
 get the max of all the coordinates of the collectionof traces belonging to the trace and record them in the database More...
 
int GetCoordMinID (vtkMySQLDatabase *DatabaseConnector, int iTraceID)
 get the min of all the coordinates of the collectionof traces belonging to the trace and record them in the database More...
 
void GetFieldsNeededForQueryForColorData (std::vector< std::string > &ioSelectedFields, std::vector< std::string > &ioJoinTablesOnTraceTable)
 get all the different parts needed for the query to get the color of traces from the database More...
 
std::list< NameWithColorDataGetListNameWithColorDataFromResultsQuery (std::vector< std::vector< std::string > > iResultsQuery)
 get the data from the query results to fill a QColor and the corresponding ID More...
 
void SetTheTimePointCoordinatesForMesh (unsigned int iTimePoint, int &ioCoordIDMax, int &ioCoordIDMin, vtkMySQLDatabase *iDatabaseConnector)
 modify the timepoint to iTimePoint for the coordmax and coordmin and replace the ioCoordIDMax/Min with the new saved coordinates in the database More...
 
void UpdateBoundingBoxInDB (int iCoordIDMin, int iCoordIDMax, int iTraceID, vtkMySQLDatabase *iDatabaseConnector)
 Update in the database the coordid max and min of the trace. More...
 
void UpdateCollectionIDOfSelectedTrace (int iSelectedTraceID, int inewCollectionID, vtkMySQLDatabase *DatabaseConnector)
 change the collection ID of the trace More...
 

Protected Attributes

std::string m_CollectionIDName
 
std::string m_CollectionName
 
std::string m_CollectionOfIDName
 
std::string m_CollectionOfName
 
unsigned int m_ImgSessionID
 
std::string m_TracesIDName
 
std::string m_TracesName
 

Detailed Description

this class handles the interaction between the database and the children of QGoDBTraceManager

Definition at line 54 of file GoDBCollectionOfTraces.h.

Member Typedef Documentation

typedef std::pair< std::string, QColor > GoDBCollectionOfTraces::NameWithColorData

Definition at line 66 of file GoDBCollectionOfTraces.h.

Definition at line 65 of file GoDBCollectionOfTraces.h.

Constructor & Destructor Documentation

GoDBCollectionOfTraces::GoDBCollectionOfTraces ( )

Definition at line 50 of file GoDBCollectionOfTraces.cxx.

GoDBCollectionOfTraces::GoDBCollectionOfTraces ( std::string  CollectionName,
std::string  Traces,
std::string  iCollectionOfName,
unsigned int  iImgSessionID 
)

Definition at line 57 of file GoDBCollectionOfTraces.cxx.

GoDBCollectionOfTraces::~GoDBCollectionOfTraces ( )
virtual

Definition at line 68 of file GoDBCollectionOfTraces.cxx.

Member Function Documentation

template<typename T >
void GoDBCollectionOfTraces::ChangeColorForTrace ( unsigned int  iTraceID,
NameWithColorData  iNewColor,
vtkMySQLDatabase *  iDatabaseConnector 
)
inline

update the color of the specified trace with iNewColor in the database

Parameters
[in]iTraceIDID of the trace with the color to modify
[in]iNewColorname and rgba values of the new color
[in]iDatabaseConnectorconnection to the database
Template Parameters
Tchildren of GoDBTraceRow

Definition at line 269 of file GoDBCollectionOfTraces.h.

template<typename T >
int GoDBCollectionOfTraces::CreateCollectionWithNoTracesNoPoints ( vtkMySQLDatabase *  iDatabaseConnector,
NameWithColorData  iColor,
iNewCollection,
int  iTimePoint = -1 
)
inline

save the collection in the database after getting an empty bounding box and return the corresponding ID

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iColorcolor for the new collection
[in]iNewCollectioncollection with all the fields set except bounding box
[in]iTimePointtimepoint for the collection (only for mesh)
Template Parameters
Tchild of GoDBTraceRow

Definition at line 169 of file GoDBCollectionOfTraces.h.

int GoDBCollectionOfTraces::CreateNewCollection ( )
protected

Create a new collection Row in the collection table and return the collectionID from the created row:

int GoDBCollectionOfTraces::CreateNewCollection ( vtkMySQLDatabase *  DatabaseConnector,
GoDBTraceRow myNewObject 
)
protected

create a new collection in the database and return the corresponding ID

Definition at line 539 of file GoDBCollectionOfTraces.cxx.

template<typename T >
unsigned int GoDBCollectionOfTraces::CreateNewTraceInDB ( iTrace,
vtkMySQLDatabase *  iDatabaseConnector,
NameWithColorData  iColor,
unsigned int  iCollectionID 
)
inline

set the bounding box, the color and the collectionID of the trace,save it in the database and return the new TraceID created

Parameters
[in]iTrace
[in]iDatabaseConnectorconnection to the database
[in]iColorQColor and Name of the color for the trace
[in]iCollectionIDID of the collection for the trace
Template Parameters
Tchildren of GoDBTraceRow
Returns
unsigned int New created TraceID

Definition at line 216 of file GoDBCollectionOfTraces.h.

template<typename T >
unsigned int GoDBCollectionOfTraces::CreateNewTraceInDB ( iTrace,
vtkMySQLDatabase *  iDatabaseConnector,
unsigned int  iCoordIDMin,
unsigned int  iCoordIDMax,
NameWithColorData  iColor,
unsigned int  iCollectionID 
)
inline

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 231 of file GoDBCollectionOfTraces.h.

template<typename T >
unsigned int GoDBCollectionOfTraces::CreateNewTraceInDB ( iTrace,
vtkMySQLDatabase *  iDatabaseConnector,
unsigned int  iCoordIDMin,
unsigned int  iCoordIDMax,
NameWithColorData  iColor 
)
inline

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 249 of file GoDBCollectionOfTraces.h.

void GoDBCollectionOfTraces::DeleteTraceInDB ( int  TraceToDelete,
vtkMySQLDatabase *  DatabaseConnector 
)

Delete the corresponding trace in the database.

Parameters
[in]DatabaseConnectorconnection to the database
[in]TraceToDeleteID of the trace to be deleted from the database

Definition at line 128 of file GoDBCollectionOfTraces.cxx.

void GoDBCollectionOfTraces::DeleteTracesInDB ( std::list< unsigned int >  TracesToDelete,
vtkMySQLDatabase *  DatabaseConnector 
)

Delete in the Database all the traces listed in the list of int.

Parameters
[in]TracesToDeletedelete from the database the traces with the ID listed in it
[in]DatabaseConnectorconnection to the database

Definition at line 102 of file GoDBCollectionOfTraces.cxx.

std::list< GoDBCollectionOfTraces::NameWithColorData > GoDBCollectionOfTraces::GetAllTracesIDsWithColor ( vtkMySQLDatabase *  iDatabaseConnector)

get all the distinct traces IDs with their QColor

Parameters
[in]iDatabaseConnectorconnection to the database
Returns
std::list<NameWithColorData> list of the TracesIDs with their QColor

Definition at line 215 of file GoDBCollectionOfTraces.cxx.

std::vector< std::string > GoDBCollectionOfTraces::GetAttributesForTraces ( )
protected

Definition at line 1006 of file GoDBCollectionOfTraces.cxx.

unsigned int GoDBCollectionOfTraces::GetBoundedBoxTimePoint ( vtkMySQLDatabase *  iDatabaseConnector,
unsigned int  iTraceID,
bool  MinTimePoint = true 
)

get the timepoint min or max for the trace

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iTraceIDID of the trace the timepoint min is needed
[in]MinTimePointif true return the min timepoint, if false, return the max timepoint
Returns
the timepoint min or max

Definition at line 985 of file GoDBCollectionOfTraces.cxx.

std::string GoDBCollectionOfTraces::GetCollectionOf ( )
Returns
the name of the trace of the current collection which is also a collection of

Definition at line 653 of file GoDBCollectionOfTraces.cxx.

GoDBCoordinateRow GoDBCollectionOfTraces::GetCollectionOfTracesCoordMax ( vtkMySQLDatabase *  DatabaseConnector,
std::list< unsigned int >  iListCollectionOfTracesID 
)
protected

return the coordinate max of all the coordinates of the collectionOf traces

Definition at line 436 of file GoDBCollectionOfTraces.cxx.

GoDBCoordinateRow GoDBCollectionOfTraces::GetCollectionOfTracesCoordMin ( vtkMySQLDatabase *  DatabaseConnector,
std::list< unsigned int >  iListCollectionOfTracesID 
)
protected

return the coordinate min of all the coordinates of the selected traces

Definition at line 403 of file GoDBCollectionOfTraces.cxx.

int GoDBCollectionOfTraces::GetCoordIDMaxForBoundingBoxWithNoTraces ( vtkMySQLDatabase *  iDatabaseConnector)
protected

return the CoordIDMax for a minimum bounding box

Parameters
[in]iDatabaseConnectorconnection to the database
Returns
the ID for the coordinate Max of the bounding box

Definition at line 504 of file GoDBCollectionOfTraces.cxx.

int GoDBCollectionOfTraces::GetCoordIDMinForBoundingBoxWithNoTraces ( vtkMySQLDatabase *  iDatabaseConnector)
protected

return the CoordIDMin for a minimum bounding box

Parameters
[in]iDatabaseConnectorconnection to the database
Returns
the ID for the coordinate min of the bounding box

Definition at line 491 of file GoDBCollectionOfTraces.cxx.

std::list< double * > GoDBCollectionOfTraces::GetCoordinateCenterBoundingBox ( vtkMySQLDatabase *  iDatabaseConnector,
unsigned int  iTraceID 
)

return a list of the coordinates of all the centers of the bounding boxes for all the collectionOf corresponding to the iTraceID

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iTraceIDID for the trace the bounding boxes of its collectionof traces are needed
Returns
a list of x,y,z,t for all centers of bounding boxes

Definition at line 766 of file GoDBCollectionOfTraces.cxx.

int GoDBCollectionOfTraces::GetCoordMaxID ( vtkMySQLDatabase *  DatabaseConnector,
int  iTraceID 
)
protected

get the max of all the coordinates of the collectionof traces belonging to the trace and record them in the database

Definition at line 375 of file GoDBCollectionOfTraces.cxx.

int GoDBCollectionOfTraces::GetCoordMinID ( vtkMySQLDatabase *  DatabaseConnector,
int  iTraceID 
)
protected

get the min of all the coordinates of the collectionof traces belonging to the trace and record them in the database

Definition at line 347 of file GoDBCollectionOfTraces.cxx.

void GoDBCollectionOfTraces::GetFieldsNeededForQueryForColorData ( std::vector< std::string > &  ioSelectedFields,
std::vector< std::string > &  ioJoinTablesOnTraceTable 
)
protected

get all the different parts needed for the query to get the color of traces from the database

Parameters
[in,out]ioSelectedFieldswill be filed with the attributes of the color DBtable
[in,out]ioJoinTablesOnTraceTablewill be filled with the conditions to link the color table and the trace table

Definition at line 275 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetLastCreatedTracesIDs ( vtkMySQLDatabase *  iDatabaseConnector,
int  iNumberOfTraces 
)

get the IDs of the last saved traces in the database

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iNumberOfTracesnumber of IDs to get
Returns
list of last created IDs

Definition at line 752 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetListCollectionIDs ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTracesIDs,
bool  ExcludeZero = true,
bool  Distinct = true 
)

get the list of IDs that are collection of iListTraces

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTracesIDslist of traces IDs for which we need the collectionIDs
[in]ExcludeZeroif set to true, will not return the collectionID = 0
[in]Distinctif set to true, will not return doublon
Returns
std::list<unsigned int> list of the tracesIDs

Definition at line 713 of file GoDBCollectionOfTraces.cxx.

std::list< GoDBCollectionOfTraces::NameWithColorData > GoDBCollectionOfTraces::GetListNameWithColorDataFromResultsQuery ( std::vector< std::vector< std::string > >  iResultsQuery)
protected

get the data from the query results to fill a QColor and the corresponding ID

Parameters
[in]iResultsQueryvector containing results from a query with a name/ID and the corresponding rgba
Returns
std::list<NameWithColorData> list of the IDs with their corresponding QColor

Definition at line 300 of file GoDBCollectionOfTraces.cxx.

template<typename T >
std::list<T> GoDBCollectionOfTraces::GetListStructureFromDB ( vtkMySQLDatabase *  iDatabaseConnector,
unsigned int  iImgSessionID,
std::list< unsigned int >  iListTraces 
)
inline

get a list of structures filled with data from the database

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iImgSessionID
[in]iListTracesIDs for the traces to be in the list
Template Parameters
ContourMeshStructureor TrackStructure
Returns
a list of T structure

Definition at line 463 of file GoDBCollectionOfTraces.h.

std::list< unsigned int > GoDBCollectionOfTraces::GetListTimePointsFromTraceIDs ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTraceIDs 
)

get the list of timepoints for each trace in iListTraceIDs

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTraceIDslist of the IDs for the traces the timepoints are needed
Returns
all the timepoints for the traces in iListTraceIDs

Definition at line 871 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetListTracesIDsFromThisCollectionOf ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTraces 
)

get the list of IDs belonging to the iListTraces as collectionof

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTraceslist of traces IDs for which the collectionof are needed
Returns
std::list<unsigned int> list of the tracesIDs

Definition at line 697 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetListTracesIDWithNoPoints ( std::list< unsigned int >  iListTracesIDs,
vtkMySQLDatabase *  iDatabaseConnector 
)

get the list of tracesIDs that have no points

Parameters
[in]iListTracesIDslist of the tracesIDs to be checked
[in]iDatabaseConnectorconnection to the database
Returns
list of IDs for the traces that have no point and that are in iListTracesIDs

Definition at line 731 of file GoDBCollectionOfTraces.cxx.

int GoDBCollectionOfTraces::GetMaxTraceIDsForSpecificTimePoint ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTraceIDs,
unsigned int  iTimePoint 
)

get the max of the IDs for the traceIDs in iListTraceIDs that have a timepoint equal to iTimePoint

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTraceIDslist of the IDs of the traces to be checked
[in]iTimePointtimepoint for which the traceIDs are checked
Returns
the max of the traceIDs for this timepoint

Definition at line 817 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetNonMaxTraceIDsForSpecificTimePoint ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTraceIDs,
unsigned int  iTimePoint,
unsigned int  iMaxTraceID 
)

get all the traceIDs except the iMaxTraceID for the timepoint

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTraceIDslist of the IDs of the traces to be checked
[in]iTimePointtimepoint for which the traceIDs are checked
[in]iMaxTraceIDmax of the traceIDs for this timepoint
Returns
all the traceIDs for this timepoint different than the max one

Definition at line 843 of file GoDBCollectionOfTraces.cxx.

std::string GoDBCollectionOfTraces::GetPoints ( vtkMySQLDatabase *  iDatabaseConnector,
std::string  iTraceName,
unsigned int  iTraceID 
)

Definition at line 1117 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetTimePointsForTraceIDs ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTraceIDs 
)

get the timepoints (non distinct) for all the traceIDs in iListTraceIDs

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTraceIDslist of the IDs for the traces the timepoints are needed
Returns
a list of all the timepoints (non distinct)

Definition at line 924 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetTimePointWithSeveralTracesFromTheList ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTraceIDs 
)

get the list of timepoints where several traces from the list of traces have the same ones

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTraceIDslist of the IDs of the traces to be checked
Returns
list of timepoints with several traces from the list

Definition at line 798 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetTraceIDsBelongingToCollectionID ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTraceIDs,
unsigned int  iCollectionID 
)

get the tracesIDs contained in iListTraceIDs that have iCollectionID as a collectionID

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTraceIDslist of the IDs for the traces to be checked
[in]iCollectionIDID of the collection the traces need to belong to
Returns
the list of traces belonging to iCollectionID and to iListTraceIDs

Definition at line 885 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetTraceIDsBelongingToCollectionID ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListCollectionIDs 
)

get all the tracesIDs that belong to iListCollectionIDs

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListCollectionIDsIDs of the collections
Returns
the list of traces belonging to iListCollectionIDs

Definition at line 898 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetTraceIDsBelongingToListTimePoints ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTPs 
)

Definition at line 908 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetTraceIDsWithTimePointAndCollectionID ( vtkMySQLDatabase *  iDatabaseConnector,
unsigned int  iCollectionID,
unsigned int  iTimePoint 
)

get the tracesIDs from the database which have iTimePoint as TCoordMin and iCollectionID as collectionID

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iCollectionIDID of the collection
[in]iTimePointtimepoint for which the traces IDs are needed
Returns
a list of the traces IDs corresponding to this iTimePoint and iCollectionID

Definition at line 777 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetTraceIDsWithTimePointInf ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTraceIDs,
unsigned int  iTimePoint 
)

get the tracesIDs belonging to iListTraceIDs with a timepoint inf to iTimePoint

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTraceIDslist of the IDs for the traces to be checked
[in]iTimePointtimepoint to be compared
Returns
a list of all the traces with a timepoint inf to iTimePoint

Definition at line 938 of file GoDBCollectionOfTraces.cxx.

int GoDBCollectionOfTraces::GetTraceIDWithLowestTimePoint ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTraceIDs 
)

return the traceID with the lowest timepoint or -1 if there is not only one that have the lowest timepoint

Definition at line 1031 of file GoDBCollectionOfTraces.cxx.

std::list< GoDBCollectionOfTraces::NameWithColorData > GoDBCollectionOfTraces::GetTracesIDsWithColorForATimePoint ( vtkMySQLDatabase *  iDatabaseConnector,
unsigned int  iTimePoint 
)

get all the distinct traces IDs with their QColor for a given timepoint

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iTimePointtimepoint for which the tracesIDs are expected
Returns
std::list<NameWithColorData> list of the TracesIDs with their QColor

Definition at line 239 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetTrackFamiliesForLineages ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iLineagesID 
)

Definition at line 1089 of file GoDBCollectionOfTraces.cxx.

std::vector< unsigned int > GoDBCollectionOfTraces::GetTrackFamily ( vtkMySQLDatabase *  iDatabaseConnector,
unsigned int  iTrackID 
)

Definition at line 1145 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetTrackFamilyDataFromDB ( vtkMySQLDatabase *  iDatabaseConnector)

Definition at line 1067 of file GoDBCollectionOfTraces.cxx.

std::list< unsigned int > GoDBCollectionOfTraces::GetTrackFamilyID ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTrackIDs 
)

return the trackFamilyIDs the track belongs to (as a mother or as a daughter)

Definition at line 1102 of file GoDBCollectionOfTraces.cxx.

bool GoDBCollectionOfTraces::isMother ( vtkMySQLDatabase *  iDatabaseConnector,
unsigned int  iTrackID 
)

Definition at line 1170 of file GoDBCollectionOfTraces.cxx.

void GoDBCollectionOfTraces::RecalculateDBBoundingBox ( vtkMySQLDatabase *  iDatabaseConnector,
int  iCollectionID 
)

Calculate the bounding box of the corresponding collection and update it in the database.

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iCollectionIDID of the collection the bounding box is calculated

Definition at line 186 of file GoDBCollectionOfTraces.cxx.

void GoDBCollectionOfTraces::RecalculateDBBoundingBox ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTracesIDs 
)

Get the list of all the collectionIDs, distinct and different from zero for the corresponding traces IDs and recalculate the bounding boxes for them.

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTracesIDslist of the tracesIDs the collection need to be recalculated

Definition at line 200 of file GoDBCollectionOfTraces.cxx.

void GoDBCollectionOfTraces::SetCollectionInfo ( std::string  iCollectionName,
std::string  iTracesName,
std::string  iCollectionOfName 
)

fill the global values for the collection of traces.

Parameters
[in]iCollectionNamename of the collection exp: track
[in]iTracesNamename of the trace exp:mesh
[in]iCollectionOfNamename of the collectionOf exp: contour

Definition at line 75 of file GoDBCollectionOfTraces.cxx.

void GoDBCollectionOfTraces::SetImgSessionID ( unsigned int  iImgSessionID)

set m_ImgSessionID to iImgSessionID

Definition at line 93 of file GoDBCollectionOfTraces.cxx.

void GoDBCollectionOfTraces::SetTheTimePointCoordinatesForMesh ( unsigned int  iTimePoint,
int &  ioCoordIDMax,
int &  ioCoordIDMin,
vtkMySQLDatabase *  iDatabaseConnector 
)
protected

modify the timepoint to iTimePoint for the coordmax and coordmin and replace the ioCoordIDMax/Min with the new saved coordinates in the database

Parameters
[in]iTimePointTCoord to be replaced with for the coordmin and max
[in,out]ioCoordIDMaxin: ID for the coordinate max with the timepoint to be modified, out: ID of the coordinate max with the timepoint set as itimepoint
[in,out]ioCoordIDMinin: ID for the coordinate min with the timepoint to be modified, out: ID of the coordinate min with the timepoint set as itimepoint
[in]iDatabaseConnectorconnection to the database

Definition at line 517 of file GoDBCollectionOfTraces.cxx.

void GoDBCollectionOfTraces::UpdateBoundingBoxInDB ( int  iCoordIDMin,
int  iCoordIDMax,
int  iTraceID,
vtkMySQLDatabase *  iDatabaseConnector 
)
protected

Update in the database the coordid max and min of the trace.

Definition at line 678 of file GoDBCollectionOfTraces.cxx.

void GoDBCollectionOfTraces::UpdateCollectionIDOfSelectedTrace ( int  iSelectedTraceID,
int  inewCollectionID,
vtkMySQLDatabase *  DatabaseConnector 
)
protected

change the collection ID of the trace

Definition at line 160 of file GoDBCollectionOfTraces.cxx.

void GoDBCollectionOfTraces::UpdateCollectionIDOfSelectedTraces ( std::list< unsigned int >  iListSelectedTraces,
unsigned int  iCollectionID,
vtkMySQLDatabase *  iDatabaseConnector 
)

Update the collectionID of the selected traces in the DB traces table with the new collectionID.

Parameters
[in]iListSelectedTracesIDs of the traces the collectionID need to be updated
[in]iCollectionIDnew collectionID
[in]iDatabaseConnectorconnection to the database

Definition at line 139 of file GoDBCollectionOfTraces.cxx.

void GoDBCollectionOfTraces::UpdateValueForListTraces ( vtkMySQLDatabase *  iDatabaseConnector,
std::string  iNameValue,
std::string  iValue,
std::list< unsigned int >  iListTraceIDs 
)

update in the database the iNameValue with iValue for the traces from iListTraceIDs

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iNameValuename of the field in the database
[in]iValuevalue of the field
[in]iListTraceIDslist of the traces with the value to be updated

Definition at line 172 of file GoDBCollectionOfTraces.cxx.

Member Data Documentation

std::string GoDBCollectionOfTraces::m_CollectionIDName
protected

Definition at line 511 of file GoDBCollectionOfTraces.h.

std::string GoDBCollectionOfTraces::m_CollectionName
protected

Definition at line 510 of file GoDBCollectionOfTraces.h.

std::string GoDBCollectionOfTraces::m_CollectionOfIDName
protected

Definition at line 515 of file GoDBCollectionOfTraces.h.

std::string GoDBCollectionOfTraces::m_CollectionOfName
protected

Definition at line 514 of file GoDBCollectionOfTraces.h.

unsigned int GoDBCollectionOfTraces::m_ImgSessionID
protected

Definition at line 516 of file GoDBCollectionOfTraces.h.

std::string GoDBCollectionOfTraces::m_TracesIDName
protected

Definition at line 513 of file GoDBCollectionOfTraces.h.

std::string GoDBCollectionOfTraces::m_TracesName
protected

Definition at line 512 of file GoDBCollectionOfTraces.h.


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