[ITK] [ITK-dev] Compile errors in wiki and sphinx examples after recent changes
Matt McCormick
matt.mccormick at kitware.com
Tue Jul 7 11:45:53 EDT 2015
The examples and apps highlight that this will be a headache for
pre-existing code. We could ensure a smooth transition by overloading
the SetFixedParameters methods with a backwards compatible versions
that accept ParametersType. This would prevent build errors. These
overloaded methods could also emit a warning that points to a
migration guide entry on why and how to upgrade the code.
2 cents,
Matt
On Tue, Jul 7, 2015 at 10:17 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Thanks. Works for me.
>
> Is this documented in the migration guide or somewhere else?
>
> Bill
>
>
> On Tue, Jul 7, 2015 at 9:34 AM, Johnson, Hans J <hans-johnson at uiowa.edu> wrote:
>> Bill,
>>
>> After several T-Con discussions and e-mails, it was determined that there
>> was no way to preserve backwards and forwards compatibility for fixing this
>> bug.
>>
>> Here is the solution that is inplace for ANTs and Slicer (NOTE BRAINSTools,
>> DTIPrep, DTIProcess, DTIReg, UKFTractography, SimpleITK, and many other
>> tools needed no modifications).
>>
>> #if defined(ITK_FIXED_PARAMETERS_ARE_DOUBLE) // After 4.8.1
>> typename BSplineTransformType::FixedParametersValueType
>> transformFixedParamsItk;
>> #else //Pre 4.8.1
>> typename BSplineTransformType::ParametersType transformFixedParamsItk;
>> #endif
>>
>> Hans
>>
>> ========================================================================
>> Hans J. Johnson, Ph.D., Associate Professor
>> Electrical and Computer Engineering (Primary), Biomedical Engineering,
>> Psychiatry
>> hans-johnson at uiowa.edu
>> (319) 621 7185 (cell)
>> (319) 384 3538 ECE Phone (Primary)
>> (319) 353 8587 Psychiatry Phone (Secondary)
>>
>> 4316 Seamans Center
>> Iowa City, IA 52242
>>
>> On Jul 7, 2015, at 7:48 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>
>> Hans,
>>
>> There is a problem with the change. My code will no longer build with
>> older versions of ITK.
>> I get:
>>
>> ITKWikiExamplesNightly/Utilities/FileOutputWindow.cxx:23: error:
>> 'FixedParametersType' is not a member of 'main(int,
>> char**)::TransformType'
>>
>> This is not good, unless I'm noising something...
>>
>> On Mon, Jul 6, 2015 at 4:23 PM, Bill Lorensen <bill.lorensen at gmail.com>
>> wrote:
>>
>> Hans,
>>
>> That was the problem. Just a surprise for me.
>>
>> Bill
>>
>>
>> On Mon, Jul 6, 2015 at 8:46 AM, Johnson, Hans J <hans-johnson at uiowa.edu>
>> wrote:
>>
>> Bill,
>>
>> The problem is almost certainly that the variable “parameters” is of type
>> “ParametersType” rather than “FixedParametersType”.
>>
>> // The ITK_FIXED_PARAMETERS_ARE_DOUBLE is intended
>> // to facilitate transition of ITK for those very
>> // rare cases where multiple versions of ITK
>> // may need to be supported simultaneously.
>> #if defined( ITK_LEGACY_REMOVE )
>> #undef ITK_FIXED_PARAMETERS_ARE_DOUBLE
>> #else
>> #define ITK_FIXED_PARAMETERS_ARE_DOUBLE
>> // #if !defined(ITK_FIXED_PARAMETERS_ARE_DOUBLE)
>> // typedef ParametersValueType FixedParametersValueType;
>> // #endif
>> #endif
>>
>>
>> Hans
>>
>>
>>
>> On Jul 6, 2015, at 6:52 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>
>> Folks,
>>
>> Something in this commit
>>
>> https://open.cdash.org/viewChanges.php?project=Insight&date=2015-07-04
>>
>> is causing these errors:
>>
>> https://open.cdash.org/viewBuildError.php?onlydeltap&buildid=3887517
>>
>> and
>>
>> https://open.cdash.org/viewBuildError.php?onlydeltap&buildid=3887806
>>
>> Bill
>> --
>> 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://public.kitware.com/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
>>
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>>
>>
>>
>>
>> ________________________________
>> 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
> _______________________________________________
> 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
More information about the Community
mailing list