[ITK-dev] ITK API Change (was ITKApps failing after recent commit)

Bill Lorensen bill.lorensen at gmail.com
Tue May 26 11:26:10 EDT 2015


itkEventMacro no longer works the way it used to. Applications that used
itkEventMacro(myEvent, itk::UserEvent);
must break up the statement into two statements and two files:
in the .h file
itkEventMacroDeclaration(myEvent,itk::UserEvent);
in the .cxx file
itkEventMacroDefinition(myEvent,itk::UserEvent);

The problems occurs when an application has multiple source files that
include the file with itkEventMacro. Duplicate symbols are created
now. Prior to the API-break this was fine.

Application code that uses itkEventMacro that wants to support ITK
pre-the-API-break and post-the-API-break will need further statements.

I am working on getting the ITKApps to work with both pre and post
API-break versions.

The unintended consequences of this API break are troublesome.

On Mon, May 25, 2015 at 3:10 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> itksnap also has issues with the API change. I'll try to make a small
> example that illustrates the problem.
>
>
>
> On Mon, May 25, 2015 at 12:08 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> Looks to me that the API for itkEventMacro has changed. This is bad.
>> In ITKApps there are several definitions like this. How must these be
>> changed?
>>
>> namespace fltk {
>>
>> /**
>>  *  List of the events expected in this domain
>>  */
>> itkEventMacro( RedrawEvent,            itk::UserEvent );
>> itkEventMacro( GlDrawEvent,            itk::UserEvent );
>> itkEventMacro( VolumeReslicedEvent,    itk::UserEvent );
>> itkEventMacro( ClippingPlaneEvent,     itk::UserEvent );
>>
>>
>>
>> } // end namespace fltk
>>
>>
>> On Mon, May 25, 2015 at 11:59 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>> Since this topic was merged, ITKApps failk to build. I narrowed it
>>> down using git commit.
>>>
>>> http://review.source.kitware.com/#/c/19729/
>>>
>>> Here is the failing dashboard entry:
>>> https://open.cdash.org/viewBuildError.php?buildid=3828894
>>>
>>> I'll take a lot to see if I can fix it.
>>>
>>> Bill
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the Insight-developers mailing list