Commit d1f8ba91 authored by Nicole Bussola's avatar Nicole Bussola
Browse files

fix coordinates of SUVmax voxel in SUVPeak

parent 8b4b58e4
......@@ -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],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment