Commit 62478e70 authored by Kasper Marstal's avatar Kasper Marstal
Browse files

COMP: Fix module build system; ENH: Replace selxNewMacro with ITK calls

parent cf9a1c24
......@@ -86,9 +86,7 @@ macro( _selxmodule_enable MODULE UPSTREAM )
if( NOT ${MODULE}_IS_ENABLED )
set( ${MODULE}_IS_ENABLED TRUE )
message( STATUS "BEFORE ${MODULE} CMAKE FILE")
include( ${${MODULE}_CMAKE_FILE} )
message( STATUS "AFTER ${MODULE} CMAKE FILE")
if( ${MODULE}_INCLUDE_DIRS )
include_directories( ${${MODULE}_INCLUDE_DIRS} )
......@@ -127,9 +125,7 @@ macro( _selxmodule_enable MODULE UPSTREAM )
endmacro()
macro( _selxmodule_enable_dependencies UPSTREAM MODULES )
message( STATUS "ENABLNG ${MODOULES}")
foreach( MODULE ${${MODULES}} )
message( STATUS "ENABLNG ${MODULE}")
_selxmodule_enable( ${MODULE} ${UPSTREAM} )
endforeach()
endmacro()
......
......@@ -189,5 +189,6 @@ option( BUILD_READTHEDOCS "Enable building readthedocs.org documentation." OFF )
set( SUPERELASTIX_CONFIG_DIR ${CMAKE_CURRENT_BINARY_DIR} )
set( SUPERELASTIX_BINARY_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} )
get_directory_property( SUPERELASTIX_INCLUDE_DIRS INCLUDE_DIRECTORIES )
configure_file( SuperElastixConfig.cmake.in SuperElastixConfig.cmake @ONLY IMMEDIATE )
configure_file( UseSuperElastix.cmake.in UseSuperElastix.cmake COPYONLY IMMEDIATE )
\ No newline at end of file
......@@ -38,5 +38,7 @@ set( ${MODULE}_TEST_SOURCE_FILES
set( ${MODULE}_LIBRARIES
)
set( ${MODULE}_MODULE_DEPENDENCIES
set( ${MODULE}_MODULE_DEPENDENCIES
ModuleCommon
ModuleFileIO
)
......@@ -32,7 +32,6 @@
#include <cstring>
#include <map>
#include "selxMacro.h"
#include "selxBlueprint.h"
#include "selxNetworkContainer.h"
#include "selxInterfaces.h"
......
......@@ -33,7 +33,6 @@
#include "selxComponentBase.h"
#include "selxInterfaces.h"
#include "selxInterfaceTraits.h"
#include "selxMacro.h"
#include "selxBlueprint.h"
#include "selxNetworkContainer.h"
#include "selxAnyFileReader.h"
......@@ -57,8 +56,6 @@ public:
typedef std::map<
std::string, RegistrationControllerStartInterface * > RegistrationControllerStartInterfaceMapType;
typedef Blueprint::ComponentNamesType ComponentNamesType;
NetworkBuilderBase() {};
......
......@@ -20,7 +20,6 @@
#ifndef SuperElastixComponent_h
#define SuperElastixComponent_h
#include "selxMacro.h"
#include "selxComponentBase.h"
#include <typeinfo>
#include <string>
......
......@@ -25,7 +25,6 @@
#include <string.h>
#include <set>
#include "selxMacro.h"
namespace selx
{
......@@ -43,7 +42,17 @@ class RegistrationControllerComponent :
public:
selxNewMacro( RegistrationControllerComponent, ComponentBase );
/** Standard ITK typedefs. */
typedef RegistrationControllerComponent Self;
typedef ComponentBase Superclass;
typedef itk::SmartPointer< Self > Pointer;
typedef itk::SmartPointer< const Self > ConstPointer;
/** Method for creation through the object factory. */
itkNewMacro( Self );
/** Run-time type information (and related methods). */
itkTypeMacro( Self, ComponentBase );
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -40,6 +40,7 @@ include( ${ELASTIX_USE_FILE} )
set( ${MODULE}_INCLUDE_DIRS
${${MODULE}_SOURCE_DIR}/include
${${MODULE}_SOURCE_DIR}/interfaces
)
set( ${MODULE}_SOURCE_FILES
......
......@@ -30,7 +30,6 @@
#include "elxTransformixFilter.h"
#include <string.h>
#include "selxMacro.h"
namespace selx
{
......@@ -49,7 +48,17 @@ class ElastixComponent :
{
public:
selxNewMacro( ElastixComponent, ComponentBase );
/** Standard ITK typedefs. */
typedef ElastixComponent Self;
typedef ComponentBase Superclass;
typedef itk::SmartPointer< Self > Pointer;
typedef itk::SmartPointer< const Self > ConstPointer;
/** Method for creation through the object factory. */
itkNewMacro( Self );
/** Run-time type information (and related methods). */
itkTypeMacro( Self, ComponentBase );
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -31,7 +31,6 @@
#include "elxTransformixFilter.h"
#include <string.h>
#include "selxMacro.h"
namespace selx
{
template< int Dimensionality, class TPixel >
......@@ -50,7 +49,17 @@ class MonolithicElastixComponent :
{
public:
selxNewMacro( MonolithicElastixComponent, ComponentBase );
/** Standard ITK typedefs. */
typedef MonolithicElastixComponent Self;
typedef ComponentBase Superclass;
typedef itk::SmartPointer< Self > Pointer;
typedef itk::SmartPointer< const Self > ConstPointer;
/** Method for creation through the object factory. */
itkNewMacro( Self );
/** Run-time type information (and related methods). */
itkTypeMacro( Self, ComponentBase );
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -31,7 +31,7 @@
#include "elxTransformixFilter.h"
#include <string.h>
#include "selxMacro.h"
namespace selx
{
template< int Dimensionality, class TPixel >
......@@ -50,7 +50,17 @@ class MonolithicTransformixComponent :
{
public:
selxNewMacro( MonolithicTransformixComponent, ComponentBase );
/** Standard ITK typedefs. */
typedef MonolithicTransformixComponent Self;
typedef ComponentBase Superclass;
typedef itk::SmartPointer< Self > Pointer;
typedef itk::SmartPointer< const Self > ConstPointer;
/** Method for creation through the object factory. */
itkNewMacro( Self );
/** Run-time type information (and related methods). */
itkTypeMacro( Self, ComponentBase );
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -19,6 +19,7 @@
set( ${MODULE}_INCLUDE_DIRS
${${MODULE}_SOURCE_DIR}/include
${${MODULE}_SOURCE_DIR}/interfaces
)
set( ${MODULE}_SOURCE_FILES
......@@ -37,3 +38,7 @@ set( ${MODULE}_SOURCE_FILES
set( ${MODULE}_LIBRARIES
${MODULE}
)
set( ${MODULE}_MODULE_DEPENDENCIES
ModuleComponentInterface
)
......@@ -22,7 +22,6 @@
#include "selxSuperElastixComponent.h"
#include "selxExamplesInterfaces.h"
#include "selxMacro.h"
namespace selx
{
......@@ -41,7 +40,6 @@ public:
typedef itk::SmartPointer< const Self > ConstPointer;
/** New macro for creation of through the object factory. */
//selxNewMacro(Self, ComponentBase);
itkNewMacro( Self );
/** Run-time type information (and related methods). */
......
......@@ -23,7 +23,6 @@
#include "selxSuperElastixComponent.h"
#include "selxExamplesInterfaces.h"
#include "selxMacro.h"
namespace selx
{
......@@ -42,7 +41,6 @@ public:
typedef itk::SmartPointer< const Self > ConstPointer;
/** New macro for creation of through the object factory. */
//selxNewMacro(Self, ComponentBase);
itkNewMacro( Self );
/** Run-time type information (and related methods). */
......
......@@ -40,7 +40,17 @@ class ItkSmoothingRecursiveGaussianImageFilterComponent :
{
public:
selxNewMacro( ItkSmoothingRecursiveGaussianImageFilterComponent, ComponentBase );
/** Standard ITK typedefs. */
typedef ItkSmoothingRecursiveGaussianImageFilterComponent Self;
typedef ComponentBase Superclass;
typedef itk::SmartPointer< Self > Pointer;
typedef itk::SmartPointer< const Self > ConstPointer;
/** Method for creation through the object factory. */
itkNewMacro( Self );
/** Run-time type information (and related methods). */
itkTypeMacro( Self, ComponentBase );
// itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -22,7 +22,6 @@
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include <string.h>
#include "selxMacro.h"
//#include "_reg_f3d.h"
#include "_reg_ReadWriteImage.h"
#include "_reg_ReadWriteMatrix.h"
......
......@@ -24,7 +24,6 @@
#include "selxInterfaces.h"
#include "selxNiftyregInterfaces.h"
#include <string.h>
#include "selxMacro.h"
//#include "_reg_f3d.h"
#include "_reg_ReadWriteImage.h"
#include "_reg_ReadWriteMatrix.h"
......@@ -41,8 +40,18 @@ class NiftyregReadImageComponent :
{
public:
selxNewMacro( NiftyregReadImageComponent, ComponentBase );
/** Standard ITK typedefs. */
typedef NiftyregReadImageComponent Self;
typedef ComponentBase Superclass;
typedef itk::SmartPointer< Self > Pointer;
typedef itk::SmartPointer< const Self > ConstPointer;
/** Method for creation through the object factory. */
itkNewMacro( Self );
/** Run-time type information (and related methods). */
itkTypeMacro( Self, ComponentBase );
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
NiftyregReadImageComponent();
......
......@@ -26,7 +26,6 @@
#include "_reg_f3d.h"
#include <string.h>
#include "selxMacro.h"
namespace selx
{
template< class TPixel >
......@@ -38,7 +37,17 @@ class Niftyregf3dComponent :
{
public:
selxNewMacro( Niftyregf3dComponent, ComponentBase );
/** Standard ITK typedefs. */
typedef Niftyregf3dComponent Self;
typedef ComponentBase Superclass;
typedef itk::SmartPointer< Self > Pointer;
typedef itk::SmartPointer< const Self > ConstPointer;
/** Method for creation through the object factory. */
itkNewMacro( Self );
/** Run-time type information (and related methods). */
itkTypeMacro( Self, ComponentBase );
// itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -19,6 +19,7 @@
set( ${MODULE}_INCLUDE_DIRS
${${MODULE}_SOURCE_DIR}/include
${${MODULE}_SOURCE_DIR}/interfaces
)
# This module is header-only and does not contain any source files
......
......@@ -25,7 +25,6 @@
#include "selxItkObjectInterfaces.h"
#include <string.h>
#include "selxMacro.h"
#include "itkImageFileWriter.h"
#include "selxAnyFileWriter.h"
#include "selxFileWriterDecorator.h"
......@@ -41,7 +40,17 @@ class DisplacementFieldItkImageFilterSinkComponent :
{
public:
selxNewMacro( DisplacementFieldItkImageFilterSinkComponent, ComponentBase );
/** Standard ITK typedefs. */
typedef DisplacementFieldItkImageFilterSinkComponent Self;
typedef ComponentBase Superclass;
typedef itk::SmartPointer< Self > Pointer;
typedef itk::SmartPointer< const Self > ConstPointer;
/** Method for creation through the object factory. */
itkNewMacro( Self );
/** Run-time type information (and related methods). */
itkTypeMacro( Self, ComponentBase );
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment