Applications/DTIAtlasFiberAnalyzer/DTIAtlasFiberAnalyzerguiwindow.cxx
/* Paint the foreground with RGB value */
Paint the foreground with RGB value
Paint the foreground with RGB value
void DTIAtlasFiberAnalyzerguiwindow::paintForeGround(int R,int G,int B,int col,int type)
{
    QString headername;
    QTableWidgetItem *header=  new QTableWidgetItem;
    if(CSVtable->horizontalHeaderItem(col)!=0)
    {
        headername = CSVtable->horizontalHeaderItem(col)->text();
    }
    else
    {
        switch(type)
        {
        case 1:
            headername = "Data";
            break;
        case 2:
            headername = "Deformation field";
            break;
        case 3:
            headername = "Name";
            break;
        }
    }
    header->setData( 0, headername);
    QBrush brush(QColor(R,G,B,255));
    header->setForeground(brush);
    CSVtable->setHorizontalHeaderItem(col,header);
}
void DTIAtlasFiberAnalyzerguiwindow :: paintForeGround ( int R , int G , int B , int col , int type ) { QString headername ; QTableWidgetItem * header = new QTableWidgetItem ; if ( CSVtable -> horizontalHeaderItem ( col ) != 0 ) { headername = CSVtable -> horizontalHeaderItem ( col ) -> text ( ) ; } else { switch ( type ) { case 1 : headername = " " ; break ; case 2 : headername = " " ; break ; case 3 : headername = " " ; break ; } } header -> setData ( 0 , headername ) ; QBrush brush ( QColor ( R , G , B , 255 ) ) ; header -> setForeground ( brush ) ; CSVtable -> setHorizontalHeaderItem ( col , header ) ; }
Paint the foreground with RGB value
Paint the foreground with RGB value