Applications/DTIAtlasFiberAnalyzer/DTIAtlasFiberAnalyzerguiwindow.cxx
/************************************************************************************
* getFiberInformations : Gets 6 first lines in a .fvp file
 ************************************************************************************/
getFiberInformations : Gets 6 first lines in a .fvp file
getFiberInformations : Gets 6 first lines in a . fvp file
vstring DTIAtlasFiberAnalyzerguiwindow::getFiberInformations(std::string fiber, std::string parameter)
{
    vstring parameterslines;
    std::string buffer, filepath;
    filepath=m_OutputFolder+"/Cases/"+m_Cases[0]+"/"+m_Cases[0]+"_"+fiber+"_"+parameter+".fvp";
    std::ifstream fvpfile(filepath.c_str(), std::ios::in);
    getline(fvpfile, buffer);
    while(buffer.compare(0,35,"Number of samples along the bundle:")!=0 && !fvpfile.eof())
    {
        parameterslines.push_back(buffer);
        getline(fvpfile,buffer);
    }
    parameterslines.push_back(buffer);
    return parameterslines;
}
vstring DTIAtlasFiberAnalyzerguiwindow :: getFiberInformations ( std :: string fiber , std :: string parameter ) { vstring parameterslines ; std :: string buffer , filepath ; filepath = m_OutputFolder + " " + m_Cases [ 0 ] + " " + m_Cases [ 0 ] + " " + fiber + " " + parameter + " " ; std :: ifstream fvpfile ( filepath . c_str ( ) , std :: ios :: in ) ; getline ( fvpfile , buffer ) ; while ( buffer . compare ( 0 , 35 , " " ) != 0 && ! fvpfile . eof ( ) ) { parameterslines . push_back ( buffer ) ; getline ( fvpfile , buffer ) ; } parameterslines . push_back ( buffer ) ; return parameterslines ; }
getFiberInformations : Gets 6 first lines in a .fvp file
getFiberInformations : Gets 6 first lines in a . fvp file
//Open first .fvp file corresponding to string fiber (the case doesn't matter) //Put first line in buffer //Stop at last line of information or if it's the end of file