Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SuperElastix
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
SuperElastix
Commits
eaf4136c
Commit
eaf4136c
authored
9 years ago
by
Floris Berendsen
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Minor; Renamed itkImageFilterTest and added comments
parent
972d2ef9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Testing/Unit/CMakeLists.txt
+1
-1
1 addition, 1 deletion
Testing/Unit/CMakeLists.txt
Testing/Unit/elxitkImageFilterTest.cxx
+20
-3
20 additions, 3 deletions
Testing/Unit/elxitkImageFilterTest.cxx
with
21 additions
and
4 deletions
Testing/Unit/CMakeLists.txt
+
1
−
1
View file @
eaf4136c
...
@@ -10,7 +10,7 @@ set( ElastixUnitTestFilenames
...
@@ -10,7 +10,7 @@ set( ElastixUnitTestFilenames
elxComponentFactoryTest.cxx
elxComponentFactoryTest.cxx
elxComponentInterfaceTest.cxx
elxComponentInterfaceTest.cxx
elxOverlordTest.cxx
elxOverlordTest.cxx
elx
ProcessObjectComponent
Test.cxx
elx
itkImageFilter
Test.cxx
)
)
# ---------------------------------------------------------------------
# ---------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Testing/Unit/elx
ProcessObjectComponent
Test.cxx
→
Testing/Unit/elx
itkImageFilter
Test.cxx
+
20
−
3
View file @
eaf4136c
...
@@ -5,9 +5,19 @@
...
@@ -5,9 +5,19 @@
#include
"gtest/gtest.h"
#include
"gtest/gtest.h"
/** this test uses the following blueprint setup
[SourceComponent] - [itkImageFilter] - [itkImageFilter] - [SinkComponent]
- All the nodes are identified by their Class names
- All Connections are identified by their Interface names
The overlord finds the Source and Sink Components and connects these to it's external pipeline (internal reader and writer filters, currently).
*/
namespace
selx
{
namespace
selx
{
class
ProcessObject
Test
:
public
::
testing
::
Test
{
class
itkImageFilter
Test
:
public
::
testing
::
Test
{
public:
public:
typedef
Overlord
::
Pointer
OverlordPointerType
;
typedef
Overlord
::
Pointer
OverlordPointerType
;
typedef
Blueprint
::
Pointer
BlueprintPointerType
;
typedef
Blueprint
::
Pointer
BlueprintPointerType
;
...
@@ -17,13 +27,17 @@ public:
...
@@ -17,13 +27,17 @@ public:
typedef
Blueprint
::
ParameterValueType
ParameterValueType
;
typedef
Blueprint
::
ParameterValueType
ParameterValueType
;
virtual
void
SetUp
()
{
virtual
void
SetUp
()
{
/** register all example components */
/** register all components used for this test */
ComponentFactory
<
ItkSmoothingRecursiveGaussianImageFilterComponent
>::
RegisterOneFactory
();
ComponentFactory
<
ItkSmoothingRecursiveGaussianImageFilterComponent
>::
RegisterOneFactory
();
ComponentFactory
<
ItkImageSinkComponent
>::
RegisterOneFactory
();
ComponentFactory
<
ItkImageSinkComponent
>::
RegisterOneFactory
();
ComponentFactory
<
ItkImageSourceComponent
>::
RegisterOneFactory
();
ComponentFactory
<
ItkImageSourceComponent
>::
RegisterOneFactory
();
/** make example blueprint configuration */
/** make example blueprint configuration */
blueprint
=
Blueprint
::
New
();
blueprint
=
Blueprint
::
New
();
/** the 2 itkImageFilter Components are ItkSmoothingRecursiveGaussianImageFilterComponent*/
ParameterMapType
componentParameters
;
ParameterMapType
componentParameters
;
componentParameters
[
"NameOfClass"
]
=
ParameterValueType
(
1
,
"ItkSmoothingRecursiveGaussianImageFilterComponent"
);
componentParameters
[
"NameOfClass"
]
=
ParameterValueType
(
1
,
"ItkSmoothingRecursiveGaussianImageFilterComponent"
);
...
@@ -38,14 +52,17 @@ public:
...
@@ -38,14 +52,17 @@ public:
//TODO: check direction
//TODO: check direction
blueprint
->
AddConnection
(
index0
,
index1
,
connectionParameters
);
blueprint
->
AddConnection
(
index0
,
index1
,
connectionParameters
);
/** Add a description of the SourceComponent*/
ParameterMapType
sourceComponentParameters
;
ParameterMapType
sourceComponentParameters
;
sourceComponentParameters
[
"NameOfClass"
]
=
ParameterValueType
(
1
,
"ItkImageSourceComponent"
);
sourceComponentParameters
[
"NameOfClass"
]
=
ParameterValueType
(
1
,
"ItkImageSourceComponent"
);
ComponentIndexType
sourceIndex
=
blueprint
->
AddComponent
(
sourceComponentParameters
);
ComponentIndexType
sourceIndex
=
blueprint
->
AddComponent
(
sourceComponentParameters
);
/** Add a description of the SinkComponent*/
ParameterMapType
sinkComponentParameters
;
ParameterMapType
sinkComponentParameters
;
sinkComponentParameters
[
"NameOfClass"
]
=
ParameterValueType
(
1
,
"ItkImageSinkComponent"
);
sinkComponentParameters
[
"NameOfClass"
]
=
ParameterValueType
(
1
,
"ItkImageSinkComponent"
);
ComponentIndexType
sinkIndex
=
blueprint
->
AddComponent
(
sinkComponentParameters
);
ComponentIndexType
sinkIndex
=
blueprint
->
AddComponent
(
sinkComponentParameters
);
/** Connect Sink and Source to the itkImageFilter Components*/
blueprint
->
AddConnection
(
sourceIndex
,
index0
,
connectionParameters
);
//
blueprint
->
AddConnection
(
sourceIndex
,
index0
,
connectionParameters
);
//
blueprint
->
AddConnection
(
index1
,
sinkIndex
,
connectionParameters
);
blueprint
->
AddConnection
(
index1
,
sinkIndex
,
connectionParameters
);
}
}
...
@@ -58,7 +75,7 @@ public:
...
@@ -58,7 +75,7 @@ public:
Overlord
::
Pointer
overlord
;
Overlord
::
Pointer
overlord
;
};
};
TEST_F
(
ProcessObjectTest
,
Configure
)
TEST_F
(
itkImageFilterTest
,
Run
)
{
{
overlord
=
Overlord
::
New
();
overlord
=
Overlord
::
New
();
overlord
->
SetBlueprint
(
blueprint
);
overlord
->
SetBlueprint
(
blueprint
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment