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

This class manages the database queries, the table widget and the data from the database in the Container for visu for the meshes ,. More...

#include <Code/GUI/lib/DBManager/QGoDBMeshManager.h>

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

Public Slots

QString CheckExistingMeshesForTheTrack (unsigned int iTrackID, vtkMySQLDatabase *iDatabaseConnector, int iTCoord)
 if the track has already a mesh assigned for the current timepoint, the track of the previous mesh will be reassigned to 0 and a message will be displayed in the statusbar More...
 
QString CheckExistingMeshesForTheTrack (unsigned int iTrackID, vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > &ioListMeshIDs, std::list< unsigned int > &ioNullListMeshIDs)
 
std::string CheckListMeshesFromDifferentTimePoints (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListMeshIDs, std::list< unsigned int > &ioListMeshIDsToBePartOfTrack, std::list< unsigned int > &ioListMeshIDsToReassign)
 check if in the iListMeshIDs, several have the same timepoint, if so, return the list of meshIDs that need to be reassigned to 0 and modify the ioListMeshIDsToBePartOfTrack with only one meshid (the max one of several meshid for the same timepoint) per timepoint More...
 
std::map< unsigned int, double * > GetMeshesInfoForImportedMesh (std::list< unsigned int > iMeshesIDs)
 get the coordinate info for meshes needed for the visu for imported tracks More...
 
std::list< unsigned int > GetMeshesWithTimePointInfToTheCheckedOne (unsigned int iTrackID, vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListMeshesBelongingToTrack)
 for the track, get the list of its meshes with a timepoint inferior than the checked mesh More...
 
unsigned int ReassignTrackIDForPreviousMeshWithSameTimePoint (vtkMySQLDatabase *iDatabaseConnector, unsigned int iTrackID, unsigned int iTimePoint)
 check in the database if there is an existing mesh belonging to iTrackID with iTimePoint, if yes, reassign the trackID to 0 and return the ID of the mesh with the new trackID set to 0. More...
 

Public Member Functions

void AddInfoInTWAndVisuContainerForMeshesForSpecificTPs (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTPs)
 
void CleanTWAndContainerForGivenTimePoint (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iTimePoints)
 
unsigned int CreateNewMeshWithNoContourNoPoints (vtkMySQLDatabase *iDatabaseConnector)
 
virtual void DeleteCheckedTraces (vtkMySQLDatabase *iDatabaseConnector)
 delete the checked traces from the database, the TW and the container for visu More...
 
void DisplayInfoAndLoadVisuContainerForAllMeshes (vtkMySQLDatabase *iDatabaseConnector)
 get all the data from the database to load all the meshes for the imagingsession into the table widget and the container for the visu More...
 
void DisplayInfoAndLoadVisuContainerForAllMeshesForSpecificTPs (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTPs)
 
virtual void DisplayInfoForExistingTrace (vtkMySQLDatabase *iDatabaseConnector, int iTraceID)
 Virtual pure method: get the data needed from the database for the existing trace with iTraceID and update the corresponding row in the m_Table. More...
 
void DisplayInfoForExistingTraceForMesh (vtkMySQLDatabase *iDatabaseConnector, int iTraceID, GoFigureMeshAttributes *iMeshAttributes)
 
void DisplayInfoForLastCreatedMesh (vtkMySQLDatabase *iDatabaseConnector, GoFigureMeshAttributes *iMeshAttributes)
 
virtual void DisplayInfoForLastCreatedTrace (vtkMySQLDatabase *iDatabaseConnector)
 Virtual pure method: get the data needed from the database for the last created trace and display them in a new inserted row of the m_Table. More...
 
void DisplayOnlyVolumeAreaForExistingMesh (GoFigureMeshAttributes *iMeshAttributes, unsigned iMeshID)
 display in the TW the volume and area extracted from iMeshAttributes called when loading all meshes from database when opening an imagingsession More...
 
virtual std::list
< NameWithColorData
GetAllTraceIDsWithColor (vtkMySQLDatabase *iDatabaseConnector, std::string &ioIDToSelect)
 return the distinct traces with their color for the imagingsession, for all timepoints if the timepoint is set to the default one or for the corresponding timepoint if not More...
 
virtual std::list< unsigned int > GetListHighlightedIDs ()
 
std::list< std::pair< unsigned
int, double > > 
GetListVolumes ()
 Get volume of checked mesh IDs. More...
 
std::list< std::pair< unsigned
int, double > > 
GetListVolumes (const std::list< unsigned int > &iMeshIDs)
 Get volume of given mesh IDs. More...
 
MeshContainerGetMeshesInfoFromDBAndCreateContainerForVisu (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListCollectionIDs)
 get the info needed from the database for the meshes who belongs to the collectionIDs contained in iListCollectionIDs and create a new container for visu for these meshes More...
 
double GetVolume (unsigned int iMeshID)
 Get volume of given mesh ID. More...
 
void ModifyTrackIDInVisuContainer (unsigned int iTrackID, const std::list< unsigned int > &iToTrack, const std::list< unsigned int > &iToNull)
 
 QGoDBMeshManager (int iImgSessionID, QWidget *iparent)
 
void RemoveTracesFromTWAndContainerForVisuForSpecificTPs (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTPs)
 
void SaveGeneratedMeshFromVisu (unsigned int iXCoordMin, unsigned int iYCoordMin, unsigned int iZCoordMin, unsigned int iXCoordMax, unsigned int iYCoordMax, unsigned int iZCoordMax, vtkPolyData *iTraceNodes, vtkMySQLDatabase *iDatabaseConnector, GoFigureMeshAttributes *iMeshAttributes)
 
unsigned int SaveNewMeshFromVisu (unsigned int iXCoordMin, unsigned int iYCoordMin, unsigned int iZCoordMin, unsigned int iXCoordMax, unsigned int iYCoordMax, unsigned int iZCoordMax, int iTShift, vtkPolyData *iTraceNodes, vtkMySQLDatabase *iDatabaseConnector, GoFigureMeshAttributes *iMeshAttributes)
 
unsigned int SaveNewMeshFromVisu (unsigned int iXCoordMin, unsigned int iYCoordMin, unsigned int iZCoordMin, unsigned int iXCoordMax, unsigned int iYCoordMax, unsigned int iZCoordMax, int iTShift, vtkPolyData *iTraceNodes, vtkMySQLDatabase *iDatabaseConnector, GoFigureMeshAttributes *iMeshAttributes, unsigned int iTrackID)
 
unsigned int SaveNewMeshWithNoTrackFromVisu (unsigned int iXCoordMin, unsigned int iYCoordMin, unsigned int iZCoordMin, unsigned int iXCoordMax, unsigned int iYCoordMax, unsigned int iZCoordMax, int iTShift, vtkPolyData *iTraceNodes, vtkMySQLDatabase *iDatabaseConnector, GoFigureMeshAttributes *iMeshAttributes)
 
void SetMeshesInfoContainerForVisu (MeshContainer *iContainerForVisu)
 set the m_MeshContainerInfoForVisu to the iContainerForVisu More...
 
void SetSelectedCellType (std::string *iCellType)
 set the m_SelectedCelltype to iCelltype More...
 
void SetSelectedSubCellType (std::string *iSubCellType)
 set the m_SelectedSubCelltype to iSubCelltype More...
 
void UpdateBoundingBoxes (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTracesIDs)
 update the bounding boxes for the meshes with no points More...
 
std::list< unsigned int > UpdateTheTracesColor (vtkMySQLDatabase *iDatabaseConnector)
 virtual pure method in QGoDBTraceManager More...
 
virtual void UpdateTWAndContainerForImportedTraces (const std::vector< int > &iVectorImportedTraces, vtkMySQLDatabase *iDatabaseConnector)
 get the data needed from the database for the imported traces,display them in new inserted rows of the m_Table and update the container for the visu. More...
 
 ~QGoDBMeshManager ()
 
- Public Member Functions inherited from QGoDBTraceManager
void CheckShowRows ()
 if m_IsShowOnlyCurrentTimePointOn is true, call the method to show only the rows for the current timepoint, useful when the timepoint changes More...
 
void DisplayInfoForExistingTraces (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTraces)
 get the data from the database corresponding to the iListTraces and display them in the Table Widget More...
 
std::list< unsigned int > GetLastCreatedTracesIDs (vtkMySQLDatabase *iDatabaseConnector, int iNumberOfTracesIDs)
 get the last saved traces in the database More...
 
std::list< unsigned int > GetListCollectionIDs (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTracesIDs)
 return the list of collection IDs distinct and different from zero corresponding to the tracesIDs More...
 
std::list< unsigned int > GetListTracesIDsBelongingToCollectionIDs (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListCollectionIDs)
 get the list of tracesIDs belonging to the collection listed in iListCollectionIDs More...
 
std::list< unsigned int > GetListTracesIDsFromThisCollectionOf (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTraces)
 get the collectionOf IDs for the TracesIDs found in iListTraces More...
 
QGoTableWidgetGetTableWidget ()
 get the m_Table More...
 
 QGoDBTraceManager (QObject *iParent=NULL)
 
void SetCurrentTimePoint (int *iTimePoint)
 set the pointer to the current timepoint More...
 
void SetDatabaseConnection (vtkMySQLDatabase *iDatabaseConnector)
 set the m_DatabaseConnection to iDatabaseConnector More...
 
void SetSelectedCollection (NameWithColorData *iCollectionData)
 set the pointer to the selected collection data More...
 
void SetSelectedColor (NameWithColorData *iColorData)
 set the pointer to the current selected color More...
 
virtual void UpdateBoundingBoxes (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTracesIDs, bool UpdateTW=true)
 update in the database the bounding boxes corresponding to the TracesIDs and update the corresponding rows in the TW if the bool is set to true. More...
 
void UpdateCollectionID (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTracesIDs, int iCollectionID)
 update the collectionID of the tracesIDs in the list with the iCollectionID in the database and the TW More...
 
void UpdateLastSelectedOneAsCollection ()
 
void UpdateTWAndContainerForDeletedTraces (const std::list< unsigned int > &iTraceIDs)
 delete the corresponding traces in the table widget and in the container for visu More...
 
virtual ~QGoDBTraceManager ()
 

Protected Slots

virtual void SetColorCoding (bool IsChecked)
 
void UpdateCellType ()
 update the celltype of the checked meshes with the selected one More...
 
virtual void UpdateHighlightedElementsInVisuContainer (int iTraceID)
 
void UpdateSubCellType ()
 update the subcelltype of the checked meshes with the selected one More...
 
virtual void UpdateVisibleElementsInVisuContainer (int iTraceID)
 
- Protected Slots inherited from QGoDBTraceManager
virtual void AddToSelectedCollection ()
 
virtual void ChangeTraceColor ()
 is called when the user choses the change color action in the context menu, emit the signal TraceColorToChange as it impacts the collectionOf also More...
 
void CheckSelectedRows ()
 
void CheckTheTraceInTW (unsigned int iTraceID, Qt::CheckState iState)
 slot called when a trace has been picked from the visu, to update the TW "checked/unchecked" column correspondingly More...
 
void CreateContextMenu (const QPoint &iPos)
 create the context menu when the user clicks on the table widget More...
 
virtual void CreateCorrespondingCollection ()
 slot called when the user click on "create a collection from checked traces" in the context menu, emit the signal NewCollectionFromCheckedTraces as it impact the collection also More...
 
void DeleteTracesFromContextMenu ()
 
void GoToTheTrace ()
 
void HideSelectedRows ()
 
virtual void SetColorCoding (bool IsChecked)=0
 ColorCode the traces in the visualization base on a selected column in the table widget. More...
 
void ShowOnlyRowsForCurrentTimePoint (bool IsChecked)
 Show only the rows in the table widget that have a timepoint equal to the current timepoint if IsChecked is true, show all the rows if false. More...
 
void ShowSelectedRows ()
 
void ShowTheTraceInTW (unsigned int iTraceID, Qt::CheckState iState)
 slot called when a trace has been shown/hidden from the visu, to update the TW "show/hide" column correspondingly More...
 
void UncheckSelectedRows ()
 
virtual void UpdateHighlightedElementsInVisuContainer (int iTraceID)=0
 modify to the opposite one the highlighted property of the corresponding trace base on traceID in the container for visu More...
 
virtual void UpdateVisibleElementsInVisuContainer (int iTraceID)=0
 modify to the opposite one the Visible property of the corresponding trace base on traceID in the container for visu More...
 

Protected Member Functions

virtual void AddActionsContextMenu (QMenu *iMenu)
 
void AddInfoForMeshesInTWForSpecificTPs (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTPs)
 
virtual void DisplayInfoForAllTraces (vtkMySQLDatabase *iDatabaseConnector)
 Virtual pure method: get the data needed from the database and display them in the m_Table for all traces corresponding to the imagingsession. More...
 
virtual void DisplayInfoForTracesForSpecificTPs (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTPs)
 
std::pair< unsigned int,
unsigned int > 
GetInfoForTheOnlyOneCheckedMeshOfTheTrack (vtkMySQLDatabase *iDatabaseConnector, unsigned int iTrackID)
 check that there is one and only one mesh checked belonging to the track and return its ID and its timepoint More...
 
virtual void GetTracesInfoFromDBAndModifyContainerForVisu (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iVectIDs=std::list< unsigned int >())
 get the info needed from the database to update the container for visu More...
 
void PrintValuesForMeshWithNoPoints (unsigned int iTraceID)
 
virtual void SetCollectionsTraceNames ()
 virtual pure method: set the std::string class members More...
 
void SetMeshBoundingBoxAndPoints (unsigned int iXCoordMin, unsigned int iYCoordMin, unsigned int iZCoordMin, unsigned int iXCoordMax, unsigned int iYCoordMax, unsigned int iZCoordMax, vtkPolyData *iTraceNodes, vtkMySQLDatabase *iDatabaseConnector, GoDBMeshRow &iMesh, GoFigureMeshAttributes *iMeshAttributes, int iShift=0)
 
- Protected Member Functions inherited from QGoDBTraceManager
virtual void AddActionForAddingCheckedTracesToCollection ()
 
void AddGeneralActionsContextMenu (QMenu *iMenu)
 
void AddSpecificActionsForContourMesh (QMenu *iMenu)
 
bool CheckThatThereAreTracesToDelete (const std::list< unsigned int > &iListTracesIDToDelete)
 
template<typename T >
unsigned int CreateNewTraceInDBFromVisu (unsigned int iXCoordMin, unsigned int iYCoordMin, unsigned int iZCoordMin, unsigned int iTCoord, unsigned int iXCoordMax, unsigned int iYCoordMax, unsigned int iZCoordMax, vtkPolyData *iTraceNodes, NameWithColorData iColor, vtkMySQLDatabase *iDatabaseConnector, T &iTrace, unsigned int iCollectionID, unsigned int iTCoordMax=0)
 create the trace row with the related data provided by the visu, iTCoordMax is equal to 0 as for contour and mesh, it is the same as TCoord More...
 
template<typename T >
void DeleteTracesTemplate (vtkMySQLDatabase *iDatabaseConnector, T *iContainerForVisu, std::list< unsigned int > iListTracesToDelete=std::list< unsigned int >(), bool DeleteHighlightedTraces=true)
 delete the traces from the database, the TW and the container for visu More...
 
template<typename T >
void DisplayInfoAndLoadVisuContainerWithAllTraces (T *iTWContainer, vtkMySQLDatabase *iDatabaseConnector)
 get all the data from the database to load all the traces for the imagingsession into the table widget and the container for the visu More...
 
template<typename C >
void DisplayInfoAndLoadVisuContainerWithAllTracesForSpecificTPs (vtkMySQLDatabase *iDatabaseConnector, C *iContainerForVisu, const std::list< unsigned int > &iListTPs)
 
template<typename T >
void DisplayInfoForAllTracesTemplate (T *iTWContainer, vtkMySQLDatabase *iDatabaseConnector, Qt::CheckState iState, int iIndexShowColumn=0)
 fill the TWContainer with all the data needed from the database and display them into the m_Table More...
 
template<typename T >
void DisplayInfoForExistingTraceTemplate (T *iTWContainer, vtkMySQLDatabase *iDatabaseConnector, int iTraceID)
 fill the TWContainer with the data needed from the database for the trace with the iTraceID and update the corresponding row into the m_Table More...
 
template<typename T >
void DisplayInfoForLastCreatedTraceTemplate (T *iTWContainer, vtkMySQLDatabase *iDatabaseConnector)
 fill the TWContainer with the data needed from the database for the last created trace and insert a new row into the m_Table to display them More...
 
template<typename T >
void DisplayInfoForTracesForSpecificTPsTemplate (T *iTWContainer, vtkMySQLDatabase *iDatabaseConnector, Qt::CheckState iState, const std::list< unsigned int > &iListTPs, int iIndexShowColumn=0)
 
GoDBCoordinateRow GetCoordinateFromInt (int iXCoord, int iYCoord, int iZCoord, int iTCoord)
 create a GoDBCoordinateRow and set its fields X,Y,Z,Tcoord More...
 
int GetLastCreatedTraceID (vtkMySQLDatabase *iDatabaseConnector)
 get the ID for the last created trace in the database More...
 
std::string GetTheNameIDFromName (std::string iName)
 transform the iName into iNameID More...
 
template<typename C , typename S >
void GetTracesInfoFromDBAndModifyContainerForVisu (vtkMySQLDatabase *iDatabaseConnector, std::vector< int > iVectIDs, C *iContainerForVisu)
 
template<typename T >
void GetTracesInfoFromDBAndModifyContainerForVisuTemplate (T *iContainerForVisu, vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTraceIDs)
 get the info needed from the database to fill the container for visu More...
 
double * GetVectorFromQColor (QColor iColor)
 return a double rgba[4] from a QColor More...
 
template<typename C >
void RemoveTracesFromTWAndContainerForVisuForSpecificTPsTemplate (vtkMySQLDatabase *iDatabaseConnector, C *iContainerForVisu, const std::list< unsigned int > &iListTPs)
 
template<typename T >
void SetColorCodingTemplate (T *iContainerForVisu, bool IsChecked)
 get a map with the tracesIDs as keys and the values of the selected columns as values for all traces in the table widget and update the color of the traces in the visu More...
 
void SetInfo (unsigned int iImgSessionID, QWidget *iParent)
 set the variables class members More...
 
template<typename T >
void SetTraceBoundingBoxAndPoints (unsigned int iXCoordMin, unsigned int iYCoordMin, unsigned int iZCoordMin, unsigned int iTCoord, unsigned int iXCoordMax, unsigned int iYCoordMax, unsigned int iZCoordMax, vtkPolyData *iTraceNodes, vtkMySQLDatabase *iDatabaseConnector, T &iTrace, unsigned int iTCoordMax=0)
 
template<typename T >
void SetTracesInfoContainerForVisuTemplate (T *iContainerForVisu, T **iMemberContainerForVisu)
 set the iMemberContainerInfoForVisu to the iContainerForVisu and create the connections SLOT/SIGNAL More...
 
template<typename T , typename C >
std::list< unsigned int > UpdateTheTracesColorTemplate (vtkMySQLDatabase *iDatabaseConnector, C *iContainerInfoForVisu)
 update the visu container, the database and the TW with the user selected color for the highlighted traces More...
 
template<typename T >
void UpdateTWAndContainerWithImportedTracesTemplate (T *iTWContainer, const std::vector< int > &iVectorTraceIDs, vtkMySQLDatabase *iDatabaseConnector)
 update for the imported traces the table widget and the database info of the container for visu. More...
 

Protected Attributes

MeshContainerm_MeshContainerInfoForVisu
 
std::string * m_SelectedCellType
 
std::string * m_SelectedSubCellType
 
GoDBTWContainerForMeshm_TWContainer
 
- Protected Attributes inherited from QGoDBTraceManager
QMenu * m_CheckedTracesMenu
 
std::string m_CollectionName
 
std::string m_CollectionNameID
 
std::string m_CollectionOf
 
std::string m_CollectionOfID
 
GoDBCollectionOfTracesm_CollectionOfTraces
 
int * m_CurrentTimePoint
 
vtkMySQLDatabase * m_DatabaseConnector
 
int m_ImgSessionID
 
bool m_IsColorCodingOn
 
bool m_IsShowOnlyCurrentTimePointOn
 
std::string m_LastSelectedTraceAsCollection
 
NameWithColorDatam_SelectedCollectionData
 
NameWithColorDatam_SelectedColorData
 
QGoTableWidgetm_Table
 
std::string m_TraceName
 
std::string m_TraceNameID
 

Additional Inherited Members

- Public Types inherited from QGoDBTraceManager
typedef std::pair< unsigned
int, QColor > 
IDWithColorData
 
typedef std::pair< std::string,
QColor > 
NameWithColorData
 
typedef
GoDBTableWidgetContainer::TWContainerType 
TWContainerType
 
- Signals inherited from QGoDBTraceManager
void AddNewTraceIDInTS (std::pair< std::string, QColor > iTraceToAddData)
 signal emitted when a new trace is created that need to be added in the trace settings widget. (when a new mesh is created while contour table is displayed for example) More...
 
void CheckedTracesToAddToSelectedCollection (std::list< unsigned int >)
 
void CheckedTracesToDelete ()
 signal emitted when the user click on the action "DeleteTraces" from the context menu as it can impact different TraceManagers More...
 
void DBConnectionNotNeededAnymore ()
 
void NeedToGetDatabaseConnection ()
 
void NeedToGoToTheLocation (int XCoord, int YCoord, int ZCoord, int TCoord)
 signal emitted when the user clicks on "go to the trace" in the context menu and return the coordinates for the center of the bounding box of the trace More...
 
void NewCollectionFromCheckedTraces (std::list< unsigned int >)
 signal emitted when the user clicks on "create a new collection from checked traces" in the context menu and return the list of checked tracesIDs More...
 
void PrintMessage (QString iMessage, int iTimeOut=0)
 
void TraceColorToChange ()
 signal emitted when the user click on the action "change color" from the context menu as it can impact different TraceManagers More...
 

Detailed Description

This class manages the database queries, the table widget and the data from the database in the Container for visu for the meshes ,.

Definition at line 52 of file QGoDBMeshManager.h.

Constructor & Destructor Documentation

QGoDBMeshManager::QGoDBMeshManager ( int  iImgSessionID,
QWidget *  iparent 
)

Definition at line 40 of file QGoDBMeshManager.cxx.

QGoDBMeshManager::~QGoDBMeshManager ( )

Definition at line 51 of file QGoDBMeshManager.cxx.

Member Function Documentation

void QGoDBMeshManager::AddActionsContextMenu ( QMenu *  iMenu)
protectedvirtual

Reimplemented from QGoDBTraceManager.

Definition at line 243 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::AddInfoForMeshesInTWForSpecificTPs ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListTPs 
)
protected

Definition at line 124 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::AddInfoInTWAndVisuContainerForMeshesForSpecificTPs ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListTPs 
)
Todo:
Nico: implement a method that get list_of_traces as argument and as this list of structure in the container for visu

Definition at line 102 of file QGoDBMeshManager.cxx.

QString QGoDBMeshManager::CheckExistingMeshesForTheTrack ( unsigned int  iTrackID,
vtkMySQLDatabase *  iDatabaseConnector,
int  iTCoord 
)
slot

if the track has already a mesh assigned for the current timepoint, the track of the previous mesh will be reassigned to 0 and a message will be displayed in the statusbar

Parameters
[in]iTrackIDID of the track to be checked
[in]iDatabaseConnectorconnection to the database
[in]iShiftvalue to be added to the current timepoint
Returns
a message to be print in the status bar of the mainwindow, if no meshes reassigned, the message will be ""

Definition at line 641 of file QGoDBMeshManager.cxx.

QString QGoDBMeshManager::CheckExistingMeshesForTheTrack ( unsigned int  iTrackID,
vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int > &  ioListMeshIDs,
std::list< unsigned int > &  ioNullListMeshIDs 
)
slot

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 663 of file QGoDBMeshManager.cxx.

std::string QGoDBMeshManager::CheckListMeshesFromDifferentTimePoints ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListMeshIDs,
std::list< unsigned int > &  ioListMeshIDsToBePartOfTrack,
std::list< unsigned int > &  ioListMeshIDsToReassign 
)
slot

check if in the iListMeshIDs, several have the same timepoint, if so, return the list of meshIDs that need to be reassigned to 0 and modify the ioListMeshIDsToBePartOfTrack with only one meshid (the max one of several meshid for the same timepoint) per timepoint

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListMeshIDslist of the meshIDs to be checked
[in,out]ioListMeshIDsToBePartOfTracklist of meshIDs with only one per timepoint
[in,out]ioListMeshIDsToReassignlist of meshIDs that will not be part of the track
Returns
message to be printed in the status bar with the list of meshIDs that won't be part of the selected trackid

Definition at line 708 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::CleanTWAndContainerForGivenTimePoint ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iTimePoints 
)

Definition at line 924 of file QGoDBMeshManager.cxx.

unsigned int QGoDBMeshManager::CreateNewMeshWithNoContourNoPoints ( vtkMySQLDatabase *  iDatabaseConnector)

Definition at line 353 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::DeleteCheckedTraces ( vtkMySQLDatabase *  iDatabaseConnector)
virtual

delete the checked traces from the database, the TW and the container for visu

Parameters
[in]iDatabaseConnectorconnection to the database

Implements QGoDBTraceManager.

Definition at line 462 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::DisplayInfoAndLoadVisuContainerForAllMeshes ( vtkMySQLDatabase *  iDatabaseConnector)

get all the data from the database to load all the meshes for the imagingsession into the table widget and the container for the visu

Parameters
[in]iDatabaseConnectorconnection to the database

Definition at line 82 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::DisplayInfoAndLoadVisuContainerForAllMeshesForSpecificTPs ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListTPs 
)

Definition at line 92 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::DisplayInfoForAllTraces ( vtkMySQLDatabase *  iDatabaseConnector)
protectedvirtual

Virtual pure method: get the data needed from the database and display them in the m_Table for all traces corresponding to the imagingsession.

Parameters
[in]iDatabaseConnectorconnection to the database

Implements QGoDBTraceManager.

Definition at line 148 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::DisplayInfoForExistingTrace ( vtkMySQLDatabase *  iDatabaseConnector,
int  iTraceID 
)
virtual

Virtual pure method: get the data needed from the database for the existing trace with iTraceID and update the corresponding row in the m_Table.

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iTraceIDID of the trace

Implements QGoDBTraceManager.

Definition at line 222 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::DisplayInfoForExistingTraceForMesh ( vtkMySQLDatabase *  iDatabaseConnector,
int  iTraceID,
GoFigureMeshAttributes iMeshAttributes 
)

Definition at line 232 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::DisplayInfoForLastCreatedMesh ( vtkMySQLDatabase *  iDatabaseConnector,
GoFigureMeshAttributes iMeshAttributes 
)

Definition at line 212 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::DisplayInfoForLastCreatedTrace ( vtkMySQLDatabase *  iDatabaseConnector)
virtual

Virtual pure method: get the data needed from the database for the last created trace and display them in a new inserted row of the m_Table.

Parameters
[in]iDatabaseConnectorconnection to the database

Implements QGoDBTraceManager.

Definition at line 184 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::DisplayInfoForTracesForSpecificTPs ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListTPs 
)
protectedvirtual

Implements QGoDBTraceManager.

Definition at line 161 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::DisplayOnlyVolumeAreaForExistingMesh ( GoFigureMeshAttributes iMeshAttributes,
unsigned  iMeshID 
)

display in the TW the volume and area extracted from iMeshAttributes called when loading all meshes from database when opening an imagingsession

Parameters
[in]iMeshAttributescomputed values for a mesh
[in]iMeshIDmeshID of the mesh we want to display the volume and area

Definition at line 194 of file QGoDBMeshManager.cxx.

std::list< QGoDBTraceManager::NameWithColorData > QGoDBMeshManager::GetAllTraceIDsWithColor ( vtkMySQLDatabase *  iDatabaseConnector,
std::string &  ioIDToSelect 
)
virtual

return the distinct traces with their color for the imagingsession, for all timepoints if the timepoint is set to the default one or for the corresponding timepoint if not

Parameters
[in]iDatabaseConnectorconnection to the database
[in]ioIDToSelectID to be selected in the combobox
Returns
a list of the tracesIDs with their corresponding QColor

Reimplemented from QGoDBTraceManager.

Definition at line 851 of file QGoDBMeshManager.cxx.

std::pair< unsigned int, unsigned int > QGoDBMeshManager::GetInfoForTheOnlyOneCheckedMeshOfTheTrack ( vtkMySQLDatabase *  iDatabaseConnector,
unsigned int  iTrackID 
)
protected

check that there is one and only one mesh checked belonging to the track and return its ID and its timepoint

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iTrackIDID of the track the mesh belongs to
Returns
a pair with the meshID as first and the timepoint as second

Definition at line 804 of file QGoDBMeshManager.cxx.

std::list< unsigned int > QGoDBMeshManager::GetListHighlightedIDs ( )
virtual
Returns
the list of traceIDs that have highlighted set to true in the ContainerForVisu.

Implements QGoDBTraceManager.

Definition at line 471 of file QGoDBMeshManager.cxx.

std::list< std::pair< unsigned int, double > > QGoDBMeshManager::GetListVolumes ( )

Get volume of checked mesh IDs.

Definition at line 863 of file QGoDBMeshManager.cxx.

std::list< std::pair< unsigned int, double > > QGoDBMeshManager::GetListVolumes ( const std::list< unsigned int > &  iMeshIDs)

Get volume of given mesh IDs.

Definition at line 890 of file QGoDBMeshManager.cxx.

std::map< unsigned int, double * > QGoDBMeshManager::GetMeshesInfoForImportedMesh ( std::list< unsigned int >  iMeshesIDs)
slot

get the coordinate info for meshes needed for the visu for imported tracks

Parameters
[in]iMeshesIDslist of meshes IDs the info are needed
Returns
a map with IDs as keys and info as value

Definition at line 534 of file QGoDBMeshManager.cxx.

MeshContainer * QGoDBMeshManager::GetMeshesInfoFromDBAndCreateContainerForVisu ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListCollectionIDs 
)

get the info needed from the database for the meshes who belongs to the collectionIDs contained in iListCollectionIDs and create a new container for visu for these meshes

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListCollectionIDslist of collectionIDs of the meshes needed
Returns
a container for meshes for the visu

Definition at line 508 of file QGoDBMeshManager.cxx.

std::list< unsigned int > QGoDBMeshManager::GetMeshesWithTimePointInfToTheCheckedOne ( unsigned int  iTrackID,
vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListMeshesBelongingToTrack 
)
slot

for the track, get the list of its meshes with a timepoint inferior than the checked mesh

Parameters
[in]iTrackIDID of the track
[in]iDatabaseConnectorconnection to the database
[in]iListMeshesBelongingToTracklist of the meshes belonging to this track
Returns
list of the meshes with a timepoint inferior than the checked mesh

Definition at line 785 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::GetTracesInfoFromDBAndModifyContainerForVisu ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTraceIDs = std::list< unsigned int >() 
)
protectedvirtual

get the info needed from the database to update the container for visu

Implements QGoDBTraceManager.

Definition at line 498 of file QGoDBMeshManager.cxx.

double QGoDBMeshManager::GetVolume ( unsigned int  iMeshID)

Get volume of given mesh ID.

Definition at line 915 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::ModifyTrackIDInVisuContainer ( unsigned int  iTrackID,
const std::list< unsigned int > &  iToTrack,
const std::list< unsigned int > &  iToNull 
)

Definition at line 935 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::PrintValuesForMeshWithNoPoints ( unsigned int  iTraceID)
protected
unsigned int QGoDBMeshManager::ReassignTrackIDForPreviousMeshWithSameTimePoint ( vtkMySQLDatabase *  iDatabaseConnector,
unsigned int  iTrackID,
unsigned int  iTimePoint 
)
slot

check in the database if there is an existing mesh belonging to iTrackID with iTimePoint, if yes, reassign the trackID to 0 and return the ID of the mesh with the new trackID set to 0.

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iTrackIDID of the track
[in]iTimePointtimepoint to be checked
Returns
meshID of the mesh on the same timepoint which trackID is reassigned to 0

Definition at line 604 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::RemoveTracesFromTWAndContainerForVisuForSpecificTPs ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListTPs 
)

Definition at line 173 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::SaveGeneratedMeshFromVisu ( unsigned int  iXCoordMin,
unsigned int  iYCoordMin,
unsigned int  iZCoordMin,
unsigned int  iXCoordMax,
unsigned int  iYCoordMax,
unsigned int  iZCoordMax,
vtkPolyData *  iTraceNodes,
vtkMySQLDatabase *  iDatabaseConnector,
GoFigureMeshAttributes iMeshAttributes 
)

Definition at line 319 of file QGoDBMeshManager.cxx.

unsigned int QGoDBMeshManager::SaveNewMeshFromVisu ( unsigned int  iXCoordMin,
unsigned int  iYCoordMin,
unsigned int  iZCoordMin,
unsigned int  iXCoordMax,
unsigned int  iYCoordMax,
unsigned int  iZCoordMax,
int  iTShift,
vtkPolyData *  iTraceNodes,
vtkMySQLDatabase *  iDatabaseConnector,
GoFigureMeshAttributes iMeshAttributes 
)

Definition at line 290 of file QGoDBMeshManager.cxx.

unsigned int QGoDBMeshManager::SaveNewMeshFromVisu ( unsigned int  iXCoordMin,
unsigned int  iYCoordMin,
unsigned int  iZCoordMin,
unsigned int  iXCoordMax,
unsigned int  iYCoordMax,
unsigned int  iZCoordMax,
int  iTShift,
vtkPolyData *  iTraceNodes,
vtkMySQLDatabase *  iDatabaseConnector,
GoFigureMeshAttributes iMeshAttributes,
unsigned int  iTrackID 
)

Definition at line 258 of file QGoDBMeshManager.cxx.

unsigned int QGoDBMeshManager::SaveNewMeshWithNoTrackFromVisu ( unsigned int  iXCoordMin,
unsigned int  iYCoordMin,
unsigned int  iZCoordMin,
unsigned int  iXCoordMax,
unsigned int  iYCoordMax,
unsigned int  iZCoordMax,
int  iTShift,
vtkPolyData *  iTraceNodes,
vtkMySQLDatabase *  iDatabaseConnector,
GoFigureMeshAttributes iMeshAttributes 
)

Definition at line 305 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::SetCollectionsTraceNames ( )
protectedvirtual

virtual pure method: set the std::string class members

Implements QGoDBTraceManager.

Definition at line 72 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::SetColorCoding ( bool  IsChecked)
protectedvirtualslot

Definition at line 543 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::SetMeshBoundingBoxAndPoints ( unsigned int  iXCoordMin,
unsigned int  iYCoordMin,
unsigned int  iZCoordMin,
unsigned int  iXCoordMax,
unsigned int  iYCoordMax,
unsigned int  iZCoordMax,
vtkPolyData *  iTraceNodes,
vtkMySQLDatabase *  iDatabaseConnector,
GoDBMeshRow iMesh,
GoFigureMeshAttributes iMeshAttributes,
int  iShift = 0 
)
protected

Definition at line 421 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::SetMeshesInfoContainerForVisu ( MeshContainer iContainerForVisu)

set the m_MeshContainerInfoForVisu to the iContainerForVisu

Parameters
[in]iContainerForVisucommon container for the visu and database

Definition at line 62 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::SetSelectedCellType ( std::string *  iCellType)

set the m_SelectedCelltype to iCelltype

Parameters
[in]iCellTypename of the celltype

Definition at line 552 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::SetSelectedSubCellType ( std::string *  iSubCellType)

set the m_SelectedSubCelltype to iSubCelltype

Parameters
[in]iSubCellTypename of the subcelltype

Definition at line 560 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::UpdateBoundingBoxes ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListTracesIDs 
)

update the bounding boxes for the meshes with no points

Definition at line 406 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::UpdateCellType ( )
protectedslot

update the celltype of the checked meshes with the selected one

Definition at line 568 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::UpdateHighlightedElementsInVisuContainer ( int  iTraceID)
protectedvirtualslot

Definition at line 479 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::UpdateSubCellType ( )
protectedslot

update the subcelltype of the checked meshes with the selected one

Definition at line 586 of file QGoDBMeshManager.cxx.

std::list< unsigned int > QGoDBMeshManager::UpdateTheTracesColor ( vtkMySQLDatabase *  iDatabaseConnector)
virtual

virtual pure method in QGoDBTraceManager

Implements QGoDBTraceManager.

Definition at line 395 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::UpdateTWAndContainerForImportedTraces ( const std::vector< int > &  iVectorImportedTraces,
vtkMySQLDatabase *  iDatabaseConnector 
)
virtual

get the data needed from the database for the imported traces,display them in new inserted rows of the m_Table and update the container for the visu.

Parameters
[in]iVectorImportedTracesIDs of the imported traces
[in]iDatabaseConnectorconnection to the database

Implements QGoDBTraceManager.

Definition at line 446 of file QGoDBMeshManager.cxx.

void QGoDBMeshManager::UpdateVisibleElementsInVisuContainer ( int  iTraceID)
protectedvirtualslot

Definition at line 489 of file QGoDBMeshManager.cxx.

Member Data Documentation

MeshContainer* QGoDBMeshManager::m_MeshContainerInfoForVisu
protected

Definition at line 303 of file QGoDBMeshManager.h.

std::string* QGoDBMeshManager::m_SelectedCellType
protected

Definition at line 304 of file QGoDBMeshManager.h.

std::string* QGoDBMeshManager::m_SelectedSubCellType
protected

Definition at line 305 of file QGoDBMeshManager.h.

GoDBTWContainerForMesh* QGoDBMeshManager::m_TWContainer
protected

Definition at line 302 of file QGoDBMeshManager.h.


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