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
ffb57ece
Commit
ffb57ece
authored
6 years ago
by
ojs1g14
Browse files
Options
Downloads
Patches
Plain Diff
Added one line docstrings to submodules for debug
parent
767a3b7c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
AmpScan/AmpScanGUI.py
+30
-0
30 additions, 0 deletions
AmpScan/AmpScanGUI.py
with
30 additions
and
0 deletions
AmpScan/AmpScanGUI.py
+
30
−
0
View file @
ffb57ece
...
@@ -84,6 +84,10 @@ class AmpScanGUI(QMainWindow):
...
@@ -84,6 +84,10 @@ class AmpScanGUI(QMainWindow):
self
.
socket
.
lp_smooth
()
self
.
socket
.
lp_smooth
()
def
align
(
self
):
def
align
(
self
):
"""
Numpy style docstring.
"""
self
.
renWin
.
setnumViewports
(
2
)
self
.
renWin
.
setnumViewports
(
2
)
self
.
renWin
.
setView
(
view
=
[
-
1
,
0
,
0
],
viewport
=
1
)
self
.
renWin
.
setView
(
view
=
[
-
1
,
0
,
0
],
viewport
=
1
)
self
.
renWin
.
setProjection
(
True
,
0
)
self
.
renWin
.
setProjection
(
True
,
0
)
...
@@ -101,6 +105,11 @@ class AmpScanGUI(QMainWindow):
...
@@ -101,6 +105,11 @@ class AmpScanGUI(QMainWindow):
self
.
socket
.
actor
.
setOpacity
(
0.5
)
self
.
socket
.
actor
.
setOpacity
(
0.5
)
def
register
(
self
):
def
register
(
self
):
"""
Numpy style docstring.
"""
self
.
renWin
.
setnumViewports
(
1
)
self
.
renWin
.
setnumViewports
(
1
)
self
.
renWin
.
setProjection
()
self
.
renWin
.
setProjection
()
self
.
RegObj
=
registration
(
self
.
socket
,
self
.
AmpObj
)
self
.
RegObj
=
registration
(
self
.
socket
,
self
.
AmpObj
)
...
@@ -109,6 +118,11 @@ class AmpScanGUI(QMainWindow):
...
@@ -109,6 +118,11 @@ class AmpScanGUI(QMainWindow):
self
.
renWin
.
setScalarBar
(
self
.
RegObj
.
actor
)
self
.
renWin
.
setScalarBar
(
self
.
RegObj
.
actor
)
def
analyse
(
self
):
def
analyse
(
self
):
"""
Numpy style docstring.
"""
#self.RegObj.plot_slices()
#self.RegObj.plot_slices()
self
.
AmpObj
.
vert
[:,
0
]
*=
2
self
.
AmpObj
.
vert
[:,
0
]
*=
2
self
.
AmpObj
.
actor
.
points
.
Modified
()
self
.
AmpObj
.
actor
.
points
.
Modified
()
...
@@ -117,6 +131,10 @@ class AmpScanGUI(QMainWindow):
...
@@ -117,6 +131,10 @@ class AmpScanGUI(QMainWindow):
#self.AmpObj._v = numpy_support.numpy_to_vtk(self.AmpObj.vert)
#self.AmpObj._v = numpy_support.numpy_to_vtk(self.AmpObj.vert)
def
chooseFE
(
self
):
def
chooseFE
(
self
):
"""
Numpy style docstring.
"""
FEname
=
QFileDialog
.
getOpenFileName
(
self
,
'
Open file
'
,
FEname
=
QFileDialog
.
getOpenFileName
(
self
,
'
Open file
'
,
filter
=
"
FE results (*.npy)
"
)
filter
=
"
FE results (*.npy)
"
)
self
.
renWin
.
setnumViewports
(
1
)
self
.
renWin
.
setnumViewports
(
1
)
...
@@ -128,6 +146,10 @@ class AmpScanGUI(QMainWindow):
...
@@ -128,6 +146,10 @@ class AmpScanGUI(QMainWindow):
self
.
renWin
.
setScalarBar
(
self
.
FE
.
actor
)
self
.
renWin
.
setScalarBar
(
self
.
FE
.
actor
)
def
choosePress
(
self
):
def
choosePress
(
self
):
"""
Numpy style docstring.
"""
vName
=
QFileDialog
.
getOpenFileName
(
self
,
'
Open file
'
,
vName
=
QFileDialog
.
getOpenFileName
(
self
,
'
Open file
'
,
filter
=
"
Sensor vertices (*.csv)
"
)
filter
=
"
Sensor vertices (*.csv)
"
)
pName
=
QFileDialog
.
getOpenFileName
(
self
,
'
Open file
'
,
pName
=
QFileDialog
.
getOpenFileName
(
self
,
'
Open file
'
,
...
@@ -145,6 +167,10 @@ class AmpScanGUI(QMainWindow):
...
@@ -145,6 +167,10 @@ class AmpScanGUI(QMainWindow):
self
.
renWin
.
setScalarBar
(
self
.
AmpObj
.
actors
[
'
antS
'
])
self
.
renWin
.
setScalarBar
(
self
.
AmpObj
.
actors
[
'
antS
'
])
def
createActions
(
self
):
def
createActions
(
self
):
"""
Numpy style docstring.
"""
self
.
openFile
=
QAction
(
QIcon
(
'
open.png
'
),
'
Open
'
,
self
,
self
.
openFile
=
QAction
(
QIcon
(
'
open.png
'
),
'
Open
'
,
self
,
shortcut
=
'
Ctrl+O
'
,
shortcut
=
'
Ctrl+O
'
,
triggered
=
self
.
chooseOpenFile
)
triggered
=
self
.
chooseOpenFile
)
...
@@ -164,6 +190,10 @@ class AmpScanGUI(QMainWindow):
...
@@ -164,6 +190,10 @@ class AmpScanGUI(QMainWindow):
triggered
=
self
.
analyse
)
triggered
=
self
.
analyse
)
def
createMenus
(
self
):
def
createMenus
(
self
):
"""
Numpy style docstring.
"""
self
.
fileMenu
=
self
.
menuBar
().
addMenu
(
"
&File
"
)
self
.
fileMenu
=
self
.
menuBar
().
addMenu
(
"
&File
"
)
self
.
fileMenu
.
addAction
(
self
.
openFile
)
self
.
fileMenu
.
addAction
(
self
.
openFile
)
self
.
fileMenu
.
addAction
(
self
.
openSocket
)
self
.
fileMenu
.
addAction
(
self
.
openSocket
)
...
...
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