[ITK] [ITK-users] cannot save transform to file: Can't Create IO object

Sebastian Ordas sebastian.ordas at gmail.com
Mon May 23 16:29:51 EDT 2016


Hello, I am trying to run the code bellow from my application (using ITK 
4.9)  but I get the following error :

ERROR: Caught exception: itk::ERROR:
TransformFileWriterTemplate(000000000CD770E0): Can't Create IO object
for file test.tfm

I am sure that if I test it from a simple test application this should 
work, but I am trying to understand what I am missing from within my 
project (maybe some factory not yet registered or even some 
registration-related module not yet enabled in cmake?)

typedef itk::VersorRigid3DTransform< double > TransformType;
TransformType::Pointer trf = TransformType::New();
trf->SetIdentity();

itk::TransformFileWriterTemplate<double>::Pointer writer =
     itk::TransformFileWriterTemplate<double>::New();

   writer->SetFileName("test.tfm");
   writer->SetInput(trf);

   try
   {
     writer->Update();
   }
   catch (itk::ExceptionObject& e)
   {
     std::cerr << "Caught exception: " << e.GetDescription() << std::endl;
   }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160523/4f85849e/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list