Commit f55ecc3e authored by Floris Berendsen's avatar Floris Berendsen
Browse files

WIP: find "(?<=[^s])elx" and replace by "selx"

parent 0ab36a44
# ---------------------------------------------------------------------
# Private helper macros
macro( _elxmodule_check_name MODULE )
macro( _selxmodule_check_name MODULE )
if( NOT "${_name}" MATCHES "^[a-zA-Z_]*$" )
message( FATAL_ERROR "Invalid module name: ${MODULE}" )
endif()
......@@ -12,8 +12,8 @@ macro( _elxmodule_check_name MODULE )
endif()
endmacro()
macro( _elxmodule_enable MODULE_NAME )
_elxmodule_check_name( ${MODULE_NAME} )
macro( _selxmodule_enable MODULE_NAME )
_selxmodule_check_name( ${MODULE_NAME} )
if( NOT ${MODULE_NAME}_ENABLED )
set( ${MODULE_NAME}_ENABLED ON )
......@@ -38,11 +38,11 @@ macro( _elxmodule_enable MODULE_NAME )
endif()
endmacro()
macro( _elxmodule_disable MODULE_NAME )
# TODO: elxmodule_disable
macro( _selxmodule_disable MODULE_NAME )
# TODO: selxmodule_disable
endmacro()
macro( _elxmodules_initialize )
macro( _selxmodules_initialize )
set( SUPERELASTIX_MODULES )
set( SUPERELASTIX_LIBRARIES )
set( SUPERELASTIX_TESTS )
......@@ -73,12 +73,12 @@ macro( _elxmodules_initialize )
endforeach()
endmacro()
_elxmodules_initialize()
_selxmodules_initialize()
# ---------------------------------------------------------------------
# Public interface
macro( elxmodule_enable MODULE )
_elxmodule_enable( ${MODULE} )
macro( selxmodule_enable MODULE )
_selxmodule_enable( ${MODULE} )
endmacro()
......@@ -56,7 +56,7 @@ endif()
find_package( ITK REQUIRED )
include( ${ITK_USE_FILE} )
include("${CMAKE_CURRENT_SOURCE_DIR}/CMake/elxRequiredITKModules.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/CMake/selxRequiredITKModules.cmake")
# ---------------------------------------------------------------------
# Boost Graph Library
......@@ -67,14 +67,14 @@ include_directories( ${Boost_INCLUDE_DIRS} )
# Build SuperElastix
# For now we just enable all modules
include( elxModules )
elxmodule_enable( ModuleCore )
elxmodule_enable( ModuleElastix )
elxmodule_enable( ModuleExamples )
elxmodule_enable( ModuleSinksAndSources )
elxmodule_enable( ModuleItkSmoothingRecursiveGaussianImageFilter )
elxmodule_enable( ModuleItkImageRegistrationMethodv4 )
elxmodule_enable( ModuleElastixComponent )
include( selxModules )
selxmodule_enable( ModuleCore )
selxmodule_enable( ModuleElastix )
selxmodule_enable( ModuleExamples )
selxmodule_enable( ModuleSinksAndSources )
selxmodule_enable( ModuleItkSmoothingRecursiveGaussianImageFilter )
selxmodule_enable( ModuleItkImageRegistrationMethodv4 )
selxmodule_enable( ModuleElastixComponent )
# TODO: Build tests depending on enabled modules
# ---------------------------------------------------------------------
......
......@@ -30,6 +30,6 @@ set( ${MODULE}_LIBRARIES
# Export tests
set( ${MODULE}_TESTS
elxElastixFilterTest.cxx
elxTransformixFilterTest.cxx
selxElastixFilterTest.cxx
selxTransformixFilterTest.cxx
)
......@@ -28,7 +28,7 @@ set( ${MODULE}_LIBRARIES
# Export tests
set( ${MODULE}_TESTS
elxElastixComponentTest.cxx
selxElastixComponentTest.cxx
)
# Module source files
......
......@@ -5,12 +5,12 @@
#include "Interfaces.h"
#include "itkImageSource.h"
#include "elxElastixFilter.h"
#include "elxParameterObject.h"
#include "elxTransformixFilter.h"
#include "selxElastixFilter.h"
#include "selxParameterObject.h"
#include "selxTransformixFilter.h"
#include <string.h>
#include "elxMacro.h"
#include "selxMacro.h"
namespace selx
{
template <int Dimensionality, class TPixel>
......@@ -27,7 +27,7 @@ namespace selx
>
{
public:
elxNewMacro(ElastixComponent, ComponentBase);
selxNewMacro(ElastixComponent, ComponentBase);
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......@@ -50,8 +50,8 @@ namespace selx
typedef typename ConnectionImageType::Pointer ItkImagePointer;
typedef elastix::ElastixFilter< FixedImageType, MovingImageType > TheItkFilterType;
typedef elastix::ParameterObject elxParameterObjectType;
typedef elxParameterObjectType::Pointer elxParameterObjectPointer;
typedef elastix::ParameterObject selxParameterObjectType;
typedef selxParameterObjectType::Pointer selxParameterObjectPointer;
typedef elastix::TransformixFilter<FixedImageType> TransformixFilterType;
......@@ -70,7 +70,7 @@ namespace selx
static const char * GetDescription() { return "Elastix Component"; };
private:
typename TheItkFilterType::Pointer m_theItkFilter;
//elxParameterObjectPointer m_ParameterObject;
//selxParameterObjectPointer m_ParameterObject;
ItkImagePointer m_OutputImage;
protected:
......
......@@ -7,10 +7,10 @@ namespace selx
{
m_theItkFilter = TheItkFilterType::New();
// TODO: Due to some issues with Criteria being propagated as elastix settings, I need to empty the elxparameterObject.
elxParameterObjectPointer elxparameterObject = elxParameterObjectType::New();
elxparameterObject->SetParameterMap("rigid");
this->m_theItkFilter->SetParameterObject(elxparameterObject);
// TODO: Due to some issues with Criteria being propagated as elastix settings, I need to empty the selxparameterObject.
selxParameterObjectPointer selxparameterObject = selxParameterObjectType::New();
selxparameterObject->SetParameterMap("rigid");
this->m_theItkFilter->SetParameterObject(selxparameterObject);
m_theItkFilter->LogToConsoleOn();
//m_ParameterObject->SetParameterMap("rigid");
......@@ -130,21 +130,21 @@ namespace selx
}
else if (criterion.first == "RegistrationPreset") //Supports this?
{
// Temporary solution: RegistrationSettings: rigid, nonrigid, etc overwrite the current elxparameterObject.
// Warning: the order of Criteria matters, since elxparameterObject may be overwritten
// Temporary solution: RegistrationSettings: rigid, nonrigid, etc overwrite the current selxparameterObject.
// Warning: the order of Criteria matters, since selxparameterObject may be overwritten
// Warning: this probably fails because the Criteria map entries are processed in arbitrary order.
elxParameterObjectPointer elxparameterObject = elxParameterObjectType::New();
selxParameterObjectPointer selxparameterObject = selxParameterObjectType::New();
meetsCriteria = true;
for (auto const & transformtype : criterion.second) // auto&& preferred?
{
//this->m_ParameterObject->AddParameterMap(transformtype, const unsigned int numberOfResolutions = 3u, const double finalGridSpacingInPhysicalUnits = 10.0);
elxparameterObject->SetParameterMap(transformtype);
selxparameterObject->SetParameterMap(transformtype);
try
{
this->m_theItkFilter->SetParameterObject(elxparameterObject);
this->m_theItkFilter->SetParameterObject(selxparameterObject);
}
catch (itk::ExceptionObject & err)
{
......@@ -158,9 +158,9 @@ namespace selx
else
{
// temporary solution: pass all SuperElastixComponent parameters as is to elastix. This should be defined in deeper hierarchy of the criteria, but for now we have a flat mapping only.
elxParameterObjectPointer elxparameterObject = this->m_theItkFilter->GetParameterObject();
elxparameterObject->GetParameterMap(0)[criterion.first] = criterion.second;
this->m_theItkFilter->SetParameterObject(elxparameterObject);
selxParameterObjectPointer selxparameterObject = this->m_theItkFilter->GetParameterObject();
selxparameterObject->GetParameterMap(0)[criterion.first] = criterion.second;
this->m_theItkFilter->SetParameterObject(selxparameterObject);
meetsCriteria = true;
}
return meetsCriteria;
......
......@@ -15,7 +15,7 @@ set( ${MODULE}_LIBRARIES
# Export tests
set( ${MODULE}_TESTS
elxitkImageFilterTest.cxx
selxitkImageFilterTest.cxx
)
# Module source files
......
......@@ -6,7 +6,7 @@
#include "itkSmoothingRecursiveGaussianImageFilter.h"
#include "itkImageSource.h"
#include <string.h>
#include "elxMacro.h"
#include "selxMacro.h"
namespace selx
{
template <int Dimensionality, class TPixel>
......@@ -21,7 +21,7 @@ namespace selx
//>
{
public:
elxNewMacro(ItkSmoothingRecursiveGaussianImageFilterComponent, ComponentBase);
selxNewMacro(ItkSmoothingRecursiveGaussianImageFilterComponent, ComponentBase);
// itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -4,7 +4,7 @@
#include "ComponentBase.h"
#include "Interfaces.h"
#include <string.h>
#include "elxMacro.h"
#include "selxMacro.h"
#include "itkImageFileWriter.h"
namespace selx
......@@ -17,7 +17,7 @@ namespace selx
>
{
public:
elxNewMacro(DisplacementFieldItkImageFilterSinkComponent, ComponentBase);
selxNewMacro(DisplacementFieldItkImageFilterSinkComponent, ComponentBase);
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -4,7 +4,7 @@
#include "ComponentBase.h"
#include "Interfaces.h"
#include <string.h>
#include "elxMacro.h"
#include "selxMacro.h"
#include "itkImageFileWriter.h"
namespace selx
......@@ -17,7 +17,7 @@ namespace selx
>
{
public:
elxNewMacro(ItkImageFilterSinkComponent, ComponentBase);
selxNewMacro(ItkImageFilterSinkComponent, ComponentBase);
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -4,7 +4,7 @@
#include "ComponentBase.h"
#include "Interfaces.h"
#include <string.h>
#include "elxMacro.h"
#include "selxMacro.h"
#include "itkImageFileWriter.h"
namespace selx
......@@ -17,7 +17,7 @@ namespace selx
>
{
public:
elxNewMacro(ItkImageSinkComponent, ComponentBase);
selxNewMacro(ItkImageSinkComponent, ComponentBase);
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -4,7 +4,7 @@
#include "ComponentBase.h"
#include "Interfaces.h"
#include <string.h>
#include "elxMacro.h"
#include "selxMacro.h"
namespace selx
{
class ItkImageSourceComponent :
......@@ -14,7 +14,7 @@ namespace selx
>
{
public:
elxNewMacro(ItkImageSourceComponent, ComponentBase);
selxNewMacro(ItkImageSourceComponent, ComponentBase);
ItkImageSourceComponent();
virtual ~ItkImageSourceComponent();
......
......@@ -4,7 +4,7 @@
#include "ComponentBase.h"
#include "Interfaces.h"
#include <string.h>
#include "elxMacro.h"
#include "selxMacro.h"
namespace selx
{
template<int Dimensionality, class TPixel>
......@@ -15,7 +15,7 @@ namespace selx
>
{
public:
elxNewMacro(ItkImageSourceFixedComponent, ComponentBase);
selxNewMacro(ItkImageSourceFixedComponent, ComponentBase);
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -4,7 +4,7 @@
#include "ComponentBase.h"
#include "Interfaces.h"
#include <string.h>
#include "elxMacro.h"
#include "selxMacro.h"
namespace selx
{
template<int Dimensionality, class TPixel>
......@@ -15,7 +15,7 @@ namespace selx
>
{
public:
elxNewMacro(ItkImageSourceMovingComponent, ComponentBase);
selxNewMacro(ItkImageSourceMovingComponent, ComponentBase);
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -15,8 +15,8 @@ set( ${MODULE}_LIBRARIES
# Export tests
set( ${MODULE}_TESTS
elxRegistrationItkv4Test.cxx
elxWBIRDemoTest.cxx
selxRegistrationItkv4Test.cxx
selxWBIRDemoTest.cxx
)
# Module source files
......
......@@ -5,7 +5,7 @@
#include "Interfaces.h"
#include "itkANTSNeighborhoodCorrelationImageToImageMetricv4.h"
#include <string.h>
#include "elxMacro.h"
#include "selxMacro.h"
namespace selx
{
template <int Dimensionality, class TPixel>
......@@ -16,7 +16,7 @@ namespace selx
>
{
public:
elxNewMacro(ItkANTSNeighborhoodCorrelationImageToImageMetricv4Component, ComponentBase);
selxNewMacro(ItkANTSNeighborhoodCorrelationImageToImageMetricv4Component, ComponentBase);
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -8,7 +8,7 @@
#include "itkImageSource.h"
#include <itkTransformToDisplacementFieldFilter.h>
#include <string.h>
#include "elxMacro.h"
#include "selxMacro.h"
#include "itkComposeDisplacementFieldsImageFilter.h"
......@@ -32,7 +32,7 @@ namespace selx
>
{
public:
elxNewMacro(ItkImageRegistrationMethodv4Component, ComponentBase);
selxNewMacro(ItkImageRegistrationMethodv4Component, ComponentBase);
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -5,7 +5,7 @@
#include "Interfaces.h"
#include "itkMeanSquaresImageToImageMetricv4.h"
#include <string.h>
#include "elxMacro.h"
#include "selxMacro.h"
namespace selx
{
template <int Dimensionality, class TPixel>
......@@ -16,7 +16,7 @@ namespace selx
>
{
public:
elxNewMacro(ItkMeanSquaresImageToImageMetricv4Component, ComponentBase);
selxNewMacro(ItkMeanSquaresImageToImageMetricv4Component, ComponentBase);
//itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
......
......@@ -7,7 +7,7 @@
#include "itkObjectFactory.h"
#include "itkDataObject.h"
#include "elxMacro.h"
#include "selxMacro.h"
namespace selx {
......@@ -15,7 +15,7 @@ class Blueprint : public itk::DataObject
{
public:
elxNewMacro( Blueprint, itk::DataObject );
selxNewMacro( Blueprint, itk::DataObject );
typedef std::string ParameterKeyType;
typedef std::vector< std::string > ParameterValueType;
......
......@@ -3,7 +3,7 @@
#include "boost/graph/graphviz.hpp"
#include "elxBlueprint.h"
#include "selxBlueprint.h"
namespace selx {
......@@ -49,7 +49,7 @@ Blueprint
this->m_Graph[ index ].parameterMap = parameterMap;
}
// TODO: See explanation in elxBlueprint.h
// TODO: See explanation in selxBlueprint.h
// void
// Blueprint
// ::DeleteComponent( const ComponentIndexType index )
......
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