Applications/DTIAtlasFiberAnalyzer/DTIAtlasFiberAnalyzerguiwindow.cxx
/* CSV NEW */
/*********************************************************************************
 * Apply in CSV frame : create a new csv
 ********************************************************************************/
CSV NEW
Apply in CSV frame : create a new csv
CSV NEW Apply in CSV frame : create a new csv
void DTIAtlasFiberAnalyzerguiwindow::applyNewCSV()
{
    m_DataCol = -1;
    m_DeformationCol = -1;
    m_NameCol = -1;
    ColumnData->clear();
    ColumnDeformation->clear();
    ColumnNameCases->clear();
    if(m_CSV !=NULL)
    {
        clearCSV();
    }
    csvfilename->clear();
    std::cout<<std::endl;
    std::cout<<"---- New Data ----"<<std::endl;
    CSVtable->setColumnCount (numbercolumn->value());
    CSVtable->setRowCount (numberdata->value());
    if(!m_CSVcreated)
    {
        m_CSV = new CSVClass("",m_debug);
        m_CSVcreated = true;
    }
    addCRframe->setEnabled (true);
    saveframe->setEnabled (true);
    ColumnFrame->setEnabled (true);
    m_nextStep = true;
    for(int i=0;i<CSVtable->rowCount();i++)
    {
        for(int j=0;j<CSVtable->columnCount();j++)
        {
            QTableWidgetItem* item = new QTableWidgetItem;
            QString qs (""); 
            item->setData( 0, qs);
            CSVtable->setItem (i,j,item);
        }
    }
    CheckNextStep();
}
void DTIAtlasFiberAnalyzerguiwindow :: applyNewCSV ( ) { m_DataCol = -1 ; m_DeformationCol = -1 ; m_NameCol = -1 ; ColumnData -> clear ( ) ; ColumnDeformation -> clear ( ) ; ColumnNameCases -> clear ( ) ; if ( m_CSV != NULL ) { clearCSV ( ) ; } csvfilename -> clear ( ) ; std :: cout << std :: endl ; std :: cout << " " << std :: endl ; CSVtable -> setColumnCount ( numbercolumn -> value ( ) ) ; CSVtable -> setRowCount ( numberdata -> value ( ) ) ; if ( ! m_CSVcreated ) { m_CSV = new CSVClass ( " " , m_debug ) ; m_CSVcreated = true ; } addCRframe -> setEnabled ( true ) ; saveframe -> setEnabled ( true ) ; ColumnFrame -> setEnabled ( true ) ; m_nextStep = true ; for ( int i = 0 ; i < CSVtable -> rowCount ( ) ; i ++ ) { for ( int j = 0 ; j < CSVtable -> columnCount ( ) ; j ++ ) { QTableWidgetItem * item = new QTableWidgetItem ; QString qs ( " " ) ; item -> setData ( 0 , qs ) ; CSVtable -> setItem ( i , j , item ) ; } } CheckNextStep ( ) ; }
CSV NEW
 Apply in CSV frame : create a new csv
CSV NEW Apply in CSV frame : create a new csv
//Clear the number of column /* Clear the CSV */ //clear the lineEdit //add the number of columns //add the number of rows /* Create the CSV class object */ /* Enable the frame to add column and row */ //Fill the Table with empty items //convert the word(string) in QString //widget modifications