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

Matt McCormick matt.mccormick at kitware.com
Mon Jul 15 16:31:26 EDT 2013


On Mon, Jul 15, 2013 at 8:00 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Are these API breaking  in the 4.4 release? If not, we can wait to fix them.

Right - the 4.4 release is unaffected, but we will want to make sure
4.5.0 is backwards compatible.

Thanks,
Matt


>
>
> On Mon, Jul 15, 2013 at 2:02 PM, Johnson, Hans J <hans-johnson at uiowa.edu>
> wrote:
>>
>> Adding Ali to the conversation.
>>
>> Hans
>>
>>
>> -----Original Message-----
>> From: Matt McCormick <matt.mccormick at kitware.com>
>> Date: Monday, July 15, 2013 12:53 PM
>> To: Bill Lorensen <bill.lorensen at gmail.com>
>> Cc: ITK <insight-developers at itk.org>
>> Subject: Re: [Insight-developers] Recent changes to Transforms break
>> ITK's   API
>>
>> Hi Bill,
>>
>> I have added your code in this patch:
>>
>>   http://review.source.kitware.com/#/c/11961/
>>
>> It reproduces the compilation error.
>>
>>
>> To overcome this limitation, I propose we:
>>
>>   1) SetInput( TransformType * ) -> SetInput( LightObject * )
>>   2) Create a new TransformPrecisionFilter that can convert between
>> transform precisions
>>   3) Internally convert between precisions if required in
>> TransformFileWriter::Update()
>>
>> Thanks,
>> Matt
>>
>>
>> On Sun, Jul 14, 2013 at 3:50 PM, Bill Lorensen <bill.lorensen at gmail.com>
>> wrote:
>> > BTW, if I change the type to double it compiles.
>> >
>> >
>> >
>> > On Sun, Jul 14, 2013 at 11:50 AM, Bill Lorensen
>> > <bill.lorensen at gmail.com>
>> > wrote:
>> >>
>> >> I think it works with 4.5.0(~ May 31). Probably fails because of this
>> >> commit:
>> >> http://review.source.kitware.com/#/c/11396/
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> On Sun, Jul 14, 2013 at 11:40 AM, Matt McCormick
>> >> <matt.mccormick at kitware.com> wrote:
>> >>>
>> >>> Hi Bill,
>> >>>
>> >>> Did this code with 4.4.0?
>> >>>
>> >>> Thanks,
>> >>> Matt
>> >>>
>> >>> On Sun, Jul 14, 2013 at 11:31 AM, Bill Lorensen
>> >>><bill.lorensen at gmail.com>
>> >>> wrote:
>> >>> > Folks,
>> >>> >
>> >>> > When I compile the following code I get this compilation error:
>> >>> >
>> >>> >
>> >>> >
>>
>> >>> >>>/home/lorensen/ProjectsGIT/ITKGerrit/Modules/Remote/WikiExamples/IO/Tran
>> >>>sformFileWriter.cxx:
>> >>> > In function Œint main(int, char**)¹:
>> >>> >
>> >>> >
>>
>> >>> >>>/home/lorensen/ProjectsGIT/ITKGerrit/Modules/Remote/WikiExamples/IO/Tran
>> >>>sformFileWriter.cxx:20:
>> >>> > error: no matching function for call to
>> >>> >
>> >>> >
>>
>> >>> >>>Œitk::TransformFileWriterTemplate<double>::SetInput(itk::SmartPointer<it
>> >>>k::Rigid2DTransform<float>
>> >>> >>&)¹
>> >>> >
>> >>> >
>>
>> >>> >>>/home/lorensen/ProjectsGIT/ITKGerrit/Modules/IO/TransformBase/include/it
>> >>>kTransformFileWriter.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;
>> >>> > }
>> >>> >
>> >>> >
>> >>> > _______________________________________________
>> >>> > 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://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://www.itk.org/mailman/listinfo/insight-developers
>> >>> >
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Unpaid intern in BillsBasement at noware dot com
>> >
>> >
>> >
>> >
>> > --
>> > Unpaid intern in BillsBasement at noware dot com
>> _______________________________________________
>> 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://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://www.itk.org/mailman/listinfo/insight-developers
>>
>>
>>
>> ________________________________
>> 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


More information about the Insight-developers mailing list