42 #include "itkConfigure.h"
43 #include "ITKCommonExport.h"
72 #define ITK_PRAGMA(x) _Pragma (#x)
78 #if defined(__clang__) && defined(__has_warning)
79 #define CLANG_PRAGMA_PUSH ITK_PRAGMA(clang diagnostic push)
80 #define CLANG_PRAGMA_POP ITK_PRAGMA(clang diagnostic pop)
81 # if __has_warning("-Wfloat-equal")
82 #define CLANG_SUPPRESS_Wfloat_equal ITK_PRAGMA( clang diagnostic ignored "-Wfloat-equal" )
85 #define CLANG_PRAGMA_PUSH
86 #define CLANG_PRAGMA_POP
87 #define CLANG_SUPPRESS_Wfloat_equal
96 #if defined( __GNUC__ ) && !defined( __INTEL_COMPILER )
97 # if ( __GNUC__ > 4 ) || (( __GNUC__ >= 4 ) && ( __GNUC_MINOR__ >= 2 ))
98 # define ITK_GCC_PRAGMA_DIAG(x) ITK_PRAGMA(GCC diagnostic x)
100 # define ITK_GCC_PRAGMA_DIAG(x)
103 # define ITK_GCC_PRAGMA_DIAG(x)
115 #if defined( __GNUC__ ) && !defined( __INTEL_COMPILER )
116 # if ( __GNUC__ > 4 ) || (( __GNUC__ >= 4 ) && ( __GNUC_MINOR__ >= 6 ))
117 # define ITK_GCC_PRAGMA_DIAG_PUSH() ITK_GCC_PRAGMA_DIAG(push)
118 # define ITK_GCC_PRAGMA_DIAG_POP() ITK_GCC_PRAGMA_DIAG(pop)
119 # define ITK_HAS_GCC_PRAGMA_DIAG_PUSHPOP
121 # define ITK_GCC_PRAGMA_DIAG_PUSH()
122 # define ITK_GCC_PRAGMA_DIAG_POP()
125 # define ITK_GCC_PRAGMA_DIAG_PUSH()
126 # define ITK_GCC_PRAGMA_DIAG_POP()
140 #if defined( _MSC_VER ) && ( _MSC_VER < 1310 )
143 #if defined( __SUNPRO_CC ) && ( __SUNPRO_CC < 0x590 )
144 #error "__SUNPRO_CC < 0x590 not supported under ITKv4"
146 #if defined( __CYGWIN__ )
147 #error "The Cygwin compiler is not supported in ITKv4 and above"
149 #if defined( __BORLANDC__ )
150 #error "The Borland C compiler is not supported in ITKv4 and above"
152 #if defined( __MWERKS__ )
153 #error "The MetroWerks compiler is not supported in ITKv4 and above"
155 #if defined( __GNUC__ ) && ( __GNUC__ < 3 )
156 #error "The __GNUC__ version 2.95 compiler is not supprted under ITKv4 and above"
161 #error "The __sgi compiler is not supprted under ITKv4 and above"
166 #if defined( _WIN32 ) || defined ( WIN32 )
167 #define ITK_ABI_IMPORT __declspec(dllimport)
168 #define ITK_ABI_EXPORT __declspec(dllexport)
169 #define ITK_ABI_HIDDEN
172 #define ITK_ABI_IMPORT __attribute__ ((visibility ("default")))
173 #define ITK_ABI_EXPORT __attribute__ ((visibility ("default")))
174 #define ITK_ABI_HIDDEN __attribute__ ((visibility ("hidden")))
176 #define ITK_ABI_IMPORT
177 #define ITK_ABI_EXPORT
178 #define ITK_ABI_HIDDEN
182 #if __cplusplus >= 201103L
186 #define ITK_OVERRIDE override
189 #define ITK_DELETE_FUNCTION =delete
195 #define ITK_NULLPTR nullptr
201 #define ITK_NOEXCEPT noexcept
202 #define ITK_HAS_CXX11_STATIC_ASSERT
203 #define ITK_HAS_CXX11_RVREF
206 #define ITK_DELETE_FUNCTION
207 #define ITK_NULLPTR NULL
208 #define ITK_NOEXCEPT throw()
232 #define itkNewMacro(x) \
233 itkSimpleNewMacro(x) \
234 itkCreateAnotherMacro(x) \
237 #define itkSimpleNewMacro(x) \
238 static Pointer New(void) \
240 Pointer smartPtr = ::itk::ObjectFactory< x >::Create(); \
241 if ( smartPtr.GetPointer() == ITK_NULLPTR ) \
245 smartPtr->UnRegister(); \
249 #define itkCreateAnotherMacro(x) \
250 virtual ::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE \
252 ::itk::LightObject::Pointer smartPtr; \
253 smartPtr = x::New().GetPointer(); \
257 #define itkCloneMacro(x) \
258 Pointer Clone() const \
261 dynamic_cast<x *>(this->InternalClone().GetPointer()); \
281 #define itkFactorylessNewMacro(x) \
282 static Pointer New(void) \
285 x * rawPtr = new x; \
287 rawPtr->UnRegister(); \
290 virtual ::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE \
292 ::itk::LightObject::Pointer smartPtr; \
293 smartPtr = x::New().GetPointer(); \
300 #define itkTypeMacro(thisClass, superclass) \
301 virtual const char *GetNameOfClass() const ITK_OVERRIDE \
306 #define itkTypeMacroNoParent(thisClass) \
307 virtual const char *GetNameOfClass() const \
320 extern ITKCommon_EXPORT
void OutputWindowDisplayText(
const char *);
323 extern ITKCommon_EXPORT
void OutputWindowDisplayErrorText(
const char *);
325 extern ITKCommon_EXPORT
void OutputWindowDisplayWarningText(
const char *);
327 extern ITKCommon_EXPORT
void OutputWindowDisplayGenericOutputText(
const char *);
329 extern ITKCommon_EXPORT
void OutputWindowDisplayDebugText(
const char *);
335 #if defined( NDEBUG )
336 #define itkDebugMacro(x)
337 #define itkDebugStatement(x)
339 #define itkDebugMacro(x) \
341 if ( this->GetDebug() && ::itk::Object::GetGlobalWarningDisplay() ) \
343 std::ostringstream itkmsg; \
344 itkmsg << "Debug: In " __FILE__ ", line " << __LINE__ << "\n" \
345 << this->GetNameOfClass() << " (" << this << "): " x \
347 ::itk::OutputWindowDisplayDebugText( itkmsg.str().c_str() ); \
354 #define itkDebugStatement(x) x
360 #define itkWarningMacro(x) \
362 if ( ::itk::Object::GetGlobalWarningDisplay() ) \
364 std::ostringstream itkmsg; \
365 itkmsg << "WARNING: In " __FILE__ ", line " << __LINE__ << "\n" \
366 << this->GetNameOfClass() << " (" << this << "): " x \
368 ::itk::OutputWindowDisplayWarningText( itkmsg.str().c_str() ); \
375 #define itkWarningStatement(x) x
377 #if defined( ITK_CPP_FUNCTION )
378 #if defined( _WIN32 ) && !defined( __MINGW32__ ) && !defined( ITK_WRAPPING_PARSER )
379 #define ITK_LOCATION __FUNCSIG__
380 #elif defined( __GNUC__ )
381 #define ITK_LOCATION __PRETTY_FUNCTION__
383 #define ITK_LOCATION __FUNCTION__
386 #define ITK_LOCATION "unknown"
394 #define itkExceptionMacro(x) \
396 std::ostringstream message; \
397 message << "itk::ERROR: " << this->GetNameOfClass() \
398 << "(" << this << "): " x; \
399 ::itk::ExceptionObject e_(__FILE__, __LINE__, message.str().c_str(), ITK_LOCATION); \
404 #define itkGenericExceptionMacro(x) \
406 std::ostringstream message; \
407 message << "itk::ERROR: " x; \
408 ::itk::ExceptionObject e_(__FILE__, __LINE__, message.str().c_str(), ITK_LOCATION); \
412 #define itkDeclareExceptionMacro(newexcp,parentexcp,whatmessage) \
414 class newexcp : public parentexcp \
417 newexcp( const char *file, unsigned int lineNumber ) : \
418 parentexcp( file, lineNumber ) \
420 this->SetDescription( whatmessage ); \
422 newexcp( const std::string & file, unsigned int lineNumber ) : \
423 parentexcp( file, lineNumber ) \
425 this->SetDescription( whatmessage ); \
427 itkTypeMacro(newexcp, parentexcp); \
431 #define itkSpecializedExceptionMacro(exceptiontype) \
433 ::itk::exceptiontype e_(__FILE__, __LINE__); \
434 e_.SetLocation(ITK_LOCATION); \
438 #define itkSpecializedMessageExceptionMacro(exceptiontype,x) \
440 ::itk::exceptiontype e_(__FILE__, __LINE__); \
441 std::ostringstream message; \
442 message << "itk::ERROR: " x; \
443 e_.SetDescription(message.str().c_str()); \
444 e_.SetLocation(ITK_LOCATION); \
449 #define itkGenericOutputMacro(x) \
451 if ( ::itk::Object::GetGlobalWarningDisplay() ) \
453 std::ostringstream itkmsg; \
454 itkmsg << "WARNING: In " __FILE__ ", line " << __LINE__ << "\n" \
456 ::itk::OutputWindowDisplayGenericOutputText( itkmsg.str().c_str() ); \
463 #define itkLogMacro(x, y) \
465 if ( this->GetLogger() ) \
467 this->GetLogger()->Write(::itk::LoggerBase::x, y); \
471 #define itkLogMacroStatic(obj, x, y) \
473 if ( obj->GetLogger() ) \
475 obj->GetLogger()->Write(::itk::LoggerBase::x, y); \
503 #if defined( ITK_LEGACY_REMOVE )
504 #define itkLegacyMacro(method)
505 #elif defined( ITK_LEGACY_SILENT ) || defined( ITK_LEGACY_TEST ) || defined( ITK_WRAPPING_PARSER )
507 #define itkLegacyMacro(method) method
511 #if defined( __GNUC__ ) && !defined( __INTEL_COMPILER ) && ( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 ) )
512 #define itkLegacyMacro(method) method __attribute__( ( deprecated ) )
513 #elif defined( _MSC_VER )
514 #define itkLegacyMacro(method) __declspec(deprecated) method
516 #define itkLegacyMacro(method) method
535 #if defined( ITK_LEGACY_REMOVE ) || defined( ITK_LEGACY_SILENT )
536 #define itkLegacyBodyMacro(method, version)
537 #define itkLegacyReplaceBodyMacro(method, version, replace)
538 #define itkGenericLegacyBodyMacro(method, version)
539 #define itkGenericLegacyReplaceBodyMacro(method, version, replace)
541 #define itkLegacyBodyMacro(method, version) \
542 itkWarningMacro(#method " was deprecated for ITK " #version " and will be removed in a future version.")
543 #define itkLegacyReplaceBodyMacro(method, version, replace) \
545 #method " was deprecated for ITK " #version " and will be removed in a future version. Use " #replace \
547 #define itkGenericLegacyBodyMacro(method, version) \
548 itkGenericOutputMacro(#method " was deprecated for ITK " #version " and will be removed in a future version.")
549 #define itkGenericLegacyReplaceBodyMacro(method, version, replace) \
550 itkGenericOutputMacro( \
551 #method " was deprecated for ITK " #version " and will be removed in a future version. Use " #replace \
555 #if defined ( ITK_LEGACY_REMOVE )
556 #define ITK_TEMPLATE_TXX "error ITK_TEMPLATE_TXX is no longer a supported identifier, you should replace with ITK_MANUAL_INSTANTIATION as a replacement"
558 #define ITK_TEMPLATE_TXX 1
566 #define ITK_CACHE_LINE_ALIGNMENT 64
574 #define itkPadStruct( mincachesize, oldtype, newtype ) \
575 struct newtype: public oldtype \
577 char _StructPadding[mincachesize - (sizeof(oldtype)%mincachesize) ]; \
584 #if defined( ITK_HAS_GNU_ATTRIBUTE_ALIGNED )
585 # define itkAlignedTypedef( alignment, oldtype, newtype ) \
586 typedef oldtype newtype __attribute__((aligned(alignment)))
587 #elif defined ( _MSC_VER )
588 # define itkAlignedTypedef( alignment, oldtype, newtype ) \
589 typedef __declspec(align( alignment )) oldtype newtype
591 # define itkAlignedTypedef( alignment, oldtype, newtype ) \
592 typedef oldtype newtype
624 #if defined( ITK_SUPPORTS_TEMPLATED_FRIEND_FUNCTION_WITH_NULL_STRING )
625 #define ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT(T)
627 #if defined( ITK_SUPPORTS_TEMPLATED_FRIEND_FUNCTION_WITH_EMPTY_BRACKETS )
628 #define ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT(T) < >
630 #if defined( ITK_SUPPORTS_TEMPLATED_FRIEND_FUNCTION_WITH_TEMPLATE_ARGUMENTS )
631 #define ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT(T) < T >
637 #if ( defined ( _MSC_VER ) && ( _MSC_VER >= 1600 ) )
638 #ifdef ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT
639 #undef ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT
641 #define ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT(T)
657 #define itkForLoopAssignmentMacro(DestinationType, \
659 DestinationElementType, \
662 NumberOfIterations) \
663 for ( unsigned int i = 0; i < NumberOfIterations; ++i ) \
665 DestinationArray[i] = static_cast< DestinationElementType >( SourceArray[i] ); \
677 #define itkForLoopRoundingAndAssignmentMacro(DestinationType, \
678 Sourcrnd_halfintup, \
679 DestinationElementType, \
682 NumberOfIterations) \
683 for ( unsigned int i = 0; i < NumberOfIterations; ++i ) \
685 DestinationArray[i] = itk::Math::Round< DestinationElementType >(SourceArray[i]); \
693 #define itkAssertInDebugOrThrowInReleaseMacro(msg) __assert_fail (msg, __FILE__, __LINE__, __ASSERT_FUNCTION);
695 #define itkAssertInDebugOrThrowInReleaseMacro(msg) itkGenericExceptionMacro(<< msg);
699 #define itkAssertInDebugOrThrowInReleaseMacro(msg) itkGenericExceptionMacro(<< msg);
702 #define itkAssertOrThrowMacro(test, message) \
705 std::ostringstream msgstr; \
707 itkAssertInDebugOrThrowInReleaseMacro( msgstr.str().c_str() ); \
711 #define itkAssertInDebugAndIgnoreInReleaseMacro(X) assert(X)
713 #define itkAssertInDebugAndIgnoreInReleaseMacro(X)
716 #ifdef ITKV3_COMPATIBILITY
720 #define ITK_TYPENAME typename
726 template <
typename TTarget,
typename TSource>
727 TTarget itkDynamicCastInDebugMode(TSource x)
734 TTarget rval =
dynamic_cast<TTarget
>(x);
737 itkGenericExceptionMacro(<<
"Failed dynamic cast to "
738 <<
typeid(TTarget).name()
740 << x->GetNameOfClass());
744 return static_cast<TTarget
>(x);
768 #if __cplusplus >= 201103L
769 # define itkStaticConstMacro(name,type,value) static constexpr type name = value
770 #elif defined(__GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__ ) < 405 && !defined( __clang__ ) && !defined( __INTEL_COMPILER )
771 # define itkStaticConstMacro(name,type,value) enum { name = value }
773 # define itkStaticConstMacro(name,type,value) static const type name = value
776 #define itkGetStaticConstMacro(name) (Self::name)
779 #define itkSetInputMacro(name, type) \
780 virtual void Set##name(const type *_arg) \
782 itkDebugMacro("setting input " #name " to " << _arg); \
783 if ( _arg != itkDynamicCastInDebugMode< type * >( this->ProcessObject::GetInput(#name) ) ) \
785 this->ProcessObject::SetInput( #name, const_cast< type * >( _arg ) ); \
792 #define itkGetInputMacro(name, type) \
793 virtual const type * Get##name() const \
795 itkDebugMacro( "returning input " << #name " of " << this->ProcessObject::GetInput(#name) ); \
796 return itkDynamicCastInDebugMode< const type * >( this->ProcessObject::GetInput(#name) ); \
801 #define itkSetDecoratedInputMacro(name, type) \
802 virtual void Set##name##Input(const SimpleDataObjectDecorator< type > *_arg) \
804 itkDebugMacro("setting input " #name " to " << _arg); \
805 if ( _arg != itkDynamicCastInDebugMode< SimpleDataObjectDecorator< type > * >( this->ProcessObject::GetInput(#name) ) ) \
807 this->ProcessObject::SetInput( #name, const_cast< SimpleDataObjectDecorator< type > * >( _arg ) ); \
811 virtual void Set##name(const SimpleDataObjectDecorator< type > *_arg) \
813 this->Set##name##Input(_arg); \
815 virtual void Set##name(const type &_arg) \
817 typedef SimpleDataObjectDecorator< type > DecoratorType; \
818 itkDebugMacro("setting input " #name " to " << _arg); \
819 const DecoratorType *oldInput = \
820 itkDynamicCastInDebugMode< const DecoratorType * >( \
821 this->ProcessObject::GetInput(#name) ); \
823 CLANG_SUPPRESS_Wfloat_equal \
824 if ( oldInput && oldInput->Get() == _arg ) \
829 typename DecoratorType::Pointer newInput = DecoratorType::New(); \
830 newInput->Set(_arg); \
831 this->Set##name##Input(newInput); \
836 #define itkGetDecoratedInputMacro(name, type) \
837 virtual const SimpleDataObjectDecorator< type > * Get##name##Input() const \
839 itkDebugMacro( "returning input " << #name " of " << this->ProcessObject::GetInput(#name) ); \
840 return itkDynamicCastInDebugMode< const SimpleDataObjectDecorator< type > * >( this->ProcessObject::GetInput(#name) ); \
842 virtual const type & Get##name() const \
844 itkDebugMacro("Getting input " #name); \
845 typedef SimpleDataObjectDecorator< type > DecoratorType; \
846 const DecoratorType *input = \
847 itkDynamicCastInDebugMode< const DecoratorType * >( \
848 this->ProcessObject::GetInput(#name) ); \
849 if( input == ITK_NULLPTR ) \
851 itkExceptionMacro(<<"input" #name " is not set"); \
853 return input->Get(); \
859 #define itkSetGetDecoratedInputMacro(name, type) \
860 itkSetDecoratedInputMacro(name, type) \
861 itkGetDecoratedInputMacro(name, type)
867 #define itkSetDecoratedObjectInputMacro(name, type) \
868 virtual void Set##name##Input(const DataObjectDecorator< type > *_arg) \
870 itkDebugMacro("setting input " #name " to " << _arg); \
871 if ( _arg != itkDynamicCastInDebugMode< DataObjectDecorator< type > * >( this->ProcessObject::GetInput(#name) ) ) \
873 this->ProcessObject::SetInput( #name, const_cast< DataObjectDecorator< type > * >( _arg ) ); \
877 virtual void Set##name(const type * _arg) \
879 typedef DataObjectDecorator< type > DecoratorType; \
880 itkDebugMacro("setting input " #name " to " << _arg); \
881 const DecoratorType *oldInput = \
882 itkDynamicCastInDebugMode< const DecoratorType * >( \
883 this->ProcessObject::GetInput(#name) ); \
884 if ( oldInput && oldInput->Get() == _arg ) \
888 typename DecoratorType::Pointer newInput = DecoratorType::New(); \
889 newInput->Set(_arg); \
890 this->Set##name##Input(newInput); \
898 #define itkGetDecoratedObjectInputMacro(name, type) \
899 virtual const DataObjectDecorator< type > * Get##name##Input() const \
901 itkDebugMacro( "returning input " << #name " of "<< this->ProcessObject::GetInput(#name) ); \
902 return itkDynamicCastInDebugMode< const DataObjectDecorator< type > * >( this->ProcessObject::GetInput(#name) ); \
904 virtual const type * Get##name() const \
906 itkDebugMacro("Getting input " #name); \
907 typedef DataObjectDecorator< type > DecoratorType; \
908 const DecoratorType *input = \
909 itkDynamicCastInDebugMode< const DecoratorType * >( \
910 this->ProcessObject::GetInput(#name) ); \
911 if( input == ITK_NULLPTR ) \
913 return ITK_NULLPTR; \
915 return input->Get(); \
921 #define itkSetGetDecoratedObjectInputMacro(name, type) \
922 itkSetDecoratedObjectInputMacro(name, type) \
923 itkGetDecoratedObjectInputMacro(name, type)
926 #define itkSetMacro(name, type) \
927 virtual void Set##name (const type _arg) \
929 itkDebugMacro("setting " #name " to " << _arg); \
931 CLANG_SUPPRESS_Wfloat_equal \
932 if ( this->m_##name != _arg ) \
934 this->m_##name = _arg; \
942 #define itkGetMacro(name, type) \
943 virtual type Get##name () \
945 return this->m_##name; \
952 #define itkGetConstMacro(name, type) \
953 virtual type Get##name () const \
955 return this->m_##name; \
963 #define itkGetConstReferenceMacro(name, type) \
964 virtual const type &Get##name () const \
966 return this->m_##name; \
974 #define itkSetEnumMacro(name, type) \
975 virtual void Set##name (const type _arg) \
977 itkDebugMacro( "setting " #name " to " << static_cast< long >( _arg ) ); \
978 if ( this->m_##name != _arg ) \
980 this->m_##name = _arg; \
990 #define itkGetEnumMacro(name, type) \
991 virtual type Get##name () const \
993 return this->m_##name; \
1000 #define itkSetStringMacro(name) \
1001 virtual void Set##name (const char *_arg) \
1003 if ( _arg && ( _arg == this->m_##name ) ) { return; } \
1006 this->m_##name = _arg; \
1010 this->m_##name = ""; \
1014 virtual void Set##name (const std::string & _arg) \
1016 this->Set##name( _arg.c_str() ); \
1024 #define itkGetStringMacro(name) \
1025 virtual const char *Get##name () const \
1027 return this->m_##name.c_str(); \
1033 #define itkSetClampMacro(name, type, min, max) \
1034 virtual void Set##name (type _arg) \
1036 const type temp_extrema=( _arg < min ? min : ( _arg > max ? max : _arg ) );\
1037 itkDebugMacro("setting " << #name " to " << _arg); \
1039 CLANG_SUPPRESS_Wfloat_equal \
1040 if ( this->m_##name != temp_extrema ) \
1042 this->m_##name = temp_extrema; \
1054 #define itkSetObjectMacro(name, type) \
1055 virtual void Set##name (type * _arg) \
1057 itkDebugMacro("setting " << #name " to " << _arg); \
1059 CLANG_SUPPRESS_Wfloat_equal \
1060 if ( this->m_##name != _arg ) \
1062 this->m_##name = _arg; \
1094 #define itkGetConstObjectMacro(name, type) \
1095 virtual const type * Get##name () const \
1097 return this->m_##name.GetPointer(); \
1101 #if defined ( ITK_FUTURE_LEGACY_REMOVE )
1107 # define itkGetObjectMacro(name, type) \
1108 virtual type * Get##name () \
1110 purposeful_error("itkGetObjectMacro should be replaced with itkGetModifiableObjectMacro."); \
1113 # define itkGetModifiableObjectMacro(name, type) \
1114 virtual type * GetModifiable##name () \
1116 return this->m_##name.GetPointer(); \
1118 itkGetConstObjectMacro(name, type)
1120 #else // defined ( ITK_FUTURE_LEGACY_REMOVE )
1123 # define itkGetObjectMacro(name, type) \
1124 virtual type * Get##name () \
1126 return this->m_##name.GetPointer(); \
1128 # define itkGetModifiableObjectMacro(name, type) \
1129 virtual type * GetModifiable##name () \
1131 return this->m_##name.GetPointer(); \
1133 itkGetConstObjectMacro(name, type) \
1134 itkGetObjectMacro(name, type)
1135 #endif // defined ( ITK_FUTURE_LEGACY_REMOVE )
1144 #define itkGetConstReferenceObjectMacro(name, type) \
1145 virtual const typename type::Pointer & Get##name () const \
1147 return this->m_##name; \
1154 #define itkSetConstObjectMacro(name, type) \
1155 virtual void Set##name (const type * _arg) \
1157 itkDebugMacro("setting " << #name " to " << _arg); \
1158 if ( this->m_##name != _arg ) \
1160 this->m_##name = _arg; \
1168 #define itkBooleanMacro(name) \
1169 virtual void name##On () \
1171 this->Set##name(true); \
1173 virtual void name##Off () \
1175 this->Set##name(false); \
1182 #define itkSetVectorMacro(name, type, count) \
1183 virtual void Set##name(type data[]) \
1186 for ( i = 0; i < count; i++ ) \
1189 CLANG_SUPPRESS_Wfloat_equal \
1190 if ( data[i] != this->m_##name[i] ) \
1199 for ( i = 0; i < count; i++ ) \
1201 this->m_##name[i] = data[i]; \
1209 #define itkGetVectorMacro(name, type, count) \
1210 virtual type * Get##name () const \
1212 return this->m_##name; \
1219 #define itkGPUKernelClassMacro(kernel) \