parent
a94633a6d8
commit
7ee69305ad
Binary file not shown.
11
main.py
11
main.py
|
@ -1,6 +1,6 @@
|
||||||
import SimpleITK as stik
|
import SimpleITK as sitk
|
||||||
|
|
||||||
img = stik.ReadImage("Thorax1.0B40f_Downsampled_by_2.nrrd")
|
img = sitk.ReadImage("Thorax1.0B40f_Downsampled_by_2.nrrd")
|
||||||
|
|
||||||
xSp, ySp, zSp = img.GetSpacing()
|
xSp, ySp, zSp = img.GetSpacing()
|
||||||
|
|
||||||
|
@ -15,6 +15,11 @@ print(f"Size: \n{xSi = }\n{ySi = }\n{zSi = }\n")
|
||||||
print(f"2) Das Bild hat in den drei Raumrichtungen {xSi * ySi * zSi} Voxel. \n")
|
print(f"2) Das Bild hat in den drei Raumrichtungen {xSi * ySi * zSi} Voxel. \n")
|
||||||
print(f"3) Die Methode GetSize() gibt den Typ tuple zurück. \n")
|
print(f"3) Die Methode GetSize() gibt den Typ tuple zurück. \n")
|
||||||
|
|
||||||
lungs = stik.ConnectedThreshold(img, seedList= (120,140,100), lower=-1100, upper=-200)
|
|
||||||
|
seedList = [(120,140,100)]
|
||||||
|
|
||||||
|
lungs = sitk.ConnectedThreshold(img, seedList , -1100, -200)
|
||||||
|
sitk.WriteImage(lungs, "lungs.nrrd")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue