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
f3c35bbc
Commit
f3c35bbc
authored
Nov 22, 2016
by
Floris Berendsen
Browse files
BUG: Over- or Incomplete Blueprint crash due to recent refactoring
parent
6c55bbf1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Modules/Core/Filter/include/selxSuperElastixFilter.h
View file @
f3c35bbc
...
...
@@ -99,6 +99,7 @@ private:
bool
m_OutputConnectionModified
;
bool
m_BlueprintConnectionModified
;
bool
m_IsConnected
;
bool
m_AllUniqueComponents
;
};
}
// namespace elx
...
...
Modules/Core/Filter/include/selxSuperElastixFilter.hxx
View file @
f3c35bbc
...
...
@@ -35,7 +35,8 @@ SuperElastixFilter< ComponentTypeList >
m_InputConnectionModified
(
true
),
m_OutputConnectionModified
(
true
),
m_BlueprintConnectionModified
(
true
),
m_IsConnected
(
false
)
m_IsConnected
(
false
),
m_AllUniqueComponents
(
false
)
{
RegisterFactoriesByTypeList
<
ComponentTypeList
>::
Register
();
...
...
@@ -68,7 +69,6 @@ SuperElastixFilter< ComponentTypeList >
// are passed further down stream.
// Eventually configuration boils down to a while loop that repeatedly tries to narrow down
// the component selectors until no more unique components can be found.
bool
allUniqueComponents
=
true
;
if
(
!
this
->
m_Overlord
)
{
if
(
!
this
->
m_Blueprint
)
...
...
@@ -77,7 +77,7 @@ SuperElastixFilter< ComponentTypeList >
}
this
->
m_Overlord
=
OverlordPointer
(
new
Overlord
(
this
->
m_Blueprint
->
Get
()));
a
llUniqueComponents
=
this
->
m_Overlord
->
Configure
();
this
->
m_A
llUniqueComponents
=
this
->
m_Overlord
->
Configure
();
}
else
if
(
this
->
m_BlueprintConnectionModified
==
true
)
{
...
...
@@ -141,12 +141,12 @@ SuperElastixFilter< ComponentTypeList >
}
}
if
(
a
llUniqueComponents
==
false
)
// by setting inputs and outputs, settings could be derived to uniquely select the other components
if
(
this
->
m_A
llUniqueComponents
==
false
)
// by setting inputs and outputs, settings could be derived to uniquely select the other components
{
a
llUniqueComponents
=
this
->
m_Overlord
->
Configure
();
this
->
m_A
llUniqueComponents
=
this
->
m_Overlord
->
Configure
();
}
if
(
a
llUniqueComponents
&&
!
this
->
m_IsConnected
)
if
(
this
->
m_A
llUniqueComponents
&&
!
this
->
m_IsConnected
)
{
this
->
m_IsConnected
=
this
->
m_Overlord
->
ConnectComponents
();
std
::
cout
<<
"Connecting Components: "
<<
(
this
->
m_IsConnected
?
"succeeded"
:
"failed"
)
<<
std
::
endl
<<
std
::
endl
;
...
...
@@ -208,9 +208,9 @@ SuperElastixFilter< ComponentTypeList >
itkExceptionMacro
(
<<
"Setting a Blueprint is required first."
)
}
this
->
m_Overlord
=
OverlordPointer
(
new
Overlord
(
this
->
m_Blueprint
->
Get
()));
bool
a
llUniqueComponents
=
this
->
m_Overlord
->
Configure
();
this
->
m_A
llUniqueComponents
=
this
->
m_Overlord
->
Configure
();
}
if
(
!
this
->
m_
IsConnected
)
if
(
!
this
->
m_
AllUniqueComponents
)
{
itkExceptionMacro
(
<<
"Blueprint was not sufficiently specified to build a network."
)
}
...
...
@@ -233,9 +233,9 @@ SuperElastixFilter< ComponentTypeList >
}
this
->
m_Overlord
=
OverlordPointer
(
new
Overlord
(
this
->
m_Blueprint
->
Get
()));
bool
a
llUniqueComponents
=
this
->
m_Overlord
->
Configure
();
this
->
m_A
llUniqueComponents
=
this
->
m_Overlord
->
Configure
();
}
if
(
!
this
->
m_
IsConnected
)
if
(
!
this
->
m_
AllUniqueComponents
)
{
itkExceptionMacro
(
<<
"Blueprint was not sufficiently specified to build a network."
)
}
...
...
@@ -274,7 +274,7 @@ typename SuperElastixFilter< ComponentTypeList >::OutputDataType
}
this
->
m_Overlord
=
OverlordPointer
(
new
Overlord
(
this
->
m_Blueprint
->
Get
()));
this
->
m_Overlord
->
Configure
();
this
->
m_AllUniqueComponents
=
this
->
m_Overlord
->
Configure
();
this
->
m_BlueprintConnectionModified
=
false
;
}
typename
OutputDataType
::
Pointer
newOutput
=
this
->
m_Overlord
->
GetInitializedOutput
(
outputName
);
...
...
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