Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
imager
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Show more breadcrumbs
NML
imager
Commits
2b604025
Commit
2b604025
authored
3 years ago
by
mingf2
Browse files
Options
Downloads
Patches
Plain Diff
fix bug in stop and exit
parent
fa4eac03
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
Demo/Demo.gif
+0
-0
0 additions, 0 deletions
Demo/Demo.gif
Headers/worker.h
+7
-3
7 additions, 3 deletions
Headers/worker.h
README.md
+10
-5
10 additions, 5 deletions
README.md
Sources/worker.cpp
+1
-0
1 addition, 0 deletions
Sources/worker.cpp
imagerQt.pro
+1
-0
1 addition, 0 deletions
imagerQt.pro
with
19 additions
and
8 deletions
Demo/Demo.gif
0 → 100644
+
0
−
0
View file @
2b604025
9 MiB
This diff is collapsed.
Click to expand it.
Headers/worker.h
+
7
−
3
View file @
2b604025
#ifndef WORKER_H
#ifndef WORKER_H
#define WORKER_H
#define WORKER_H
#include
<atomic>
#include
<QObject>
#include
<QObject>
#include
<QThread>
#include
<QThread>
#include
"reconstruction.h"
#include
"reconstruction.h"
...
@@ -12,15 +13,18 @@ class Worker : public QThread
...
@@ -12,15 +13,18 @@ class Worker : public QThread
RecoImage
*
image
;
RecoImage
*
image
;
void
run
()
override
;
void
run
()
override
;
ulong
localCounts
=
0
;
ulong
localCounts
=
0
;
bool
stopped
=
true
;
std
::
atomic
<
bool
>
stopped
;
bool
exitted
=
false
;
std
::
atomic
<
bool
>
exitted
;
public:
public:
// explicit Worker(QObject *parent = nullptr);
// explicit Worker(QObject *parent = nullptr);
Worker
(
QObject
*
parent
,
const
Setup
*
config_
,
RecoImage
*
image_
)
:
Worker
(
QObject
*
parent
,
const
Setup
*
config_
,
RecoImage
*
image_
)
:
QThread
(
parent
),
QThread
(
parent
),
config
(
config_
),
config
(
config_
),
image
(
image_
)
image
(
image_
)
{}
{
stopped
=
true
;
exitted
=
false
;
}
//signals:
//signals:
...
...
This diff is collapsed.
Click to expand it.
README.md
+
10
−
5
View file @
2b604025
# Simple GUI application for back projection image reconstruction
# Simple GUI application for back projection image reconstruction
## Use
## Prerequisites
-
Install
[
ROOT
](
https://root.cern/install/
)
(
v6.22
or above),
`qmake`
and
`make`
.
-
Install
[
ROOT v6
](
https://root.cern/install/
)
.
-
Compile:
-
Install qt5 development packages
```
bash
sudo
apt-get
install
qt5-default qtdeclarative5-dev
```
## Build
```
bash
```
bash
mkdir
-p
build
mkdir
-p
build
cd
build
cd
build
qmake
CONFIG+
=
re
a
lease ../imagerQt.pro
qmake
-config
release ../imagerQt.pro
make
make
```
```
-
Run
:
##
Run
```
bash
```
bash
cd
..
cd
..
build/ImagerQt
build/ImagerQt
...
...
This diff is collapsed.
Click to expand it.
Sources/worker.cpp
+
1
−
0
View file @
2b604025
...
@@ -58,6 +58,7 @@ void Worker::handleStop()
...
@@ -58,6 +58,7 @@ void Worker::handleStop()
void
Worker
::
stopExecution
()
void
Worker
::
stopExecution
()
{
{
exitted
=
true
;
exitted
=
true
;
qDebug
()
<<
"Exiting thread signal received."
;
}
}
void
Worker
::
handleClear
()
void
Worker
::
handleClear
()
...
...
This diff is collapsed.
Click to expand it.
imagerQt.pro
+
1
−
0
View file @
2b604025
...
@@ -71,6 +71,7 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
...
@@ -71,6 +71,7 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
DISTFILES
+=
\
DISTFILES
+=
\
.
gitignore
\
.
gitignore
\
Demo
/
Demo
.
gif
\
README
.
md
README
.
md
RESOURCES
+=
\
RESOURCES
+=
\
...
...
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