[Insight-developers] Recent changes to Transforms break ITK's API

Bill Lorensen bill.lorensen at gmail.com
Fri Jul 26 14:37:37 EDT 2013


My main concern is that old code generates a compiler error that gives no
clue as to what is wrong.
What info can we provide to the customer to help fix this error. I see
nothing in the migration guide. In fact, that guide has not been updated
since last November.

Even a warning would be useful with explicit instructions on what to
change. My case was simple for me to fix because I knew something had
changed in the transforms and the code base was small. Pity thepoor
customer with a large investment in using ITK code.


On Fri, Jul 26, 2013 at 2:16 PM, Matt McCormick
<matt.mccormick at kitware.com>wrote:

> Hi Ali,
>
> If a float transform was saved as a double on disk, that could be
> considered a bug and I do not think there is harm in fixing the
> behavior.  We still should fix the compliation IMHO.
>
> Thanks,
> Matt
>
> On Fri, Jul 26, 2013 at 1:37 PM, Ghayoor, Ali <ali-ghayoor at uiowa.edu>
> wrote:
> > Hello All,
> >
> > As Bill Lorensen has proven in his example, the new changes to ITK, due
> to
> > the "ENH: Support single precision registration" patch, break API of
> > "itkTransformFileReader/Writer" filters.
> >
> > In attached report file, I have explained about the importance of new
> > changes, and the current backward compatibility issues that they cause.
> > Also, it is shown that the old functionality had a bug in it, and moving
> > forward this bug should not be re-introduced.
> >
> > I really appreciate if you ITK gurus take a look at this report and tell
> > your ideas about the new changes.
> >
> > Thank you,
> > Ali
> >
> >
> >
> > From: Bill Lorensen <bill.lorensen at gmail.com>
> > Date: Sunday, July 14, 2013 10:31 AM
> > To: ITK <insight-developers at itk.org>
> > Subject: [Insight-developers] Recent changes to Transforms break ITK's
> API
> >
> > Folks,
> >
> > When I compile the following code I get this compilation error:
> >
> >
> /home/lorensen/ProjectsGIT/ITKGerrit/Modules/Remote/WikiExamples/IO/TransformFileWriter.cxx:
> > In function ‘int main(int, char**)’:
> >
> /home/lorensen/ProjectsGIT/ITKGerrit/Modules/Remote/WikiExamples/IO/TransformFileWriter.cxx:20:
> > error: no matching function for call to
> >
> ‘itk::TransformFileWriterTemplate<double>::SetInput(itk::SmartPointer<itk::Rigid2DTransform<float>
> >>&)’
> >
> /home/lorensen/ProjectsGIT/ITKGerrit/Modules/IO/TransformBase/include/itkTransformFileWriter.hxx:78:
> > note: candidates are: void
> > itk::TransformFileWriterTemplate<ScalarType>::SetInput(const
> > itk::TransformBaseTemplate<TScalarType>*) [with ScalarType = double]
> >
> >
> ---------------------------------------------------------------------------------------------------
> > #include "itkRigid2DTransform.h"
> > #include "itkTransformFileWriter.h"
> >
> > int main(int argc, char *argv[])
> > {
> >   std::string fileName;
> >   if(argc == 1) // No arguments were provided
> >   {
> >     fileName = "test.tfm";
> >   }
> >   else
> >   {
> >     fileName = argv[1];
> >   }
> >
> >   typedef itk::Rigid2DTransform< float > TransformType;
> >   TransformType::Pointer transform = TransformType::New();
> >
> >   itk::TransformFileWriter::Pointer writer =
> > itk::TransformFileWriter::New();
> >   writer->SetInput(transform);
> >   writer->SetFileName(fileName);
> >   writer->Update();
> >
> >   return EXIT_SUCCESS;
> > }
> >
> >
> >
> > ________________________________
> > Notice: This UI Health Care e-mail (including attachments) is covered by
> the
> > Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is
> confidential
> > and may be legally privileged.  If you are not the intended recipient,
> you
> > are hereby notified that any retention, dissemination, distribution, or
> > copying of this communication is strictly prohibited.  Please reply to
> the
> > sender that you have received the message in error, then delete it.
>  Thank
> > you.
> > ________________________________
>



-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20130726/b24aa34c/attachment.htm>


More information about the Insight-developers mailing list