Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
SuperElastix
Commits
50bfd3d9
Commit
50bfd3d9
authored
Feb 01, 2017
by
Kasper Marstal
Browse files
ENH: Make DataManager use ITK factory registration macro directly
parent
84a0a2d1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Modules/Common/include/selxMacro.h
deleted
100644 → 0
View file @
84a0a2d1
/*=========================================================================
*
* Copyright Leiden University Medical Center, Erasmus University Medical
* Center 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 selxMacro_h
#define selxMacro_h
/**
* Register class with the object factory and set RTTI (Run-Time Type
* Information)
*/
#define selxNewMacro( className, superClassName ) \
typedef className Self; \
typedef itk::SmartPointer< Self > Pointer; \
typedef itk::SmartPointer< const Self > ConstPointer; \
itkNewMacro( Self ); \
itkTypeMacro( className, superClassName ); \
#endif // selxMacro_h
Testing/CMakeLists.txt
View file @
50bfd3d9
...
...
@@ -72,12 +72,10 @@ configure_file(
ESCAPE_QUOTES
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_library
(
DataManager selxDataManager.cxx
)
# TODO: move Common dir?
set
(
COMMON_INCLUDE_DIR
"
${
CMAKE_SOURCE_DIR
}
/Modules/Core/Common/include"
)
target_include_directories
(
DataManager PUBLIC
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
${
SUPERELASTIX_INCLUDE_DIRS
}
${
COMMON_INCLUDE_DIR
}
)
list
(
APPEND TEST_LIBRARIES DataManager
)
# ---------------------------------------------------------------------
...
...
Testing/selxDataManager.h
View file @
50bfd3d9
...
...
@@ -21,10 +21,6 @@
#define __DataManager_h
#include
<string>
#include
<itkSimpleDataObjectDecorator.h>
#include
"selxMacro.h"
#include
"itkObjectFactory.h"
#include
"itkLightObject.h"
#include
"selxDataDirectories.h"
...
...
@@ -32,7 +28,11 @@ class DataManager : public itk::LightObject
{
public:
selxNewMacro
(
DataManager
,
itk
::
LightObject
);
typedef
DataManager
Self
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
itkNewMacro
(
Self
);
itkTypeMacro
(
DataManager
,
itk
::
LightObject
);
DataManager
()
{
...
...
@@ -42,7 +42,6 @@ public:
this
->
m_ConfigurationDirectory
=
SUPERELASTIX_CONFIGURATION_DATA_DIR
;
}
std
::
string
GetInputDirectory
(
void
)
const
{
return
this
->
m_InputDirectory
;
}
std
::
string
GetOutputDirectory
(
void
)
const
{
return
this
->
m_OutputDirectory
;
}
std
::
string
GetBaselineDirectory
(
void
)
const
{
return
this
->
m_BaselineDirectory
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment