Skip to content
Snippets Groups Projects
Commit 3882c521 authored by jack-parsons's avatar jack-parsons
Browse files

Adding align doctests

parent 68f4f03b
No related branches found
No related tags found
1 merge request!23Merge in Jack's changes
Pipeline #866 passed
......@@ -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
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment