Loading...
Searching...
No Matches
elxMacro.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef elxMacro_h
#define elxMacro_h
// Avoid creation of multiple instances of `itk::ImageIOFactoryRegisterManager`, `itk::MeshIOFactoryRegisterManager`,
// and `itk::TransformIOFactoryRegisterManager`.
#undef ITK_IO_FACTORY_REGISTER_MANAGER
#include "itkWin32Header.h"
#include "itkMacro.h"
#define elxInstallMacro(_classname) \
extern "C" int _classname##InstallComponent(::elastix::ComponentDatabase * _cdb) \
{ \
return ::elastix::ComponentInstaller<::elastix::_classname>::DO(_cdb); \
} // ignore semicolon
#define elxClassNameMacro(_name) \
static const char * elxGetClassNameStatic() { return _name; } \
const char * elxGetClassName() const override { return _name; }
#define elxDeclarePureVirtualGetSelfMacro(type) \
virtual const type & GetSelf() const override = 0; \
virtual type & GetSelf() override = 0
#define elxOverrideGetSelfMacro \
auto GetSelf() const->decltype(*this) override { return *this; } \
auto GetSelf()->decltype(*this) override { return *this; } \
static void GetSelf(const void *) = delete
#define elxout ::xl::xout["standard"]
/********************************************************************************
* *
* Dll export *
* *
********************************************************************************/
#if (defined(_WIN32) || defined(WIN32))
# define ELASTIXLIB_API
#else
# if (__GNUC__ >= 4 || defined(__clang__))
# define ELASTIXLIB_API __attribute__((visibility("default")))
# else
# define ELASTIXLIB_API
# endif
#endif
#endif // end #ifndef elxMacro_h

Generated on 1768596610 for elastix by 1.15.0 |