Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
FSL
fslpy
Commits
2920116b
Commit
2920116b
authored
4 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
TEST: Add test case with shear component
parent
fcd3b65d
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
tests/test_transform/test_affine.py
+3
-2
3 additions, 2 deletions
tests/test_transform/test_affine.py
tests/test_transform/testdata/test_transform_test_compose.txt
+10
-5
10 additions, 5 deletions
...s/test_transform/testdata/test_transform_test_compose.txt
with
13 additions
and
7 deletions
tests/test_transform/test_affine.py
+
3
−
2
View file @
2920116b
...
@@ -226,8 +226,9 @@ def test_compose_and_decompose():
...
@@ -226,8 +226,9 @@ def test_compose_and_decompose():
xform
=
lines
[
i
*
4
:
i
*
4
+
4
]
xform
=
lines
[
i
*
4
:
i
*
4
+
4
]
xform
=
np
.
genfromtxt
(
xform
)
xform
=
np
.
genfromtxt
(
xform
)
scales
,
offsets
,
rotations
=
affine
.
decompose
(
xform
)
scales
,
offsets
,
rotations
,
shears
=
affine
.
decompose
(
result
=
affine
.
compose
(
scales
,
offsets
,
rotations
)
xform
,
shears
=
True
)
result
=
affine
.
compose
(
scales
,
offsets
,
rotations
,
shears
=
shears
)
assert
np
.
all
(
np
.
isclose
(
xform
,
result
,
atol
=
1e-5
))
assert
np
.
all
(
np
.
isclose
(
xform
,
result
,
atol
=
1e-5
))
...
...
This diff is collapsed.
Click to expand it.
tests/test_transform/testdata/test_transform_test_compose.txt
+
10
−
5
View file @
2920116b
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
1.0 0.0 0.0 0.0
1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 0.0 -1.0 0.0
0.0 0.0 -1.0 0.0
0.0 0.0 0.0 1.0
0.0 0.0 0.0 1.0
0.5 0.0 0.0 0.0
0.5 0.0 0.0 0.0
0.0 2.4 0.0 0.0
0.0 2.4 0.0 0.0
...
@@ -35,22 +35,22 @@
...
@@ -35,22 +35,22 @@
0.0 0.0 1.6 53.0
0.0 0.0 1.6 53.0
0.0 0.0 0.0 1.0
0.0 0.0 0.0 1.0
0.5 0.0 0.0 10.0
0.5 0.0 0.0 10.0
0.0 0.0 -1.6 -6.7877502441
0.0 0.0 -1.6 -6.7877502441
0.0 2.4 0.0 29.7931518555
0.0 2.4 0.0 29.7931518555
0.0 0.0 0.0 1.0
0.0 0.0 0.0 1.0
0.0 -2.4 -0.0 30.6160888672
0.0 -2.4 -0.0 30.6160888672
0.0 0.0 -1.6 -6.7877502441
0.0 0.0 -1.6 -6.7877502441
0.5 0.0 0.0 50.5961608887
0.5 0.0 0.0 50.5961608887
0.0 0.0 0.0 1.0
0.0 0.0 0.0 1.0
-0.0 1.3765834472 1.3106432709 0.0736983719
-0.0 1.3765834472 1.3106432709 0.0736983719
0.0 -1.9659649063 0.9177222982 14.1062102814
0.0 -1.9659649063 0.9177222982 14.1062102814
0.5 0.0 0.0 50.5961608887
0.5 0.0 0.0 50.5961608887
0.0 0.0 0.0 1.0
0.0 0.0 0.0 1.0
0.453766452 -0.7004337463 0.4832135801 16.789591468
0.453766452 -0.7004337463 0.4832135801 16.789591468
-0.0159784155 1.6056689296 1.1880787388 -16.2943532298
-0.0159784155 1.6056689296 1.1880787388 -16.2943532298
-0.2093817023 -1.640493784 0.9565424959 66.1123321137
-0.2093817023 -1.640493784 0.9565424959 66.1123321137
0.0 0.0 0.0 1.0
0.0 0.0 0.0 1.0
...
@@ -109,3 +109,8 @@
...
@@ -109,3 +109,8 @@
0.041017 -0.081580 -6.319922 72.090378
0.041017 -0.081580 -6.319922 72.090378
-0.000000 0.381914 -1.365036 -41.159451
-0.000000 0.381914 -1.365036 -41.159451
0.000000 0.000000 0.000000 1.000000
0.000000 0.000000 0.000000 1.000000
1.1441229 0.833406 3.765340 3
0.8312539 2.459607 -0.804545 4
1.4142136 1.554275 1.724796 5
0.0 0.0 0.0 1
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