Python Forum
Improve segmentation : Create sphere brush to edit voxels values in scanners image wi - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: Improve segmentation : Create sphere brush to edit voxels values in scanners image wi (/thread-11642.html)



Improve segmentation : Create sphere brush to edit voxels values in scanners image wi - LauraLaura - Jul-19-2018

Good morning,

I would need some help to finish my project as an intern working on segmentation of an organ on 3D Slicer.
I have a segmented organ with white pixels over a black background (a vtkMRMLScalarVolumeNode).

I would like to add some missing white voxels to my segmented organ and erase others.
I have tried working on "Segment editor" on 3D Slicer but it doesn’t work as I need.

I am looking for another way to do this but I don’t know how to proceed :

- how can I create a sphere brush (in 3D) in python which would be able to browse / scan my image (as a numpy array if necessary) thanks to mouse clicks’ of the user on the image
- then, if the user clicks, tell to the sphere to turn the pixels of my image from their value to another one that I choose
?

Does someone have an idea ?

In my version of 3D Slicer, I can't use Tkinter neither pygame...

I have read lots and lots of comments / topics / codes but I can’t find anything that I understand and able to add to my code easily (I am new on 3D Slicer)
Thanks a lot in advance for your help
Laura


RE: Improve segmentation : Create sphere brush to edit voxels values in scanners image wi - Larz60+ - Jul-19-2018

This question would probably be answered more quickly here: https://discourse.slicer.org/
That being said, there may be a user here that will have the answer