I need assistance integrating VTK with QT, i have tried integrating them but my QT buttons do not work when i run the application. images do not render when i click the buttons to render them.
Have a look at MinimalQtVTKApp, it uses a button called Randomize
.
Ok, but QT at Python or C++? Anyway you shoudl use QVTKRenderWindowInteractor to integrate VTK with QT, eq:
def __init__(
self, parent: QVTKRenderWindowInteractor):
"""Create new Viewer instance."""
self.ren = vtkRenderer()
self.wren = parent.GetRenderWindow()
self.iren = self.wren.GetInteractor()
And next just pin buttons with propper slots and singals.
i am using C++ sorry for the late response, i have just been dealing with an emergency situation for days now
okay thank you, i will take a look at that
No problems.
would take a look at it now then give you feedback.
i have checked it out, is it possible to build a DICOM volume rendering application on top of this code or is there any other example i should take a look at?
possible to build a DICOM volume rendering application
A good example is 3D Slicer: it uses VTK+Qt for loading and rendering DICOM images, segmentation objects, meshes, transforms, etc. All the usual features of all medical image viewers, all free, open-source, VTK-based. You can use as is, in C++ and/or Python, or use it as a kit to build your own custom application (this is what most companies do), or copy-paste what you need into your own application (tempting, especially if you already invested into developing your own application; but probably not the best choice in the long term, as you don’t automatically benefit from all the platform improvements continuously contributed by others).
Thankyou for looking at this. Emmanuel, this would be the best approach for DICOM volume rendering.