Applications/DTIAtlasFiberAnalyzer/DTIAtlasFiberAnalyzerguiwindow.cxx
/*********************************************************************************
 * Add all fibers into the list
 ********************************************************************************/
Add all fibers into the list
Add all fibers into the list
void DTIAtlasFiberAnalyzerguiwindow::SelectAllFiber()
{
    int found;
    std::vector<int> plane;
    for(int i=0;i<FiberInAtlasList->count();i++)
    {
        found=-1;
        for( unsigned int j=0;j<m_Fibername.size();j++)
        {
            if(((FiberInAtlasList->item(i))->text()).compare(m_Fibername[j].c_str())==0)
            {
                found=j;
                break;
            }
        }
        if(found>=0)
        {
            QListWidgetItem* item= new QListWidgetItem;
            item=(FiberInAtlasList->takeItem(i));
            i--;
            FiberSelectedList->addItem(item);
            FiberSelected2List->addItem(item);
            m_FiberSelectedname.push_back(item->text().toStdString());
            plane = PlaneAssociatedToFiber(m_FiberSelectedname[m_FiberSelectedname.size()-1], m_Fibersplane);
            if(plane.size()!=0)
            {
                for(unsigned int k=0; k<plane.size(); k++)
                {
                    m_RelevantPlane.push_back(m_Fibersplane[plane[k]]);
                    QListWidgetItem* itemplane= new QListWidgetItem;
                    QString qs(m_Fibersplane[plane[k]].c_str());
                    itemplane->setData( 0, qs );
                    FiberPlaneFile->addItem(itemplane);
                }
            }
        }
    }
    CheckNextStep();
}
void DTIAtlasFiberAnalyzerguiwindow :: SelectAllFiber ( ) { int found ; std :: vector < int > plane ; for ( int i = 0 ; i < FiberInAtlasList -> count ( ) ; i ++ ) { found = -1 ; for ( unsigned int j = 0 ; j < m_Fibername . size ( ) ; j ++ ) { if ( ( ( FiberInAtlasList -> item ( i ) ) -> text ( ) ) . compare ( m_Fibername [ j ] . c_str ( ) ) == 0 ) { found = j ; break ; } } if ( found >= 0 ) { QListWidgetItem * item = new QListWidgetItem ; item = ( FiberInAtlasList -> takeItem ( i ) ) ; i -- ; FiberSelectedList -> addItem ( item ) ; FiberSelected2List -> addItem ( item ) ; m_FiberSelectedname . push_back ( item -> text ( ) . toStdString ( ) ) ; plane = PlaneAssociatedToFiber ( m_FiberSelectedname [ m_FiberSelectedname . size ( ) - 1 ] , m_Fibersplane ) ; if ( plane . size ( ) != 0 ) { for ( unsigned int k = 0 ; k < plane . size ( ) ; k ++ ) { m_RelevantPlane . push_back ( m_Fibersplane [ plane [ k ] ] ) ; QListWidgetItem * itemplane = new QListWidgetItem ; QString qs ( m_Fibersplane [ plane [ k ] ] . c_str ( ) ) ; itemplane -> setData ( 0 , qs ) ; FiberPlaneFile -> addItem ( itemplane ) ; } } } } CheckNextStep ( ) ; }
Add all fibers into the list
Add all fibers into the list
//Read all the fibername data