Much faster np approach

main
2wenty1ne 2024-11-03 18:57:11 +01:00
parent 006adb3112
commit 88e065fda0
1 changed files with 1 additions and 5 deletions

View File

@ -43,12 +43,8 @@ plt.show()
plt.clf() plt.clf()
# Alle Helligkeitswerte der Lunge seperieren # Alle Helligkeitswerte der Lunge seperieren
lungBrightness = []
lungsArray1D = lungsArray.flatten() lungsArray1D = lungsArray.flatten()
lungBrightness = thoraxArray1D[lungsArray1D > 0]
for (ind, elem) in enumerate(lungsArray1D):
if elem > 0:
lungBrightness.append(thoraxArray1D[ind])
# Histogram aller Helligkeitswerte in der Lunge # Histogram aller Helligkeitswerte in der Lunge
plt.hist(lungBrightness, bins=100) plt.hist(lungBrightness, bins=100)