Skip to content
GitLab
Menu
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
d3decaf4
Commit
d3decaf4
authored
Feb 06, 2017
by
Floris Berendsen
Browse files
WIP:
parent
f1b3fdef
Changes
4
Hide whitespace changes
Inline
Side-by-side
Modules/Core/ComponentInterface/include/selxNetworkBuilder.h
View file @
d3decaf4
...
...
@@ -62,6 +62,9 @@ public:
NetworkBuilder
();
virtual
~
NetworkBuilder
()
{};
virtual
std
::
unique_ptr
<
NetworkBuilderBase
>
ConstructNewDerivedInstance
(
void
);
virtual
bool
AddBlueprint
(
const
std
::
unique_ptr
<
Blueprint
>
&
blueprint
);
/** Read configuration at the blueprints nodes and edges and return true if all components could be uniquely selected*/
...
...
Modules/Core/ComponentInterface/include/selxNetworkBuilder.hxx
View file @
d3decaf4
...
...
@@ -29,6 +29,15 @@ NetworkBuilder<ComponentList>::NetworkBuilder() : m_isConfigured(false), m_Bluep
{
}
template
<
typename
ComponentList
>
std
::
unique_ptr
<
NetworkBuilderBase
>
NetworkBuilder
<
ComponentList
>::
ConstructNewDerivedInstance
(
void
)
{
return
std
::
unique_ptr
<
NetworkBuilderBase
>
(
new
NetworkBuilder
<
ComponentList
>
);
}
template
<
typename
ComponentList
>
bool
NetworkBuilder
<
ComponentList
>::
AddBlueprint
(
const
std
::
unique_ptr
<
Blueprint
>
&
blueprint
)
...
...
Modules/Core/ComponentInterface/include/selxNetworkBuilderBase.h
View file @
d3decaf4
...
...
@@ -64,6 +64,9 @@ public:
virtual
~
NetworkBuilderBase
()
{};
/** To create a derived NetworkBuilder from a NetworkBuilderBase pointer without knowing the template arguments of the derived*/
virtual
std
::
unique_ptr
<
NetworkBuilderBase
>
ConstructNewDerivedInstance
(
void
)
=
0
;
virtual
bool
AddBlueprint
(
const
std
::
unique_ptr
<
Blueprint
>
&
blueprint
)
=
0
;
/** Read configuration at the blueprints nodes and edges and return true if all components could be uniquely selected*/
...
...
Modules/Core/Filter/src/selxSuperElastixFilter.cxx
View file @
d3decaf4
...
...
@@ -85,22 +85,19 @@ SuperElastixFilter
// the component selectors until no more unique components can be found.
if
(
!
this
->
m_Blueprint
)
{
//TODO: remove this check here by making m_Blueprint primary input
itkExceptionMacro
(
<<
"Setting a Blueprint is required first."
)
}
if
(
this
->
m_Blueprint
->
Modified
())
if
(
this
->
m_Blueprint
->
GetMTime
()
>
this
->
GetMTime
())
{
// Was m_Blueprint modified by Set() or by AddBlueprint?
// Was Blueprint modified by Set() or by AddBlueprint?
// delete previous blueprint and start all over with new one
m_NetworkBuilder
=
m_NetworkBuilder
->
ConstructNewDerivedInstance
();
this
->
m_NetworkBuilder
->
AddBlueprint
(
this
->
m_Blueprint
->
Get
());
}
this
->
m_NetworkBuilder
->
AddBlueprint
(
this
->
m_Blueprint
->
Get
());
this
->
m_AllUniqueComponents
=
this
->
m_NetworkBuilder
->
Configure
();
if
(
this
->
m_BlueprintConnectionModified
==
true
)
{
//TODO:
}
if
(
(
m_InputConnectionModified
==
true
)
||
(
this
->
m_BlueprintConnectionModified
==
true
)
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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