specifying bones by lines


I am a physicist and have recently started to orient in data science. I came an idea to calculate the angle for the valgus deformation from an x-ray image (attachment). All I did for the moment is to read image and apply some filters to find edges in the image by using Python. I still could not figure out how to draw such lines based on each bone position to estimate the valgus angle. I wonder if SimpleITK is a tool to help me out for that purpose and if so I would appreciate of any information.


Hello @epilicer,

Welcome to SimpleITK!

Generally speaking, SimpleITK does not provide visualization (shape drawing) functionality, its focus is on image analysis. Having said that, in Python you can combine the results from SimpleITK with visualization and user interfaces (e.g. pyqt or just plain matplotlib).

This Jupyter notebook, from our notebook repository actually deals with computation of a panoramic image as a first step for HKA computation and is possibly a good starting point for your work.


If you need interactive graphical user interface for specifying points, lines, angles, displaying them over image slices, etc. then you can use markups module in 3D Slicer. Slicer has an embedded Python interpreter, so you can run your Python code that uses SimpleITK or any other Python package inside Slicer.

1 Like