[ITK] [ITK-users] Kmeans, Otsu on SPECT image
Cyril Jaudet
drcjaudet at gmail.com
Thu Jun 28 11:11:20 EDT 2018
Hello,
i want to use Otsu and Kmeans method to segment several lesion on SPECT
image.
The threshold method is apply on different lesion independently.
I write it directly in 3DSlicer.
The code for Otsu is working: (write in simpleITK)
#######################
label_masked=ThB.Execute(label_PET, 1, 1 ,1, 0) #
labelOtsu_parlesion=Otsu.Execute(imagePET,label_masked, 0, 1, 64, True,
1)
LabelsOtsu=labelOtsu_parlesion
for label in range(2, len(Nlabels)+1):
label_masked=ThB.Execute(label_PET, label, label ,label, 0) #
labelOtsu_parlesion=Otsu.Execute(imagePET,label_masked, 0, label,
64, True, label)
LabelsOtsu=Add.Execute(LabelsOtsu,labelOtsu_parlesion)
su.PushToSlicer(LabelsOtsu, 'Otsu_intermediate', 2 )
################################
I try with Kmeans but i didn't suceed to use a mask directly and is there
any kmeans++ avaible?
################################################kmeans####################
label_masked=ThB.Execute(dilatelabelOtsu, 1, 1 ,1, 0) #
Image_masked=Mask.Execute(imagePET,label_masked )
labelKmeans_parlesion=Kmeans.Execute(Image_masked)
Imagefinal2=labelKmeans_parlesion
for label in range(2, len(Nlabels)+1):
print label
label_masked=ThB.Execute(dilatelabelOtsu, label, label ,label, 0) #
Image_masked=Mask.Execute(imagePET,label_masked )
labelKmeans_parlesion=Kmeans.Execute(Image_masked)
Imagefinal2=Add.Execute(Imagefinal,labelKmeans_parlesion)
su.PushToSlicer(Imagefinal2, 'Kmeans_final', 2 )
##########################################################
Also if you have idea/experience for denoising SPECT image;)
Thank you,
Cyril Jaudet, Phd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://itk.org/pipermail/community/attachments/20180628/a9f11a3a/attachment.html>
-------------- next part --------------
The ITK community is transitioning from this mailing list to discourse.itk.org. Please join us there!
________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
https://itk.org/mailman/listinfo/insight-users
More information about the Community
mailing list