42 m_SelectedSubCellType(NULL)
44 this->
SetInfo(iImgSessionID, iparent);
65 this->SetTracesInfoContainerForVisuTemplate< MeshContainer >(
83 vtkMySQLDatabase *iDatabaseConnector)
93 vtkMySQLDatabase *iDatabaseConnector,
94 const std::list<unsigned int> & iListTPs)
96 this->DisplayInfoAndLoadVisuContainerWithAllTracesForSpecificTPs< ContourMeshContainer >
103 vtkMySQLDatabase *iDatabaseConnector,
104 const std::list<unsigned int> & iListTPs)
110 std::list<unsigned int> ListIDs =
112 iDatabaseConnector, iListTPs);
113 std::list<ContourMeshContainer::MultiIndexContainerElementType> list_of_traces =
115 GetListStructureFromDB<ContourMeshContainer::MultiIndexContainerElementType>(
125 vtkMySQLDatabase *iDatabaseConnector,
126 const std::list<unsigned int> & iListTPs)
149 vtkMySQLDatabase *iDatabaseConnector)
153 this->DisplayInfoForAllTracesTemplate< GoDBTWContainerForMesh >(
154 this->
m_TWContainer, iDatabaseConnector, Qt::Unchecked, IndexShowColumn);
162 const std::list<unsigned int> & iListTPs)
165 this->DisplayInfoForTracesForSpecificTPsTemplate<GoDBTWContainerForMesh >(
166 this->
m_TWContainer, iDatabaseConnector, Qt::Unchecked, iListTPs,
174 vtkMySQLDatabase *iDatabaseConnector,
175 const std::list<unsigned int> & iListTPs)
177 this->RemoveTracesFromTWAndContainerForVisuForSpecificTPsTemplate< ContourMeshContainer >
185 vtkMySQLDatabase *iDatabaseConnector)
187 this->DisplayInfoForLastCreatedTraceTemplate< GoDBTWContainerForMesh >(
197 if ( iMeshAttributes != 0 )
199 std::vector< std::string > ColumnNames (2);
200 std::vector< std::string > Values (2);
201 ColumnNames.at(0) =
"SurfaceArea";
202 Values.at(0) = ConvertToString< double >(iMeshAttributes->
m_Area);
203 ColumnNames.at(1) =
"Volume";
204 Values.at(1) = ConvertToString< double >(iMeshAttributes->
m_Volume);
223 vtkMySQLDatabase *iDatabaseConnector,
int iTraceID)
225 this->DisplayInfoForExistingTraceTemplate< GoDBTWContainerForMesh >(
233 vtkMySQLDatabase *iDatabaseConnector,
int iTraceID,
248 tr(
"Add the selected CellType '%1' to the checked meshes")
251 tr(
"Add the selected SubCellType '%1' to the checked meshes")
259 unsigned int iXCoordMin,
unsigned int iYCoordMin,
unsigned int iZCoordMin,
260 unsigned int iXCoordMax,
unsigned int iYCoordMax,
261 unsigned int iZCoordMax,
int iTCoord,
262 vtkPolyData *iTraceNodes,
263 vtkMySQLDatabase *iDatabaseConnector,
265 unsigned int iTrackID)
273 iXCoordMax, iYCoordMax, iZCoordMax, iTraceNodes, iDatabaseConnector, NewMesh,
274 iMeshAttributes, iTCoord);
291 unsigned int iXCoordMin,
unsigned int iYCoordMin,
unsigned int iZCoordMin,
292 unsigned int iXCoordMax,
unsigned int iYCoordMax,
293 unsigned int iZCoordMax,
int iTCoord, vtkPolyData *iTraceNodes,
294 vtkMySQLDatabase *iDatabaseConnector,
298 iZCoordMax, iTCoord, iTraceNodes, iDatabaseConnector, iMeshAttributes,
306 unsigned int iXCoordMin,
unsigned int iYCoordMin,
unsigned int iZCoordMin,
307 unsigned int iXCoordMax,
unsigned int iYCoordMax,
308 unsigned int iZCoordMax,
int iTShift, vtkPolyData *iTraceNodes,
309 vtkMySQLDatabase *iDatabaseConnector,
313 iZCoordMax, iTShift, iTraceNodes, iDatabaseConnector, iMeshAttributes, 0 );
320 unsigned int iYCoordMin,
321 unsigned int iZCoordMin,
322 unsigned int iXCoordMax,
323 unsigned int iYCoordMax,
324 unsigned int iZCoordMax,
325 vtkPolyData *iTraceNodes,
326 vtkMySQLDatabase *iDatabaseConnector,
329 unsigned int TraceID =
346 GeneratedMesh.
SaveInDB(iDatabaseConnector);
354 vtkMySQLDatabase *iDatabaseConnector)
374 unsigned int NewMeshID =
387 this->m_SelectedColorData->second);
396 vtkMySQLDatabase *iDatabaseConnector)
398 return this->UpdateTheTracesColorTemplate< GoDBMeshRow, ContourMeshContainer >(
407 const std::list< unsigned int > & iListTracesIDs)
409 std::list< unsigned int > ListMeshesWithNoPoints =
411 iListTracesIDs, iDatabaseConnector);
412 if ( !ListMeshesWithNoPoints.empty() )
422 unsigned int iYCoordMin,
423 unsigned int iZCoordMin,
424 unsigned int iXCoordMax,
425 unsigned int iYCoordMax,
426 unsigned int iZCoordMax,
427 vtkPolyData *iTraceNodes,
428 vtkMySQLDatabase *iDatabaseConnector,
435 iYCoordMin, iZCoordMin, iTCoord);
437 iYCoordMax, iZCoordMax, iTCoord);
440 coord_min, coord_max, iMeshAttributes);
447 const std::vector< int > & iVectorImportedTraces,
448 vtkMySQLDatabase *iDatabaseConnector)
452 iVectorImportedTraces, iDatabaseConnector);
455 UpdateVisualizationForGivenIDs< std::vector< int > >(
456 iVectorImportedTraces);
464 this->DeleteTracesTemplate< ContourMeshContainer >(iDatabaseConnector,
483 UpdateElementHighlightingWithGivenTraceID(iTraceID);
492 UpdateElementVisibilityWithGivenTraceID(iTraceID);
499 vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTraceIDs)
501 this->GetTracesInfoFromDBAndModifyContainerForVisuTemplate< MeshContainer >(
509 vtkMySQLDatabase *iDatabaseConnector,
510 const std::list< unsigned int > & iListCollectionIDs)
512 std::list< unsigned int > ListMeshesInvolved =
517 std::list< ContourMeshStructure > ListMeshesInfo =
521 std::list< ContourMeshStructure >::iterator it = ListMeshesInfo.begin();
523 while ( it != ListMeshesInfo.end() )
525 oMeshContainer->
Insert(*it);
528 return oMeshContainer;
535 std::list< unsigned int > iMeshesIDs)
545 this->SetColorCodingTemplate< ContourMeshContainer >(
572 std::list< unsigned int > ListCheckedMeshes =
590 std::list< unsigned int > ListCheckedMeshes =
605 unsigned int iTrackID,
606 unsigned int iTimePoint)
608 unsigned int oExistingMeshID = 0;
611 std::list< unsigned int > ExistingMeshID =
613 iDatabaseConnector, iTrackID, iTimePoint);
614 if ( ExistingMeshID.empty() )
616 return oExistingMeshID;
618 if ( ExistingMeshID.size() > 1 )
620 std::cout <<
"there is more than 1 existing mesh for this track at this timepoint ";
621 std::cout <<
"Debug: In " << __FILE__ <<
", line " << __LINE__;
622 std::cout << std::endl;
623 return oExistingMeshID;
625 oExistingMeshID = ExistingMeshID.front();
626 GoDBMeshRow ExistingMesh(oExistingMeshID, iDatabaseConnector);
629 ExistingMesh.
SaveInDB(iDatabaseConnector);
635 return oExistingMeshID;
642 unsigned int iTrackID, vtkMySQLDatabase *iDatabaseConnector,
649 unsigned int MeshIDKickedOut =
651 iDatabaseConnector, iTrackID, iTCoord);
652 if ( MeshIDKickedOut != 0 )
657 return MessageToPrint;
664 unsigned int iTrackID, vtkMySQLDatabase *iDatabaseConnector,
665 std::list< unsigned int > & ioListMeshIDs,
666 std::list< unsigned int > & ioNullListMeshIDs)
672 std::string MessageToPrint =
"";
673 std::list< unsigned int > ListTimePoints =
675 if ( !ListTimePoints.empty() )
677 std::string MeshIDToPrint =
"";
678 std::list< unsigned int >::iterator iter = ListTimePoints.begin();
679 while ( iter != ListTimePoints.end() )
681 unsigned int MeshIDKickedOut =
683 iDatabaseConnector, iTrackID, *iter);
684 if ( MeshIDKickedOut != 0 )
686 ioNullListMeshIDs.push_back(MeshIDKickedOut);
687 MeshIDToPrint += ConvertToString< unsigned int >(MeshIDKickedOut);
688 MeshIDToPrint +=
", ";
692 if ( !MeshIDToPrint.empty() )
694 MeshIDToPrint = MeshIDToPrint.substr(0, MeshIDToPrint.size() - 2);
695 MessageToPrint +=
"The trackID of the meshes ";
696 MessageToPrint += MeshIDToPrint;
697 MessageToPrint +=
" have been reassigned to 0";
700 MessageQString = MessageToPrint.c_str();
702 return MessageQString;
709 vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListMeshIDs,
710 std::list< unsigned int > & ioListMeshIDsToBePartOfTrack,
711 std::list< unsigned int > & ioListMeshIDsToReassign)
713 std::string MessageToPrint =
"";
715 ioListMeshIDsToBePartOfTrack = iListMeshIDs;
717 std::list< unsigned int >::iterator iter;
719 if ( !iListMeshIDs.empty() )
721 std::list< unsigned int > TimePointsWithSeveralMeshes =
723 iDatabaseConnector, iListMeshIDs);
725 iter = TimePointsWithSeveralMeshes.begin();
727 while ( iter != TimePointsWithSeveralMeshes.end() )
729 int MaxMeshIDForTimePoint =
731 iDatabaseConnector, iListMeshIDs, *iter);
732 if ( MaxMeshIDForTimePoint != -1 )
734 std::list< unsigned int > TraceIDs =
736 iDatabaseConnector, iListMeshIDs, *iter, MaxMeshIDForTimePoint);
737 std::copy( TraceIDs.begin(), TraceIDs.end(), std::back_inserter(ioListMeshIDsToReassign) );
738 std::list< unsigned int >::iterator iterTraceIDToRemove = TraceIDs.begin();
739 while ( iterTraceIDToRemove != TraceIDs.end() )
741 std::list< unsigned int >::iterator Find =
742 std::find(ioListMeshIDsToBePartOfTrack.begin(), ioListMeshIDsToBePartOfTrack.end(),
743 *iterTraceIDToRemove);
744 ioListMeshIDsToBePartOfTrack.erase(Find);
745 ++iterTraceIDToRemove;
750 if ( !ioListMeshIDsToReassign.empty() )
752 MessageToPrint =
"Warning: the meshIDs ";
753 std::list< unsigned int >::iterator iterIDs = ioListMeshIDsToReassign.begin();
754 while ( iterIDs != ioListMeshIDsToReassign.end() )
756 std::string temp = ConvertToString< unsigned int >(*iterIDs);
757 MessageToPrint += temp;
758 MessageToPrint +=
", ";
761 MessageToPrint = MessageToPrint.substr(0, MessageToPrint.size() - 1);
762 MessageToPrint +=
"have not been reassigned ";
763 MessageToPrint +=
"to the trackID because several meshes were selected for the same ";
764 MessageToPrint +=
"timepoints ";
766 iter = TimePointsWithSeveralMeshes.begin();
768 while ( iter != TimePointsWithSeveralMeshes.end() )
770 std::string temp = ConvertToString< unsigned int >(*iter);
771 MessageToPrint += temp;
772 MessageToPrint +=
", ";
775 MessageToPrint = MessageToPrint.substr(0, MessageToPrint.size() - 2);
778 return MessageToPrint;
784 std::list< unsigned int >
786 unsigned int iTrackID, vtkMySQLDatabase *iDatabaseConnector,
787 std::list< unsigned int > iListMeshesBelongingToTrack)
789 std::list< unsigned int > oListMeshesTimePointInf = std::list< unsigned int >();
790 std::pair< unsigned int, unsigned int > InfoSplitMesh =
792 if ( InfoSplitMesh.first != 0 )
795 iDatabaseConnector, iListMeshesBelongingToTrack, InfoSplitMesh.second);
798 return oListMeshesTimePointInf;
805 vtkMySQLDatabase *iDatabaseConnector,
809 std::pair< unsigned int, unsigned int > oInfo =
810 std::pair< unsigned int, unsigned int >(0, 0);
811 std::list< unsigned int > ListCheckedMeshes =
813 std::list< unsigned int > ListCheckedMeshesBelongingToTrackID =
814 std::list< unsigned int >();
815 if ( !ListCheckedMeshes.empty() )
817 ListCheckedMeshesBelongingToTrackID =
819 iDatabaseConnector, ListCheckedMeshes, iTrackID);
821 if ( ListCheckedMeshesBelongingToTrackID.size() != 1 )
825 tr(
"Please select one and only one Mesh where to split the Track") );
830 unsigned int CheckedMesh = ListCheckedMeshesBelongingToTrackID.front();
831 oInfo.first = CheckedMesh;
832 std::list< unsigned int > MeshesIDs;
833 MeshesIDs.push_back(CheckedMesh);
834 std::list< unsigned int > ListTimePoints =
837 if ( ListTimePoints.size() != 1 )
839 std::cout <<
"more than one timepoint";
840 std::cout <<
"Debug: In " << __FILE__ <<
", line " << __LINE__;
841 std::cout << std::endl;
844 oInfo.second = ListTimePoints.front();
850 std::list< QGoDBTraceManager::NameWithColorData >
852 vtkMySQLDatabase *iDatabaseConnector, std::string & ioIDToSelect)
861 std::list< std::pair<unsigned int, double> >
865 std::list< std::pair<unsigned int, double> > oList;
870 std::list<unsigned int>::iterator it = list.begin();
872 while(it!=list.end())
874 double volume = (tableWidget->
GetValue( *it,
"mesh",
"Volume" )).toDouble();
875 int trackID = (tableWidget->
GetValue( *it,
"mesh",
"trackID" )).toInt();
877 std::pair<unsigned int, double> trackAndVolume(trackID, volume);
878 oList.push_back(trackAndVolume);
888 std::list< std::pair<unsigned int, double> >
892 std::list< std::pair<unsigned int, double> > oList;
895 std::list<unsigned int>::const_iterator it = iMeshIDs.begin();
897 while(it!=iMeshIDs.end())
899 double volume = (tableWidget->
GetValue( *it,
"mesh",
"Volume" )).toDouble();
900 int trackID = (tableWidget->
GetValue( *it,
"mesh",
"trackID" )).toInt();
902 std::pair<unsigned int, double> trackAndVolume(trackID, volume);
903 oList.push_back(trackAndVolume);
917 return (this->
GetTableWidget()->GetValue( iMeshID,
"mesh",
"Volume" )).toDouble();
925 const std::list<unsigned int>& iTimePoints)
927 this->RemoveTracesFromTWAndContainerForVisuForSpecificTPsTemplate<MeshContainer>(
936 const std::list< unsigned int > & iToTrack,
937 const std::list< unsigned int > & iToNull)
virtual void SetColorCoding(bool IsChecked)
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 ti...
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 timepoi...
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 ...
MeshContainer * 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 iL...
void ModifyTrackIDInVisuContainer(unsigned int iTrackID, const std::list< unsigned int > &iToTrack, const std::list< unsigned int > &iToNull)
std::list< NameWithColorData > GetTracesIDsWithColorForATimePoint(vtkMySQLDatabase *iDatabaseConnector, unsigned int iTimePoint)
get all the distinct traces IDs with their QColor for a given timepoint
std::map< unsigned int, double * > GetMeshesPoints(std::list< unsigned int > iMeshID)
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 ...
std::list< unsigned int > UpdateTheTracesColor(vtkMySQLDatabase *iDatabaseConnector)
virtual pure method in QGoDBTraceManager
virtual void DisplayInfoForExistingTrace(vtkMySQLDatabase *iDatabaseConnector, int iTraceID)
Virtual pure method: get the data needed from the database for the existing trace with iTraceID and u...
virtual void DisplayInfoForLastCreatedTrace(vtkMySQLDatabase *iDatabaseConnector)
Virtual pure method: get the data needed from the database for the last created trace and display the...
virtual void AddActionsContextMenu(QMenu *iMenu)
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...
void SetTheDataFromTheVisu(vtkMySQLDatabase *DatabaseConnector, vtkPolyData *TraceVisu, GoDBCoordinateRow iCoordMin, GoDBCoordinateRow iCoordMax, GoFigureMeshAttributes *iMeshAttributes)
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 th...
unsigned int CreateNewMeshWithNoContourNoPoints(vtkMySQLDatabase *iDatabaseConnector)
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...
void UpdateCurrentElementFromDB(unsigned int iTraceID, double irgba[4], bool IsVisible=false)
Update Current Element from te database.
void DisplayInfoAndLoadVisuContainerWithAllTraces(T *iTWContainer, vtkMySQLDatabase *iDatabaseConnector)
get all the data from the database to load all the traces for the imagingsession into the table widge...
std::string m_CollectionName
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 wi...
MeshContainer * m_MeshContainerInfoForVisu
void SetCollectionID(unsigned int iCollectionID)
set the collectionID field to iCollectionID
Abstract class inherited by QGoDBContourManager,Mesh,Track,Lineage.
void UpdateSubCellType()
update the subcelltype of the checked meshes with the selected one
int GetIndexShowColumn()
return the index of the column in the RowContainer corresponding to the show/hide column ...
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...
double GetVolume(unsigned int iMeshID)
Get volume of given mesh ID.
std::list< std::pair< unsigned int, double > > GetListVolumes()
Get volume of checked mesh IDs.
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
void AddSpecificActionsForContourMesh(QMenu *iMenu)
NameWithColorData * m_SelectedColorData
void UpdateBoundingBoxes(vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTracesIDs)
update the bounding boxes for the meshes with no points
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 ...
void Insert(const MultiIndexContainerElementType &iE)
Insert one element in the container.
static int GetSubCellTypeID(vtkMySQLDatabase *iDatabaseConnector, std::string iSubCellTypeName)
static method.get the SubCellTypeID base on the name of the subcelltype
void DisplayInfoAndLoadVisuContainerForAllMeshesForSpecificTPs(vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTPs)
manages a map with keys matching fields of the gofiguredatabase Coordinate table and values of the ma...
std::string * m_SelectedSubCellType
QString tr(const char *sourceText, const char *disambiguation, int n)
GoDBTWContainerForMesh * m_TWContainer
std::string m_CollectionOf
void AssignToGivenCollection(unsigned int iCollection, std::list< unsigned int > iToBeAssigned)
NameWithColorData * m_SelectedCollectionData
std::list< unsigned int > GetTraceIDsBelongingToListTimePoints(vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTPs)
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)
virtual void SetCollectionsTraceNames()
virtual pure method: set the std::string class members
QString number(int n, int base)
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)
std::list< unsigned int > GetTimePointsForTraceIDs(vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTraceIDs)
get the timepoints (non distinct) for all the traceIDs in iListTraceIDs
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 ...
double * GetVectorFromQColor(QColor iColor)
return a double rgba[4] from a QColor
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...
bool SetValuesForSpecificID(int ID, vtkMySQLDatabase *iDatabaseConnector)
virtual void DeleteCheckedTraces(vtkMySQLDatabase *iDatabaseConnector)
delete the checked traces from the database, the TW and the container for visu
std::list< unsigned int > GetHighlightedElementsTraceID()
Get the list of highlighted elements TraceID.
void DisplayOnlyVolumeAreaForExistingMesh(GoFigureMeshAttributes *iMeshAttributes, unsigned iMeshID)
display in the TW the volume and area extracted from iMeshAttributes called when loading all meshes f...
void UpdateCurrentElementCollection(unsigned int iCollectionID)
void setText(const QString &text)
virtual void DisplayInfoForAllTraces(vtkMySQLDatabase *iDatabaseConnector)
Virtual pure method: get the data needed from the database and display them in the m_Table for all tr...
std::string * m_SelectedCellType
void RemoveTracesFromTWAndContainerForVisuForSpecificTPs(vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTPs)
void DisplayInfoForExistingTraceForMesh(vtkMySQLDatabase *iDatabaseConnector, int iTraceID, GoFigureMeshAttributes *iMeshAttributes)
GoDBCoordinateRow GetCoordinateFromInt(int iXCoord, int iYCoord, int iZCoord, int iTCoord)
create a GoDBCoordinateRow and set its fields X,Y,Z,Tcoord
virtual void UpdateVisibleElementsInVisuContainer(int iTraceID)
void SetInfo(unsigned int iImgSessionID, QWidget *iParent)
set the variables class members
std::map< unsigned int, double * > GetMeshesInfoForImportedMesh(std::list< unsigned int > iMeshesIDs)
get the coordinate info for meshes needed for the visu for imported tracks
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 ...
void NeedToGetDatabaseConnection()
void CleanTWAndContainerForGivenTimePoint(vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iTimePoints)
void SetSubCellType(vtkMySQLDatabase *DatabaseConnector, std::string SubCellTypeName)
put the value of map["SubCelltype"] to SubCellTypeName
void DisplayInfoForLastCreatedMesh(vtkMySQLDatabase *iDatabaseConnector, GoFigureMeshAttributes *iMeshAttributes)
void SetCellType(vtkMySQLDatabase *DatabaseConnector, std::string CellTypeName)
put the value of map["Celltype"] to CellTypeName
std::list< unsigned int > GetListTracesIDWithNoPoints(std::list< unsigned int > iListTracesIDs, vtkMySQLDatabase *iDatabaseConnector)
get the list of tracesIDs that have no points
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 ...
QGoTableWidget * GetTableWidget()
get the m_Table
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 collectio...
virtual void DisplayInfoForTracesForSpecificTPs(vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTPs)
void ResetCurrentElement()
Reset Current Element to a default state.
void SetMeshesInfoContainerForVisu(MeshContainer *iContainerForVisu)
set the m_MeshContainerInfoForVisu to the iContainerForVisu
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
MultiIndexContainerElementType m_CurrentElement
Current Element of the trace type.
Wraps a boost::multi_index_container of ContourMeshStructure. This class is specialized for the means...
Structure which represent a contour or a mesh, and used for interaction between Visualization and Tab...
virtual void UpdateHighlightedElementsInVisuContainer(int iTraceID)
void UpdateCellType()
update the celltype of the checked meshes with the selected one
void AddInfoInTWAndVisuContainerForMeshesForSpecificTPs(vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTPs)
static int GetCellTypeID(vtkMySQLDatabase *iDatabaseConnector, std::string iCellTypeName)
static method.get the CellTypeID base on the name of the celltype
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
this class manages the map with the keys matching the fields of the Mesh gofiguredatabase table and v...
virtual std::list< unsigned int > GetListHighlightedIDs()
std::string m_LastSelectedTraceAsCollection
std::pair< std::string, QColor > NameWithColorData
GoDBTableWidgetContainer::TWContainerType TWContainerType
void DisplayInfoAndLoadVisuContainerForAllMeshes(vtkMySQLDatabase *iDatabaseConnector)
get all the data from the database to load all the meshes for the imagingsession into the table widge...
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::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 ...
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 ...
QMenu * m_CheckedTracesMenu
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 ...
QGoDBMeshManager(int iImgSessionID, QWidget *iparent)
void SetSelectedSubCellType(std::string *iSubCellType)
set the m_SelectedSubCelltype to iSubCelltype
vtkMySQLDatabase * m_DatabaseConnector
void DBConnectionNotNeededAnymore()
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.
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)
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)
virtual void AddActionsContextMenu(QMenu *iMenu)
void AddInfoForMeshesInTWForSpecificTPs(vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTPs)
void SetSelectedCellType(std::string *iCellType)
set the m_SelectedCelltype to iCelltype
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
std::list< unsigned int > GetListTimePointsFromTraceIDs(vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTraceIDs)
get the list of timepoints for each trace in iListTraceIDs
GoDBCollectionOfTraces * m_CollectionOfTraces
void InsertCurrentElement()
Insert Current Element in the container.