Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
MPBA Radiomics
pyradiomics_custom
Commits
d1f8ba91
Commit
d1f8ba91
authored
Mar 18, 2020
by
Nicole Bussola
Browse files
fix coordinates of SUVmax voxel in SUVPeak
parent
8b4b58e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
radiomics/firstorder.py
View file @
d1f8ba91
...
...
@@ -645,10 +645,11 @@ class RadiomicsFirstOrder(base.RadiomicsFeaturesBase):
"""
ROIPet
=
self
.
imageArray
mask
=
self
.
maskArray
ROIPet
[
~
mask
]
=
numpy
.
nan
oc
=
Oct2Py
()
ROIPet
=
oc
.
double
(
ROIPet
.
tolist
())
#
ROIPet = oc.double(ROIPet.tolist())
with
Oct2Py
()
as
oc
:
try
:
...
...
@@ -658,18 +659,19 @@ class RadiomicsFirstOrder(base.RadiomicsFeaturesBase):
)
SUVmax
=
numpy
.
max
(
ROIPet
[
~
numpy
.
isnan
(
ROIPet
)])
indMax
=
numpy
.
where
(
ROIPet
[
~
numpy
.
isnan
(
ROIPet
)]
==
SUVmax
)[
0
]
indMax
=
numpy
.
where
(
ROIPet
==
SUVmax
)
indMaxX
,
indMaxY
,
indMaxZ
=
indMax
[
0
][
0
],
indMax
[
1
][
0
],
indMax
[
2
][
0
]
[
indMaxX
,
indMaxY
,
indMaxZ
]
=
numpy
.
unravel_index
(
indMax
[
0
],
ROIPet
.
shape
,
'F'
)
# connectivity = oc.getneighbors(
# oc.strel(
# 'arbitrary',
# oc.double(numpy.ones((3, 3, 3), dtype=numpy.int).tolist()),
# )
# )
# import ipdb
# ipdb.set_trace()
connectivity
=
numpy
.
array
(
[
[
-
1
,
-
1
,
-
1
],
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment