Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
XRF-App
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
Container Registry
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
Show more breadcrumbs
chnet
XRF-App
Compare revisions
cef4de166e0ec33fa58008e3e2573e3efd58c707 to master
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
chnet/XRF-App
Select target project
No results found
master
Select Git revision
Branches
cleanup
master
Swap
Target
faproietti/XRF-App
Select target project
faproietti/XRF-App
chnet/XRF-App
2 results
cef4de166e0ec33fa58008e3e2573e3efd58c707
Select Git revision
Branches
cleanup
master
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
style.css
+239
-221
239 additions, 221 deletions
style.css
tsconfig.json
+10
-0
10 additions, 0 deletions
tsconfig.json
utility.ts
+77
-0
77 additions, 0 deletions
utility.ts
with
326 additions
and
221 deletions
style.css
View file @
c8f08ac7
/* Collapsable page */
#wrapper
{
/*padding-left: 0;*/
padding-left
:
40px
;
padding-right
:
40px
;
-webkit-transition
:
all
0.5s
ease
;
-moz-transition
:
all
0.5s
ease
;
-o-transition
:
all
0.5s
ease
;
transition
:
all
0.5s
ease
;
}
/* button and sidenav - settings */
.btn-settings
{
position
:
fixed
;
right
:
0px
;
margin-right
:
-2px
;
top
:
55px
;
z-index
:
100
;
width
:
40px
;
height
:
33px
;
background
:
#222222
;
border
:
1px
#a1a1a1
;
border-radius
:
3px
;
transition
:
0.5s
;
}
.btn-settings
.glyphicon-cog
{
color
:
#eeeeee
;
font-size
:
20px
;
}
#mySidenavSet
{
height
:
100%
;
/* 100% Full-height */
width
:
0
;
/* 0 width - change this with JavaScript */
position
:
fixed
;
/* Stay in place */
z-index
:
150
;
/* Stay on top */
top
:
45px
;
right
:
0
;
background-color
:
#f8f8f8
;
text-align
:
center
;
overflow-x
:
hidden
;
/* Disable horizontal scroll */
transition
:
0.5s
;
/* 0.5 second transition effect to slide in the sidenav */
}
/* button and sidenav - fs */
.fs-label
{
position
:
fixed
;
left
:
0px
;
margin-left
:
-2px
;
top
:
55px
;
z-index
:
100
;
width
:
40px
;
height
:
33px
;
background
:
#222222
;
border
:
1px
#a1a1a1
;
border-radius
:
3px
;
transition
:
0.5s
;
}
.fs-label
.glyphicon-chevron-right
{
color
:
#eeeeee
;
font-size
:
20px
;
}
.fs-label.is-open
.glyphicon-chevron-right
{
-webkit-transform
:
rotate
(
180deg
);
top
:
3px
;
}
.fs-label.is-closed
.glyphicon-chevron-right
{
top
:
1px
;
}
#mySidenavfs
{
height
:
100%
;
/* 100% Full-height */
width
:
0
;
/* 0 width - change this with JavaScript */
position
:
fixed
;
/* Stay in place */
z-index
:
150
;
/* Stay on top */
top
:
45px
;
left
:
0
;
background-color
:
#eeeeee
;
/* Black*/
overflow-x
:
hidden
;
/* Disable horizontal scroll */
transition
:
0.5s
;
/* 0.5 second transition effect to slide in the sidenav */
}
/* Tree */
.tree
,
.tree
ul
{
margin
:
0
;
padding
:
0
;
list-style
:
none
}
.tree
ul
{
margin-left
:
1em
;
position
:
relative
}
.tree
ul
ul
{
margin-left
:
.5em
}
.tree
ul
:before
{
content
:
""
;
display
:
block
;
width
:
0
;
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
0
;
border-left
:
1px
solid
}
.tree
li
{
margin
:
0
;
padding
:
0
1em
;
line-height
:
2em
;
color
:
#000
;
font-weight
:
700
;
position
:
relative
}
.tree
ul
li
:before
{
content
:
""
;
display
:
block
;
width
:
10px
;
height
:
0
;
border-top
:
1px
solid
;
margin-top
:
-1px
;
position
:
absolute
;
top
:
1em
;
left
:
0
}
.tree
ul
li
:last-child:before
{
background
:
transparent
;
height
:
auto
;
top
:
1em
;
bottom
:
0
}
.indicator
{
margin-right
:
5px
;
}
.tree
li
button
,
.tree
li
button
:active
,
.tree
li
button
:focus
{
text-decoration
:
none
;
color
:
#000
;
border
:
none
;
background
:
transparent
;
margin
:
0px
0px
0px
0px
;
padding
:
0px
0px
0px
0px
;
outline
:
0
;
}
/* More layout */
body
{
padding-top
:
25px
;
position
:
relative
;
overflow-x
:
hidden
;
height
:
100%
;
}
footer
{
background-color
:
#111
;
color
:
white
;
padding
:
15px
;
text-align
:
center
;
z-index
:
500
;
}
#mappa-pannel
canvas
{
max-height
:
inherit
;
max-width
:
100%
;
}
h3
{
margin-left
:
10px
;
}
h2
{
margin-top
:
-10px
;
font-size
:
24px
;
font-weight
:
bold
;
}
.navbar
{
margin-bottom
:
-20pt
;
border-radius
:
0
;
z-index
:
200
;
}
/* Create options for drag&drop pannel*/
.droppable.dragover
{
background
:
#a1a1a1
;
}
#mappa-pannel
,
#chart-pannel
{
min-height
:
450px
;
max-height
:
750px
;
}
/* input file button */
.btn-bs-file
{
position
:
relative
;
margin-left
:
10px
;
}
.btn-bs-file
input
[
type
=
"file"
]
{
position
:
absolute
;
top
:
-9999999
;
filter
:
alpha
(
opacity
=
0
);
opacity
:
0
;
width
:
0
;
height
:
0
;
outline
:
none
;
cursor
:
inherit
;
}
#reset
{
margin-top
:
15px
;
margin-right
:
10px
;
margin-right
:
10px
;
}
#pannelSettings
{
height
:
100%
;
text-align
:
center
;
}
.DropMenu
{
background-color
:
#333333
;
font-size
:
14px
;
color
:
white
;
}
#spinBoxMin
{
width
:
100px
;
float
:
left
;
margin-left
:
25px
;
}
#spinBoxMax
{
width
:
100px
;
float
:
right
;
margin-right
:
25px
;
}
\ No newline at end of file
/* Tree */
.tree
,
.tree
ul
{
margin
:
0
;
padding
:
0
;
list-style
:
none
}
.tree
ul
{
margin-left
:
1em
;
position
:
relative
}
.tree
ul
ul
{
margin-left
:
.5em
}
.tree
ul
:before
{
content
:
""
;
display
:
block
;
width
:
0
;
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
0
;
border-left
:
1px
solid
}
.tree
li
{
margin
:
0
;
padding
:
0
1em
;
line-height
:
2em
;
color
:
#000
;
font-weight
:
700
;
position
:
relative
}
.tree
ul
li
:before
{
content
:
""
;
display
:
block
;
width
:
10px
;
height
:
0
;
border-top
:
1px
solid
;
margin-top
:
-1px
;
position
:
absolute
;
top
:
1em
;
left
:
0
}
.tree
ul
li
:last-child:before
{
background
:
transparent
;
height
:
auto
;
top
:
1em
;
bottom
:
0
}
.indicator
{
margin-right
:
5px
;
}
.tree
li
button
,
.tree
li
button
:active
,
.tree
li
button
:focus
{
text-decoration
:
none
;
color
:
#000
;
border
:
none
;
background
:
transparent
;
margin
:
0px
0px
0px
0px
;
padding
:
0px
0px
0px
0px
;
outline
:
0
;
}
/* Spinner */
.fa-spinner
{
/* spinner */
position
:
absolute
;
z-index
:
999
;
margin-top
:
275px
;
}
/* Navbar */
.navbar
{
border-radius
:
0
;
z-index
:
200
;
}
#logo-chnet
{
position
:
absolute
;
margin-top
:
-8px
;
}
#testo-logo-chnet
{
position
:
absolute
;
margin-left
:
50px
;
font-size
:
16px
;
color
:
white
;
font-weight
:
bold
;
}
.usrmail
{
font-size
:
12px
;
color
:
black
;
padding-left
:
15px
;
padding-right
:
15px
;
}
.usrname
{
color
:
black
;
font-size
:
14px
;
font-weight
:
bold
;
padding-left
:
15px
;
padding-top
:
10px
;
}
.img-circle
{
border
:
1px
solid
gray
;
}
/* Sidenav */
.w3-bar-block
{
height
:
100%
;
width
:
65px
;
position
:
fixed
;
top
:
50px
;
z-index
:
100
;
background-color
:
#eeeeee
;
overflow-x
:
hidden
;
border
:
1px
solid
#cfcfcf
;
font-size
:
16px
;
color
:
black
;
padding-top
:
20px
;
}
.w3-bar-block
i
{
padding-left
:
20px
;
font-size
:
24px
;
color
:
black
;
}
.w3-bar-item
{
height
:
45px
;
line-height
:
45px
;
cursor
:
pointer
;
}
.w3-bar-item
:hover
{
background-color
:
#99CCFF
;
text-decoration
:
none
;
}
.w3-bar-item
a
:hover
{
text-decoration
:
none
;
}
.text-sidenav
{
color
:
black
;
padding-left
:
10px
;
}
#myContent
{
padding-left
:
80px
;
height
:
100%
;
}
.tooltip
{
position
:
fixed
;
}
.collapse-sidebar-manually
{
position
:
fixed
;
bottom
:
0px
;
}
/* Drag&Drop */
.droppable.dragover
{
background
:
#a1a1a1
;
}
/* Modal */
.btn-bs-file
input
[
type
=
"file"
]
{
position
:
absolute
;
top
:
-9999999
;
filter
:
alpha
(
opacity
=
0
);
opacity
:
0
;
width
:
0
;
height
:
0
;
outline
:
none
;
cursor
:
inherit
;
}
/* Pannelli di mappa e grafico */
#mappa-pannel
,
#chart-pannel
{
min-height
:
550px
;
max-height
:
750px
;
}
#mappa-pannel
canvas
{
max-height
:
inherit
;
max-width
:
100%
;
}
#selectionCanvas
{
position
:
absolute
;
top
:
0
;
left
:
0
;
bottom
:
0
;
right
:
0
;
}
.panel-default
{
background-color
:
transparent
;
height
:
50px
;
width
:
130px
;
float
:
left
;
}
.panel-body
{
margin-top
:
-8px
;
font-size
:
12px
;
font-weight
:
bold
;
}
#spinBoxMin
{
width
:
100px
;
height
:
30px
;
float
:
left
;
margin-left
:
10px
;
}
#spinBoxMax
{
width
:
100px
;
height
:
30px
;
float
:
right
;
margin-right
:
10px
;
}
/* More layout */
body
{
padding-top
:
70px
;
position
:
relative
;
overflow-x
:
hidden
;
height
:
100%
;
}
h2
{
font-size
:
24px
;
font-weight
:
bold
;
}
h6
{
font-weight
:
bold
;
margin-bottom
:
-10px
;
}
li
a
{
color
:
white
;
}
li
a
:link
{
text-decoration
:
none
;
}
li
a
:visited
{
text-decoration
:
none
;
}
li
a
:hover
{
text-decoration
:
none
;
}
li
a
:active
{
text-decoration
:
none
;
}
li
a
{
color
:
white
;
}
This diff is collapsed.
Click to expand it.
tsconfig.json
0 → 100644
View file @
c8f08ac7
{
"compilerOptions"
:
{
//
"target"
:
"es6"
,
//
"allowSyntheticDefaultImports"
:
true
"module"
:
"commonjs"
,
"lib"
:
[
"es6"
,
"dom"
],
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
utility.ts
0 → 100644
View file @
c8f08ac7
import
{
Image
,
coordinates
}
from
"
./image
"
;
import
{
Chart
}
from
"
./chart
"
;
// round to the 3rd decimal digit
function
round3
(
val
:
number
)
{
return
(
Math
.
round
(
val
*
Math
.
pow
(
10
,
3
))
/
Math
.
pow
(
10
,
3
));
}
// sum the elements of the array in the range [from, to]
function
sumVect
(
vect
:
number
[],
from
:
number
,
to
:
number
)
{
let
sum
:
number
=
0
;
for
(
let
i
:
number
=
from
;
i
<
to
;
i
++
)
{
sum
+=
vect
[
i
];
}
return
sum
;
}
// find the max in the sub-matrix specified by the two coordinates
function
findMax
(
matrix
:
number
[][],
pixel1
:
coordinates
,
pixel2
:
coordinates
)
{
let
max
=
0
;
for
(
let
i
=
pixel1
.
x
;
i
<=
pixel2
.
x
;
i
++
)
{
for
(
let
j
=
pixel1
.
y
;
j
<=
pixel2
.
y
;
j
++
)
{
if
(
matrix
[
i
][
j
]
>
max
)
{
max
=
matrix
[
i
][
j
];
}
}
}
return
max
;
}
// prepara i dati per il grafico completo
function
setDataForCompleteChart
(
image
:
Image
,
chart
:
Chart
):
number
[]
{
// per ogni pixel sommo i conteggi di tutti i canali rilevati
let
data
:
number
[]
=
[];
data
.
length
=
image
.
depth
;
for
(
let
i
=
0
;
i
<
image
.
depth
;
i
++
)
{
data
[
i
]
=
0
;
}
for
(
let
i
=
0
;
i
<
image
.
width
;
i
++
)
{
for
(
let
j
=
0
;
j
<
image
.
height
;
j
++
)
{
for
(
let
k
=
0
;
k
<
image
.
depth
;
k
++
)
{
data
[
k
]
+=
image
.
DataMatrix
[
i
][
j
][
k
];
}
}
}
// riempio le stringhe con i dati per il grafico
for
(
let
i
=
0
;
i
<
image
.
depth
;
i
++
)
{
chart
.
dataCompleteChart
+=
(
i
+
1
)
+
"
,
"
+
data
[
i
]
+
"
\n
"
;
chart
.
dataCompleteChartCalibrated
+=
round3
(((
i
+
1
)
*
image
.
calibration
.
a
-
image
.
calibration
.
b
)
/
1000
)
+
"
,
"
+
data
[
i
]
+
"
\n
"
;
}
return
data
;
}
function
getFirstDigitNumber
(
n
:
number
):
number
{
return
parseInt
(
n
.
toString
()[
0
]);
}
function
isAnXHeader
(
value
:
number
,
image
:
Image
):
boolean
{
if
(
value
>
image
.
headerSetValue
&&
getFirstDigitNumber
(
value
)
==
image
.
xCoordHeaderFirstValue
)
{
return
true
;
}
return
false
;
}
function
isAnYHeader
(
value
:
number
,
image
:
Image
):
boolean
{
if
(
value
>
image
.
headerSetValue
&&
getFirstDigitNumber
(
value
)
==
image
.
yCoordHeaderFirstValue
)
{
return
true
;
}
return
false
;
}
export
{
round3
,
sumVect
,
findMax
,
setDataForCompleteChart
,
getFirstDigitNumber
,
isAnXHeader
,
isAnYHeader
};
This diff is collapsed.
Click to expand it.
Prev
1
2
3
Next