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
14f4c262
Commit
14f4c262
authored
Jan 18, 2017
by
Floris Berendsen
Browse files
WIP: added templated Constructor for SuperElastixFilter
parent
41d8c803
Changes
6
Hide whitespace changes
Inline
Side-by-side
Modules/Components/Elastix/test/selxElastixComponentTest.cxx
View file @
14f4c262
...
...
@@ -17,8 +17,7 @@
*
*=========================================================================*/
#include
"selxSuperElastixFilter.h"
#include
"selxRegisterComponentFactoriesByTypeList.h"
#include
"selxSuperElastixFilterCustomComponents.h"
#include
"elxParameterObject.h"
#include
"selxElastixComponent.h"
...
...
@@ -68,9 +67,9 @@ public:
virtual
void
SetUp
()
{
// Instantiate SuperElastixFilter before each test
superElastixFilter
=
SuperElastixFilter
::
New
();
// Register the components we want to have available in SuperElastix
RegisterFactoriesByTypeList
<
RegisterComponents
>::
Register
();
superElastixFilter
=
SuperElastixFilterCustomComponents
<
RegisterComponents
>::
New
();
dataManager
=
DataManagerType
::
New
();
}
...
...
@@ -84,7 +83,7 @@ public:
}
// Blueprint holds a configuration for SuperElastix
BlueprintPointer
blueprint
;
SuperElastixFilter
::
Pointer
superElastixFilter
;
SuperElastixFilter
CustomComponents
<
RegisterComponents
>
::
Pointer
superElastixFilter
;
// Data manager provides the paths to the input and output data for unit tests
DataManagerType
::
Pointer
dataManager
;
};
...
...
Modules/Core/Blueprints/include/selxBlueprint.h
View file @
14f4c262
...
...
@@ -70,7 +70,7 @@ public:
private:
class
BlueprintImpl
;
struct
BlueprintImpl
;
std
::
unique_ptr
<
BlueprintImpl
>
m_Pimple
;
};
...
...
Modules/Core/Filter/include/selxSuperElastixFilter.h
View file @
14f4c262
...
...
@@ -102,9 +102,12 @@ public:
void
Update
(
void
)
ITK_OVERRIDE
;
protected:
// default constructor for API library use
SuperElastixFilter
(
void
);
// special constructor which is called by the templated SuperElastixFilter for SDK library use
SuperElastixFilter
(
bool
InitializeEmptyComponentList
);
virtual
void
GenerateOutputInformation
(
void
)
ITK_OVERRIDE
;
virtual
void
GenerateData
(
void
)
ITK_OVERRIDE
;
...
...
Modules/Core/Filter/include/selxSuperElastixFilterCustomComponents.h
0 → 100644
View file @
14f4c262
/*=========================================================================
*
* 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 selxSuperElastixFilterCustomComponents_h
#define selxSuperElastixFilterCustomComponents_h
#include
"selxSuperElastixFilter.h"
/**
* \class SuperElastixFilter
* \brief ITK Filter interface to the SuperElastix registration library.
*/
namespace
selx
{
template
<
typename
ComponentList
>
class
SuperElastixFilterCustomComponents
:
public
SuperElastixFilter
{
public:
/** Standard ITK typedefs. */
typedef
SuperElastixFilterCustomComponents
Self
;
typedef
itk
::
ProcessObject
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
,
itk
::
ProcessObject
);
protected:
// default constructor
SuperElastixFilterCustomComponents
(
void
);
private:
};
}
// namespace elx
#ifndef ITK_MANUAL_INSTANTIATION
#include
"selxSuperElastixFilterCustomComponents.hxx"
#endif
#endif // selxSuperElastixFilterCustomComponents_h
Modules/Core/Filter/include/selxSuperElastixFilterCustomComponents.hxx
0 → 100644
View file @
14f4c262
/*=========================================================================
*
* 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 selxSuperElastixFilterCustomComponents_hxx
#define selxSuperElastixFilterCustomComponents_hxx
#include
"selxSuperElastixFilterCustomComponents.h"
#include
"selxRegisterComponentFactoriesByTypeList.h"
#include
"selxNetworkBuilder.h"
namespace
selx
{
/**
* ********************* Constructor *********************
*/
template
<
typename
ComponentTypeList
>
SuperElastixFilterCustomComponents
<
ComponentTypeList
>
::
SuperElastixFilterCustomComponents
(
void
)
:
SuperElastixFilter
(
true
)
{
RegisterFactoriesByTypeList
<
ComponentTypeList
>::
Register
();
}
// end Constructor
}
// namespace elx
#endif // selxSuperElastixFilterCustomComponents_hxx
Modules/Core/Filter/src/selxSuperElastixFilter.cxx
View file @
14f4c262
...
...
@@ -23,6 +23,8 @@
#include
"selxSuperElastixFilter.h"
#include
"selxNetworkBuilder.h"
#include
"selxRegisterComponentFactoriesByTypeList.h"
#include
"selxDefaultComponents.h"
namespace
selx
{
...
...
@@ -31,17 +33,24 @@ namespace selx
*/
SuperElastixFilter
::
SuperElastixFilter
(
void
)
:
m_InputConnectionModified
(
true
),
m_OutputConnectionModified
(
true
),
m_BlueprintConnectionModified
(
true
),
m_IsConnected
(
false
),
m_AllUniqueComponents
(
false
)
::
SuperElastixFilter
(
void
)
:
SuperElastixFilter
(
true
)
{
//RegisterFactoriesByTypeList< ComponentTypeList >::Register();
// The default constructor registers the default components.
RegisterFactoriesByTypeList
<
DefaultComponents
>::
Register
();
}
// end Constructor
// Disable "Primary" as required input< C< ComponentTypeList >omponentTypeList >
this
->
SetRequiredInputNames
(
{}
);
//
SuperElastixFilter
::
SuperElastixFilter
(
bool
InitializeEmptyComponentList
)
:
m_InputConnectionModified
(
true
),
m_OutputConnectionModified
(
true
),
m_BlueprintConnectionModified
(
true
),
m_IsConnected
(
false
),
m_AllUniqueComponents
(
false
)
{
// Disable "Primary" as required input
// TODO: Blueprint should become primary
this
->
SetRequiredInputNames
({});
}
// end Constructor
...
...
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