[Insight-users] Problem with the FastMarchingImageFilter example
Frederic Perez
fredericpcx at yahoo.es
Thu Sep 2 09:43:10 EDT 2004
Hi Erik,
you should use the try/catch C++ exception handling mechanism.
(You will notice for example in the ITK software guide, that
it is used very extensively..)
It will help you identify the problem:
try
{
writer1->Update();
}
catch( itk::ExceptionObject & ecp )
{
std::cerr << "Exception caught" << std::endl;
std::cerr << ecp << std::endl;
}
catch(...)
{
std::cerr << "Unknown exception caught !" << std::endl;
}
Regards,
Frederic Perez
--- Erik Vidholm <erik at cb.uu.se> escribió:
> I get a runtime error when I try to run the
> FastMarchingImageFilter.cxx example.
> I use the image file and the parameters that are suggested in the
> software guide.
>
> Below is a small part of the code, the error occurs when
> writer1->Update() is invoked, i.e. "C" is never printed.
>
> Anyone who have experienced the same problem?
>
> / Erik
>
> std::cerr << "A" << std::endl;
> caster1->SetInput( smoothing->GetOutput() );
> writer1->SetInput( caster1->GetOutput() );
> writer1->SetFileName("FastMarchingFilterOutput1.png");
> caster1->SetOutputMinimum( 0 );
> caster1->SetOutputMaximum( 255 );
> std::cerr << "B" << std::endl;
> writer1->Update();
> std::cerr << "C" << std::endl; >
_______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
______________________________________________
Renovamos el Correo Yahoo!: ¡100 MB GRATIS!
Nuevos servicios, más seguridad
http://correo.yahoo.es
More information about the Insight-users
mailing list