GOFIGURE2
0.9.0
|
export the data from the database into a textfile More...
#include <Code/IO/GoDBExport.h>
Public Member Functions | |
void | ExportContours () |
get all the imagingsession info,the info for the contours, the meshes they belong to and the tracks the previous meshes belong to from the database and put them in a text file More... | |
void | ExportMeshes () |
get all the imagingsession info,the info for the meshes with points(that can be visualized), the tracks they belong to and the lineages the previous tracks belong to from the database and put them in a text file More... | |
GoDBExport (std::string iServerName, std::string iLogin, std::string iPassword, int iImagingSessionID, std::string iFilename) | |
virtual | ~GoDBExport () |
Private Member Functions | |
void | AddTabulation () |
add 2 spaces to the output file for xml tabulation More... | |
void | CloseDBConnection () |
close and delete the connection to the database. More... | |
std::vector< std::pair < std::string, std::string > > | GetImagingSessionInfoFromDB () |
get the info for imagingsession from the database More... | |
std::string | GetNameWithBrackets (std::string iName) |
put iName within brackets More... | |
std::string | GetNameWithSlashBrackets (std::string iName) |
put iName into slash brackets More... | |
template<typename T > | |
std::vector< std::pair < std::string, std::string > > | GetOneEntityInfoFromDB (std::string iEntityID, T iTableRow) |
get the info with their names for an entity from the database and put them in a vector of pair of string (name of the info + value of the info) More... | |
std::pair< std::string, std::string > | GetOneInfoFromDBForImgSession (std::string iNameInfo) |
get one info for the current imagingsession from the database corresponding to the iNameInfo More... | |
void | GetVectorsTableNamesTracesIDsAndFields (std::vector< std::string > &ioVectorTableNames, std::vector< std::vector< std::string > > &ioVectorTracesIDs, std::vector< std::string > &ioVectorFields, bool IncludeChannelIDs=false) |
fill the different vectors needed for the queries depending if the vectors of IDs are empty or not: get the tables names, the key for the table and the tracesIDs More... | |
void | OpenDBConnection () |
open a connection to the database. More... | |
void | UpdateAllVectorTracesIDsToExportContours () |
fill the different vectors of traces IDs corresponding to the contours to export More... | |
void | UpdateAllVectorTracesIDsToExportMeshes () |
fill the different vectors of traces IDs corresponding to the meshes to export More... | |
void | UpdateVectorChannelIDsForExportMeshes () |
when exporting meshes, the total intensity per channel has to be calculated, and the info for the channels need to be stored More... | |
void | UpdateVectorContourIDsForExportContours () |
get the IDs of the contour belonging to the current imagingsession and fill the m_VectorContourIDs with them More... | |
void | UpdateVectorContourIDsForExportMeshes () |
when exporting meshes, we don't export the potential contours associated to the meshes, so we clear m_VectorContourIDs More... | |
void | UpdateVectorLineageIDsToExportInfo () |
check if for the tracks IDs found in the m_VectorTrackIDs, the corresponding tracks belongs to lineages, if so these lineages IDs are put in the m_VectorLineageIDs More... | |
void | UpdateVectorMeshIDsForExportContours () |
when exporting contours, if the contours belong to meshes, the info regarding these meshes are needed also, so fill m_VectorMeshIDs with these meshes IDs More... | |
void | UpdateVectorMeshIDsForExportMeshes () |
when exporting meshes, we export only the meshes with a 3D surface so we fill the m_VectorMeshIDs with the meshes with a non empty "Points" column from the database More... | |
void | UpdateVectorTrackIDsToExportInfo () |
check if for the meshes IDs found in the m_VectorMeshIDs, the corresponding meshes belongs to tracks, if so these tracks IDs are put in the m_VectorTrackIDs More... | |
void | WriteCellTypeAndSubCellTypeInfoFromDatabase () |
Get the celltype and subcelltype for the needed meshes from the database and write them on the output file. More... | |
void | WriteChannelsInfoFromDatabase () |
get the channels info which IDs are in the m_VectorChannelIDs from the database and write them on the output file More... | |
void | WriteContoursInfoFromDatabase () |
get the contours info which IDs are in the m_VectorContourIDs from the database and write them on the output file More... | |
void | WriteCoordinatesInfoFromDatabase () |
get the coordinates without doublon corresponding to the coordidmax and min of the traces to export from the database and write them in the output file More... | |
void | WriteGeneraleInfo () |
Write the generale info about the textfile. More... | |
void | WriteIntensityInfoFromDatabase () |
get the info for the intensities corresponding to the m_VectorMeshIDs and the m_VectorChannelIDs and write them on the output file More... | |
void | WriteLineagesInfoFromDatabase () |
get the lineages info which IDs are in the m_VectorLineageIDs from the database and write them on the output file More... | |
void | WriteMeshesInfoFromDatabase () |
get the meshes info which IDs are in the m_VectorMeshIDs from the database and write them on the output file More... | |
void | WriteNumberOfEntities (std::string iNameOfEntity, size_t iNumber) |
write on the output file the number of entities that are exported More... | |
void | WriteOnTheOutputFile (std::string iNameOfEntity, std::vector< std::pair< std::string, std::string > > iInfoToWrite) |
write on the output file the info contained in the vector with the name of the entity they describe More... | |
template<typename T > | |
void | WriteTableInfoFromDB (std::string iField, std::string iValue) |
get the info from the database for all the entities from a table or with a limitation defined with field and value and write them in the output file after having written first the number of entities to be described More... | |
template<typename T > | |
void | WriteTableInfoFromDB (std::vector< std::string > iListIDs) |
get the info from the database for all the entities from a table which IDs are in iListIDs and write them in the output file More... | |
void | WriteTheColorsInfoFromDatabase () |
get the colors info from the database for the corresponding traces to export and write them in the output file More... | |
void | WriteTracksInfoFromDatabase () |
get the tracks info which IDs are in the m_VectorTrackIDs from the database and write them on the output file More... | |
Private Attributes | |
vtkMySQLDatabase * | m_DatabaseConnector |
int | m_ImagingSessionID |
std::string | m_Login |
std::string | m_NameDocXml |
std::fstream | m_outfile |
std::string | m_Password |
std::string | m_ServerName |
std::vector< std::string > | m_VectorChannelIDs |
std::vector< std::string > | m_VectorContourIDs |
std::vector< std::string > | m_VectorLineageIDs |
std::vector< std::string > | m_VectorMeshIDs |
std::vector< std::string > | m_VectorTrackIDs |
export the data from the database into a textfile
Definition at line 48 of file GoDBExport.h.
GoDBExport::GoDBExport | ( | std::string | iServerName, |
std::string | iLogin, | ||
std::string | iPassword, | ||
int | iImagingSessionID, | ||
std::string | iFilename | ||
) |
Definition at line 51 of file GoDBExport.cxx.
|
virtual |
Definition at line 62 of file GoDBExport.cxx.
|
private |
add 2 spaces to the output file for xml tabulation
Definition at line 444 of file GoDBExport.cxx.
|
private |
close and delete the connection to the database.
Definition at line 461 of file GoDBExport.cxx.
void GoDBExport::ExportContours | ( | ) |
get all the imagingsession info,the info for the contours, the meshes they belong to and the tracks the previous meshes belong to from the database and put them in a text file
Definition at line 69 of file GoDBExport.cxx.
void GoDBExport::ExportMeshes | ( | ) |
get all the imagingsession info,the info for the meshes with points(that can be visualized), the tracks they belong to and the lineages the previous tracks belong to from the database and put them in a text file
Definition at line 89 of file GoDBExport.cxx.
|
private |
get the info for imagingsession from the database
Definition at line 127 of file GoDBExport.cxx.
|
private |
put iName within brackets
[in] | iName |
Definition at line 418 of file GoDBExport.cxx.
|
private |
put iName into slash brackets
[in] | iName |
Definition at line 431 of file GoDBExport.cxx.
|
inlineprivate |
get the info with their names for an entity from the database and put them in a vector of pair of string (name of the info + value of the info)
[in] | iEntityID | ID of the entity for which the info are needed |
[in] | iTableRow |
T | children of GoDBRow |
Definition at line 176 of file GoDBExport.h.
|
private |
get one info for the current imagingsession from the database corresponding to the iNameInfo
[in] | iNameInfo | name of the field in the database |
Definition at line 140 of file GoDBExport.cxx.
|
private |
fill the different vectors needed for the queries depending if the vectors of IDs are empty or not: get the tables names, the key for the table and the tracesIDs
[in,out] | ioVectorTableNames | names of the tables |
[in,out] | ioVectorTracesIDs | IDs of the traces |
[in,out] | ioVectorFields | names of the database fields |
[in] | IncludeChannelIDs |
Definition at line 469 of file GoDBExport.cxx.
|
private |
open a connection to the database.
Definition at line 452 of file GoDBExport.cxx.
|
private |
fill the different vectors of traces IDs corresponding to the contours to export
Definition at line 236 of file GoDBExport.cxx.
|
private |
fill the different vectors of traces IDs corresponding to the meshes to export
Definition at line 249 of file GoDBExport.cxx.
|
private |
when exporting meshes, the total intensity per channel has to be calculated, and the info for the channels need to be stored
Definition at line 200 of file GoDBExport.cxx.
|
private |
get the IDs of the contour belonging to the current imagingsession and fill the m_VectorContourIDs with them
Definition at line 154 of file GoDBExport.cxx.
|
private |
when exporting meshes, we don't export the potential contours associated to the meshes, so we clear m_VectorContourIDs
Definition at line 164 of file GoDBExport.cxx.
|
private |
check if for the tracks IDs found in the m_VectorTrackIDs, the corresponding tracks belongs to lineages, if so these lineages IDs are put in the m_VectorLineageIDs
Definition at line 223 of file GoDBExport.cxx.
|
private |
when exporting contours, if the contours belong to meshes, the info regarding these meshes are needed also, so fill m_VectorMeshIDs with these meshes IDs
Definition at line 172 of file GoDBExport.cxx.
|
private |
when exporting meshes, we export only the meshes with a 3D surface so we fill the m_VectorMeshIDs with the meshes with a non empty "Points" column from the database
Definition at line 185 of file GoDBExport.cxx.
|
private |
check if for the meshes IDs found in the m_VectorMeshIDs, the corresponding meshes belongs to tracks, if so these tracks IDs are put in the m_VectorTrackIDs
Definition at line 210 of file GoDBExport.cxx.
|
private |
Get the celltype and subcelltype for the needed meshes from the database and write them on the output file.
Definition at line 282 of file GoDBExport.cxx.
|
private |
get the channels info which IDs are in the m_VectorChannelIDs from the database and write them on the output file
Definition at line 350 of file GoDBExport.cxx.
|
private |
get the contours info which IDs are in the m_VectorContourIDs from the database and write them on the output file
Definition at line 374 of file GoDBExport.cxx.
|
private |
get the coordinates without doublon corresponding to the coordidmax and min of the traces to export from the database and write them in the output file
Definition at line 303 of file GoDBExport.cxx.
|
private |
Write the generale info about the textfile.
Definition at line 111 of file GoDBExport.cxx.
|
private |
get the info for the intensities corresponding to the m_VectorMeshIDs and the m_VectorChannelIDs and write them on the output file
Definition at line 358 of file GoDBExport.cxx.
|
private |
get the lineages info which IDs are in the m_VectorLineageIDs from the database and write them on the output file
Definition at line 326 of file GoDBExport.cxx.
|
private |
get the meshes info which IDs are in the m_VectorMeshIDs from the database and write them on the output file
Definition at line 342 of file GoDBExport.cxx.
|
private |
write on the output file the number of entities that are exported
[in] | iNameOfEntity | entity name |
[in] | iNumber | number of entities |
Definition at line 405 of file GoDBExport.cxx.
|
private |
write on the output file the info contained in the vector with the name of the entity they describe
[in] | iNameOfEntity | name of the entity described |
[in] | iInfoToWrite | info to be written in the output file |
Definition at line 382 of file GoDBExport.cxx.
|
inlineprivate |
get the info from the database for all the entities from a table or with a limitation defined with field and value and write them in the output file after having written first the number of entities to be described
[in] | iField | field defining the limitation |
[in] | iValue | value defining the limitation |
T | children of GoDBRow |
Definition at line 122 of file GoDBExport.h.
|
inlineprivate |
get the info from the database for all the entities from a table which IDs are in iListIDs and write them in the output file
[in] | iListIDs | List of the IDs for which the info need to be written |
children | of GoDBRow |
Definition at line 146 of file GoDBExport.h.
|
private |
get the colors info from the database for the corresponding traces to export and write them in the output file
Definition at line 261 of file GoDBExport.cxx.
|
private |
get the tracks info which IDs are in the m_VectorTrackIDs from the database and write them on the output file
Definition at line 334 of file GoDBExport.cxx.
|
private |
Definition at line 76 of file GoDBExport.h.
|
private |
Definition at line 80 of file GoDBExport.h.
|
private |
Definition at line 79 of file GoDBExport.h.
|
private |
Definition at line 82 of file GoDBExport.h.
|
private |
Definition at line 81 of file GoDBExport.h.
|
private |
Definition at line 78 of file GoDBExport.h.
|
private |
Definition at line 77 of file GoDBExport.h.
|
private |
Definition at line 88 of file GoDBExport.h.
|
private |
Definition at line 84 of file GoDBExport.h.
|
private |
Definition at line 87 of file GoDBExport.h.
|
private |
Definition at line 85 of file GoDBExport.h.
|
private |
Definition at line 86 of file GoDBExport.h.