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

Matt McCormick matt.mccormick at kitware.com
Mon May 23 16:35:32 EDT 2016


Hello Sebastian,

By running against ITK with this patch checked out:

  http://review.source.kitware.com/#/c/21115/

the error message will state what transform IO classes are registered.

HTH,
Matt

On Mon, May 23, 2016 at 4:29 PM, Sebastian Ordas
<sebastian.ordas at gmail.com> wrote:
> 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;
>   }
>
>
> _____________________________________
> 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
>
_____________________________________
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