How to use polydata and imagedata same time

Hey guys, I am now building a medical project and need some tips.
This project is for surgeon. A doctor need to implant bone nail and interactive with nails.

I have bone image data from CT, and STL file of nails.
I can read both of object, but I don’t know how do implement this project better.
So I come to ask.

Here is the function I need to do

  1. insert nail into bone and the nail can be moved
    I add nail to the position and active with vtklinewidget2 by calculate the rotate angle this origin position
  2. I need to reslice whole 3D result to 2D slice image. Here comes the problem.
    I can do reslice with reslicewidget , but when nail is implant. I am not sure how to show slice of nail and set it at right postion.

Should I concat both of object to imagedata or polydata?
Or there is any better way to make it?

3D Slicer is developed for exactly this kind of projects. Its SlicerIGT extension contains lots of tools specifically developed for setting up surgical planning and guidance for various procedures with minimal effort. It is based on VTK and everything is customizable and extensible in Python and C++. If you post what you need to the Slicer forum then you will get guidance on which modules and extensions you can use.

Thanks, I’ll ask to slicer forum and check SlicerIGT extension.