[ITK-dev] [ITK] SimpleITK example, possible typo

Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] zivrafael.yaniv at nih.gov
Wed Sep 16 12:13:53 EDT 2015


Hi Paolo,

You are working with the 0.9 release where this variable was indeed named
maximumNumberOfIterations (doxygen for 0.9
http://www.itk.org/SimpleITKDoxygen09/html/classitk_1_1simple_1_1ImageRegis
trationMethod.html#a371bccf9aa6fd5981e9f616a6ae88296). We changed the
variable name to match the other optimizers
(https://issues.itk.org/jira/browse/SIMPLEITK-643).

This change is in our master and will appear in the next release (doxygen
for master 
http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ImageRegistr
ationMethod.html#abbc7ac9efb6de282513e41a8a8d81db7).

     sorry for the confusion

            Ziv


On 9/16/15, 11:42 AM, "Paolo Zaffino" <p.zaffino at yahoo.it> wrote:

>Hi Brad,
>yes, I get this error:
>
>/usr/lib/python3.4/site-packages/SimpleITK-0.9.0-py3.4-linux-x86_64.egg/Si
>mpleITK/SimpleITK.py
>in SetOptimizerAsLBFGSB(self, *args, **kwargs) 8706 8707 """ ->
>8708return _SimpleITK.ImageRegistrationMethod_SetOptimizerAsLBFGSB(self,
>*args, **kwargs)8709 8710 TypeError: 'numberOfIterations' is an invalid
>keyword argument for this function
>
>
>"maximumNumberOfIterations" runs without any problem.
>
>Regards.
>Paolo
>
>
>On 16/09/2015 16:00, Bradley Lowekamp wrote:
>> Hello,
>>
>> The file you linked is setting the keyword argument
>>"numberOfIterations" and it's tested nightly.
>>
>> Are you getting an error or incorrect results?
>>
>> Patches to fix errors are welcome.
>>
>> Thanks,
>> Brad
>>
>> On Sep 16, 2015, at 4:35 AM, Paolo Zaffino <p.zaffino at yahoo.it> wrote:
>>
>>> Dear all,
>>> I think I have found a typo into the SimpleITK example
>>>"ImageRegistrationMethodBSpline1.py" (in particular see [1]).
>>> I think that "maximumNumberOfIterations=100" should be
>>>"numberOfIterations=100".
>>> Am I wrong?
>>>
>>> Anyway thank you very much for the outstanding job...simpleITK is
>>>amazing!
>>>
>>> Best.
>>> Paolo
>>>
>>> [1] 
>>>https://github.com/SimpleITK/SimpleITK/blob/master/Examples/ImageRegistr
>>>ationMethodBSpline1.py#L51
>>> _______________________________________________
>>> 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://public.kitware.com/mailman/listinfo/insight-developers
>>> _______________________________________________
>>> Community mailing list
>>> Community at itk.org
>>> http://public.kitware.com/mailman/listinfo/community
>>
>
>_______________________________________________
>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://public.kitware.com/mailman/listinfo/insight-developers
>_______________________________________________
>Community mailing list
>Community at itk.org
>http://public.kitware.com/mailman/listinfo/community



More information about the Insight-developers mailing list