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
a6fae9d0
Commit
a6fae9d0
authored
6 years ago
by
Omar Animashaun
Browse files
Options
Downloads
Patches
Plain Diff
point clicker update
parent
f31f0851
No related branches found
No related tags found
1 merge request
!24
Omar changes
Pipeline
#722
passed
6 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GUIs/AmpScanGUI.py
+26
-4
26 additions, 4 deletions
GUIs/AmpScanGUI.py
with
26 additions
and
4 deletions
GUIs/AmpScanGUI.py
+
26
−
4
View file @
a6fae9d0
import
sys
import
sys
import
numpy
as
np
import
numpy
as
np
from
vtk.util
import
numpy_support
import
vtk
import
vtk
from
AmpScan
import
AmpObject
from
AmpScan
import
AmpObject
from
AmpScan.registration
import
registration
from
AmpScan.registration
import
registration
from
AmpScan.align
import
align
from
AmpScan.align
import
align
from
AmpScan.ampVis
import
qtVtkWindow
from
AmpScan.ampVis
import
qtVtkWindow
,
vtkRenWin
from
AmpScan.pressSens
import
pressSense
from
PyQt5.QtCore
import
QPoint
,
QSize
,
Qt
,
QTimer
,
QRect
,
pyqtSignal
from
PyQt5.QtCore
import
QPoint
,
QSize
,
Qt
,
QTimer
,
QRect
,
pyqtSignal
from
PyQt5.QtGui
import
(
QColor
,
QFontMetrics
,
QImage
,
QPainter
,
QIcon
,
from
PyQt5.QtGui
import
(
QColor
,
QFontMetrics
,
QImage
,
QPainter
,
QIcon
,
QOpenGLVersionProfile
)
QOpenGLVersionProfile
)
...
@@ -119,6 +117,26 @@ class AmpScanGUI(QMainWindow):
...
@@ -119,6 +117,26 @@ class AmpScanGUI(QMainWindow):
self
.
alCont
.
xtraButton
.
buttonClicked
[
QAbstractButton
].
connect
(
self
.
transx
)
self
.
alCont
.
xtraButton
.
buttonClicked
[
QAbstractButton
].
connect
(
self
.
transx
)
self
.
alCont
.
ytraButton
.
buttonClicked
[
QAbstractButton
].
connect
(
self
.
transy
)
self
.
alCont
.
ytraButton
.
buttonClicked
[
QAbstractButton
].
connect
(
self
.
transy
)
self
.
alCont
.
ztraButton
.
buttonClicked
[
QAbstractButton
].
connect
(
self
.
transz
)
self
.
alCont
.
ztraButton
.
buttonClicked
[
QAbstractButton
].
connect
(
self
.
transz
)
def
Point_Pick
(
self
):
"""
Pick a point on the mesh.
"""
#vtkRenWin.Pick_point(self.renWin, loc = [-59.2877082824707, -2.0703632831573486, 70.64564514160156])
self
.
vtkWidget
.
iren
.
AddObserver
(
'
RightButtonPressEvent
'
,
self
.
pick_loc
)
self
.
renWin
.
Render
()
def
pick_loc
(
self
,
event
,
x
):
"""
calcs the location of click
"""
#print(event, x)
self
.
vtkWidget
.
iren
.
RemoveObservers
(
'
RightButtonPressEvent
'
)
loc
=
event
.
GetEventPosition
()
pnt
=
vtkRenWin
.
Pick_point
(
self
.
renWin
,
loc
)
[
name
,
_
,
color
,
opacity
,
display
]
=
self
.
fileManager
.
getRow
(
0
)
self
.
files
[
name
].
MeasurementsOut
(
pnt
)
def
rotatex
(
self
,
button
):
def
rotatex
(
self
,
button
):
moving
=
str
(
self
.
alCont
.
moving
.
currentText
())
moving
=
str
(
self
.
alCont
.
moving
.
currentText
())
...
@@ -310,6 +328,8 @@ class AmpScanGUI(QMainWindow):
...
@@ -310,6 +328,8 @@ class AmpScanGUI(QMainWindow):
triggered
=
self
.
register
)
triggered
=
self
.
register
)
self
.
analyse
=
QAction
(
QIcon
(
'
open.png
'
),
'
Analyse
'
,
self
,
self
.
analyse
=
QAction
(
QIcon
(
'
open.png
'
),
'
Analyse
'
,
self
,
triggered
=
self
.
analyse
)
triggered
=
self
.
analyse
)
self
.
pick
=
QAction
(
QIcon
(
'
open.png
'
),
'
Pick
'
,
self
,
triggered
=
self
.
Point_Pick
)
def
createMenus
(
self
):
def
createMenus
(
self
):
"""
"""
...
@@ -331,7 +351,9 @@ class AmpScanGUI(QMainWindow):
...
@@ -331,7 +351,9 @@ class AmpScanGUI(QMainWindow):
self
.
analyseMenu
.
addAction
(
self
.
analyse
)
self
.
analyseMenu
.
addAction
(
self
.
analyse
)
self
.
kineticMenu
=
self
.
menuBar
().
addMenu
(
"
&Kinetic Measurements
"
)
self
.
kineticMenu
=
self
.
menuBar
().
addMenu
(
"
&Kinetic Measurements
"
)
self
.
kineticMenu
.
addAction
(
self
.
openPress
)
self
.
kineticMenu
.
addAction
(
self
.
openPress
)
self
.
PointMenu
=
self
.
menuBar
().
addMenu
(
"
&Pick Point
"
)
self
.
PointMenu
.
addAction
(
self
.
pick
)
class
fileManager
(
QMainWindow
):
class
fileManager
(
QMainWindow
):
"""
"""
Controls to manage the displayed
Controls to manage the displayed
...
...
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