Applications/DTIAtlasFiberAnalyzer/DTIAtlasFiberAnalyzerguiwindow.cxx
/*********************************************************************************
 * Remove all fibers into the list
 ********************************************************************************/
Remove all fibers into the list
Remove all fibers into the list
void DTIAtlasFiberAnalyzerguiwindow::RemoveAllFiber()
{
    for( unsigned int i=0;i<m_FiberSelectedname.size();i++)
    {
        for(int j=0;j<FiberSelectedList->count();j++)
        {
            if(((FiberSelectedList->item(j))->text()).compare(m_FiberSelectedname[i].c_str())==0)
            {
                FiberSelectedList->takeItem(j);
                FiberSelected2List->takeItem(j);
            }
        }
        QListWidgetItem* item= new QListWidgetItem;
        QString qs(m_FiberSelectedname[i].c_str());
        item->setData( 0, qs );
        FiberInAtlasList->addItem(item);
        m_Fibername.push_back(m_FiberSelectedname[i]);
    }
    for( unsigned int i=0;i<m_RelevantPlane.size();i++)
    {
        for(int j=0;j<FiberPlaneFile->count();j++)
        {
            if(((FiberPlaneFile->item(j))->text()).compare(m_RelevantPlane[i].c_str())==0)
                FiberPlaneFile->takeItem(j);
        }
    }
    m_FiberSelectedname.clear();
    m_RelevantPlane.clear();
    CheckNextStep();
}
void DTIAtlasFiberAnalyzerguiwindow :: RemoveAllFiber ( ) { for ( unsigned int i = 0 ; i < m_FiberSelectedname . size ( ) ; i ++ ) { for ( int j = 0 ; j < FiberSelectedList -> count ( ) ; j ++ ) { if ( ( ( FiberSelectedList -> item ( j ) ) -> text ( ) ) . compare ( m_FiberSelectedname [ i ] . c_str ( ) ) == 0 ) { FiberSelectedList -> takeItem ( j ) ; FiberSelected2List -> takeItem ( j ) ; } } QListWidgetItem * item = new QListWidgetItem ; QString qs ( m_FiberSelectedname [ i ] . c_str ( ) ) ; item -> setData ( 0 , qs ) ; FiberInAtlasList -> addItem ( item ) ; m_Fibername . push_back ( m_FiberSelectedname [ i ] ) ; } for ( unsigned int i = 0 ; i < m_RelevantPlane . size ( ) ; i ++ ) { for ( int j = 0 ; j < FiberPlaneFile -> count ( ) ; j ++ ) { if ( ( ( FiberPlaneFile -> item ( j ) ) -> text ( ) ) . compare ( m_RelevantPlane [ i ] . c_str ( ) ) == 0 ) FiberPlaneFile -> takeItem ( j ) ; } } m_FiberSelectedname . clear ( ) ; m_RelevantPlane . clear ( ) ; CheckNextStep ( ) ; }
Remove all fibers into the list
Remove all fibers into the list
//Read all the fibername data //Read all the fiberplanename data //Clear the vector with the initial list of fibers' name.