Initial commit + Setup + Answer to 2) + 3)
commit
c762d773ff
Binary file not shown.
|
@ -0,0 +1,16 @@
|
||||||
|
import SimpleITK as stik
|
||||||
|
|
||||||
|
img = stik.ReadImage(".\Thorax1.0B40f_Downsampled_by_2.nrrd")
|
||||||
|
|
||||||
|
xSp, ySp, zSp = img.GetSpacing()
|
||||||
|
|
||||||
|
print(f"Spacing: \n{xSp = }\n{ySp = }\n{zSp = }\n")
|
||||||
|
#TODO Frage: "1) Sind die Voxel Würfel oder Quader mit unterschiedlichen Seitenlängen?"
|
||||||
|
|
||||||
|
sizeVector = img.GetSize()
|
||||||
|
xSi, ySi, zSi = sizeVector
|
||||||
|
|
||||||
|
print(f"Size: \n{xSi = }\n{ySi = }\n{zSi = }\n")
|
||||||
|
|
||||||
|
print(f"2) Das Bild hat in den drei Raumrichtungen {xSi * ySi * zSi} Voxel.")
|
||||||
|
print(f"3) Die Methode GetSize() gibt den Typ tuple zurück.")
|
Loading…
Reference in New Issue