Applications/DTIAtlasFiberAnalyzer/DTIAtlasFiberAnalyzerguiwindow.cxx
/*********************************************************************************
 * FillCSVFileOnQTable: Fill QTable with csv data's informations when enter is pressed
 *  in the QLineEdit in the load frame, load the csv file
 ********************************************************************************/
Fill QTable with csv data's informations when enter is pressed
in the QLineEdit in the load frame, load the csv file
Fill QTable with csv data ' s informations when enter is pressed in the QLineEdit in the load frame load the csv file
void DTIAtlasFiberAnalyzerguiwindow::FillCSVFileOnQTable()
{
    CSVtable->setRowCount (m_CSV->getRowSize()-1); 
    CSVtable->setColumnCount (m_CSV->getColSize(0));
    for(unsigned int j = 0; j<m_CSV->getColSize(0);j++)
    {
        QTableWidgetItem* header = new QTableWidgetItem;
        QString qs ( ((*m_CSV->getData())[0][j]).c_str() ); 
        header->setData( 0, qs );
        CSVtable->setHorizontalHeaderItem(j,header);
        if(j==static_cast<unsigned int>(m_DataCol))
        {
            ColorCol(1);
        }
        if(j==static_cast<unsigned int>(m_DeformationCol))
        {
            ColorCol(2);
        }
        if(j==static_cast<unsigned int>(m_NameCol))
        {
            ColorCol(3);
        }
    }
    for(unsigned int i = 1; i<m_CSV->getRowSize();i++)
    {
        for(unsigned int j = 0; j<m_CSV->getColSize(i);j++)
        {
            QTableWidgetItem* item = new QTableWidgetItem;
            QString qs ( ((*m_CSV->getData())[i][j]).c_str() ); 
            item->setData( 0, qs );
            CSVtable->setItem (i-1,j,item);
        }
    }
}
void DTIAtlasFiberAnalyzerguiwindow :: FillCSVFileOnQTable ( ) { CSVtable -> setRowCount ( m_CSV -> getRowSize ( ) - 1 ) ; CSVtable -> setColumnCount ( m_CSV -> getColSize ( 0 ) ) ; for ( unsigned int j = 0 ; j < m_CSV -> getColSize ( 0 ) ; j ++ ) { QTableWidgetItem * header = new QTableWidgetItem ; QString qs ( ( ( * m_CSV -> getData ( ) ) [ 0 ] [ j ] ) . c_str ( ) ) ; header -> setData ( 0 , qs ) ; CSVtable -> setHorizontalHeaderItem ( j , header ) ; if ( j == static_cast < unsigned int > ( m_DataCol ) ) { ColorCol ( 1 ) ; } if ( j == static_cast < unsigned int > ( m_DeformationCol ) ) { ColorCol ( 2 ) ; } if ( j == static_cast < unsigned int > ( m_NameCol ) ) { ColorCol ( 3 ) ; } } for ( unsigned int i = 1 ; i < m_CSV -> getRowSize ( ) ; i ++ ) { for ( unsigned int j = 0 ; j < m_CSV -> getColSize ( i ) ; j ++ ) { QTableWidgetItem * item = new QTableWidgetItem ; QString qs ( ( ( * m_CSV -> getData ( ) ) [ i ] [ j ] ) . c_str ( ) ) ; item -> setData ( 0 , qs ) ; CSVtable -> setItem ( i - 1 , j , item ) ; } } }
FillCSVFileOnQTable: Fill QTable with csv data's informations when enter is pressed
  in the QLineEdit in the load frame, load the csv file
FillCSVFileOnQTable : Fill QTable with csv data ' s informations when enter is pressed in the QLineEdit in the load frame load the csv file
// Create the table with the right number of columns and rows //minus 1 for the header //Write the name of the header/first line of the csv //create an item for the QTable //convert the data(string) in QString //Color the header //fill the tab //create an item for the QTable //convert the data(string) in QString