since there is no method of adding a module to MRView right now I decided to follow @jdtournier 's approach and fork the project to accomplish my goal. I would like to add some type of indicator to mrview to indicate the position of a surgical tool relative to the brain model. For now it would be sufficient to have this indicator in the ortho view and I also thought about overriding the set_focus event for this which must be a very bad programming style.
Since mrview uses Qt for GUI components I would like to know how I would add a new GUI component (for example a red line or a small dot) to the ortho view and how I would register it to the update mechanism of the graphics library. Maybe I would also need a bit of introduction to how coordinates are handled - especially on how to translate mm coordinates in the patient’s system to internal coordinates for the graphic library (I found some methods like screen_to_model in the projections class).
I am of course familiar with object oriented programming but I would like to get a hint on where to add the data structures for this type of function and where the graphic update mechanics happen.
It would also be good to know if you have any advice on how to implement a listener for incoming network packages into this project. Can I register an EventHandler somewhere or would I use a seperate thread for this?
Every bit of help is appreciated!
Darius and @Lucius