Hi everybody,<br><br>I am trying to read itkTransform files using the itk::TransformFileReader class and I cannot succeed to make it work properly. The code I wrote for debugging purposes is: <br> <br>itk::TransformFileReader::Pointer transformFile ;<br>
transformFile=itk::TransformFileReader::New() ;<br> transformFile->SetFileName( fileName.c_str() ) ;<br> transformFile->Update() ;<br> for( itk::TransformFileReader::TransformListType::const_iterator it = transformFile->GetTransformList()->begin() ;<br>
it != transformFile->GetTransformList()->end() ; ++it )<br> {<br> std::cout<< "message"<<std::endl;<br> }<br> // transformFile->GetTransformList()->pop_back() ;<br>
transformFile->GetTransformList()->size() ;<br><br>My first problem was that calling the function size() to get the size of the std::list ended up being an infinite loop. I monitored the value of "m_TransformList" in itk::TransformFileReader and everything seems to work fine. But when I get the pointer on this variable, it does not work properly. Calling the function pop_front() works, but calling pop_back() makes my program crash. I tried to add a loop manually to compute the size of the std::list but it is also an infinite loop.<br>
Has anybody ever had these problems or does somebody see what is wrong in my code?<br>Sincerely,<br><br>Francois<br>