[Insight-users] Problem reading itkTransform files

Francois Budin insight.mailinglist.francois at budin.fr
Tue Dec 15 16:03:07 EST 2009


Problem solved, it was a conflict between ITK and generateCLP.

On Mon, Dec 14, 2009 at 17:15, Francois Budin <
insight.mailinglist.francois at budin.fr> wrote:

> Hi everybody,
>
> 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:
>
> itk::TransformFileReader::Pointer transformFile ;
>     transformFile=itk::TransformFileReader::New() ;
>     transformFile->SetFileName( fileName.c_str() ) ;
>     transformFile->Update() ;
>     for( itk::TransformFileReader::TransformListType::const_iterator it =
> transformFile->GetTransformList()->begin() ;
>          it != transformFile->GetTransformList()->end() ; ++it )
>         {
>         std::cout<< "message"<<std::endl;
>         }
>  // transformFile->GetTransformList()->pop_back() ;
>  transformFile->GetTransformList()->size() ;
>
> 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.
> Has anybody ever had these problems or does somebody see what is wrong in
> my code?
> Sincerely,
>
> Francois
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091215/e3f8675a/attachment.htm>


More information about the Insight-users mailing list