Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
AmpScan
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Joshua Steer
AmpScan
Commits
3882c521
Commit
3882c521
authored
5 years ago
by
jack-parsons
Browse files
Options
Downloads
Patches
Plain Diff
Adding align doctests
parent
68f4f03b
No related branches found
Branches containing commit
No related tags found
1 merge request
!23
Merge in Jack's changes
Pipeline
#866
passed
5 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+3
-1
3 additions, 1 deletion
.gitlab-ci.yml
AmpScan/align.py
+14
-2
14 additions, 2 deletions
AmpScan/align.py
with
17 additions
and
3 deletions
.gitlab-ci.yml
+
3
−
1
View file @
3882c521
...
...
@@ -3,4 +3,6 @@ unittests:
core doctests
:
script
:
python -m doctest -v AmpScan/core.py
registration doctests
:
script
:
python -m doctest -v AmpScan/registration.py
\ No newline at end of file
script
:
python -m doctest -v AmpScan/registration.py
align doctests
:
script
:
python -m doctest -v AmpScan/align.py
\ No newline at end of file
This diff is collapsed.
Click to expand it.
AmpScan/align.py
+
14
−
2
View file @
3882c521
...
...
@@ -10,8 +10,8 @@ import vtk
import
math
from
scipy
import
spatial
from
scipy.optimize
import
minimize
from
.core
import
AmpObject
from
.ampVis
import
vtkRenWin
from
AmpScan
.core
import
AmpObject
from
AmpScan
.ampVis
import
vtkRenWin
class
align
(
object
):
...
...
@@ -41,6 +41,9 @@ class align(object):
Examples
--------
>>>
import
AmpScan
,
os
>>>
staticfh
=
os
.
getcwd
()
+
"
\\
tests
\\
stl_file.stl
"
>>>
movingfh
=
os
.
getcwd
()
+
"
\\
tests
\\
stl_file_2.stl
"
>>>
static
=
AmpScan
.
AmpObject
(
staticfh
)
>>>
moving
=
AmpScan
.
AmpObject
(
movingfh
)
>>>
al
=
AmpScan
.
align
(
moving
,
static
).
m
...
...
@@ -176,6 +179,9 @@ class align(object):
Examples
--------
>>>
import
AmpScan
,
os
>>>
staticfh
=
os
.
getcwd
()
+
"
\\
tests
\\
stl_file.stl
"
>>>
movingfh
=
os
.
getcwd
()
+
"
\\
tests
\\
stl_file_2.stl
"
>>>
static
=
AmpScan
.
AmpObject
(
staticfh
)
>>>
moving
=
AmpScan
.
AmpObject
(
movingfh
)
>>>
al
=
AmpScan
.
align
(
moving
,
static
,
method
=
'
linPoint2Plane
'
).
m
...
...
@@ -229,6 +235,9 @@ class align(object):
Examples
--------
>>>
import
AmpScan
,
os
>>>
staticfh
=
os
.
getcwd
()
+
"
\\
tests
\\
stl_file.stl
"
>>>
movingfh
=
os
.
getcwd
()
+
"
\\
tests
\\
stl_file_2.stl
"
>>>
static
=
AmpScan
.
AmpObject
(
staticfh
)
>>>
moving
=
AmpScan
.
AmpObject
(
movingfh
)
>>>
al
=
AmpScan
.
align
(
moving
,
static
,
method
=
'
linPoint2Point
'
).
m
...
...
@@ -271,6 +280,9 @@ class align(object):
Examples
--------
>>>
import
AmpScan
,
os
>>>
staticfh
=
os
.
getcwd
()
+
"
\\
tests
\\
stl_file.stl
"
>>>
movingfh
=
os
.
getcwd
()
+
"
\\
tests
\\
stl_file_2.stl
"
>>>
static
=
AmpScan
.
AmpObject
(
staticfh
)
>>>
moving
=
AmpScan
.
AmpObject
(
movingfh
)
>>>
al
=
AmpScan
.
align
(
moving
,
static
,
method
=
'
optPoint2Point
'
,
opt
=
'
SLSQP
'
).
m
...
...
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