I am currently working on upgrading a DICOM viewer project from VTK version 5.10 to version 9.3. During this process, I have encountered specific challenges related to the window-level functionality, which is crucial for the proper display of medical images.
The core components of the viewer include the primary viewer, which is vtkINRIA3D, and a custom mapper known as vtkSmartVolumeMapperPlus, which extends the capabilities of the standard vtkVolumeMapper. This custom mapper has been designed to include several enhanced features that go beyond what is typically offered by vtkVolumeMapper. These features include the ability to adjust the RescaleSlope, modify the RescaleIntercept, implement UseIgnoreValue, and control UseVRQuality.
As part of the migration progress, I have successfully transitioned the functionality to VTK’s native vtkSmartVolumeMapper. The core features have been migrated without any significant issues. However, I am facing a critical challenge: the window-level functionality is not performing as intended in the new implementation.
To illustrate the situation, in the previous working code, I utilized the following line to set the RescaleIntercept:
In vtkSmartVolumeMapper i didnt find any SetRescaleIntercept function.
At this point, I am seeking guidance on how to implement equivalent window-level functionality using vtkSmartVolumeMapper that matches the behavior I previously achieved with vtkSmartVolumeMapperPlus. Any insights or suggestions from the community would be greatly appreciated as I work to resolve this issue.
after calling the SetRescaleIntercept function its changing from below image
Before jumping into reviving a 15-20 year old C++ desktop application, you need to do some strategic planning.
The medical image application landscape has been completely changed in the past 15 years. Web applications look flashy, modern, and familiar to users and they are conveniently accessible on any device, don’t need the trust and commitment from users to install; and their feature set is getting quite extensive now (see for example OHIF). A desktop application has to offer 10x more than a similar web application to compensate for all those advantages. Most of the medical image computing desktop applications that were competing 10-15 years ago were not up to this challenge and are now dead or on a steep decline. Only a few desktop applications remained alive and kept growing: 3D Slicer (because they offer so much more than anything else out there), ITK-Snap (it is not a platform and has very limited feature set, but it is the simplest solution for basic manual segmentation tasks), and maybe I would also mention MITK (it has a magnitude less users compared to the other two and has not seen much growth, but it is one of the very few applications that are still developed).
So, my advice would be to not start/restart/revive an old desktop medical application from scratch but build on top of a state-of-the-art medical application platform. 3D Slicer and MITK are probably the best platforms for desktop. Later this year, 3D Slicer applications are also going to be available as native Python applications, and also on the web (via VTK trame). For web applications, you may consider building on Kitware VolView or OHIF. All these use VTK under the hood, so you will be able to leverage your experience with VTK.
I understand that switching is difficult if you already invested in a different approach. I don’t have funding to investigate issues that are not relevant for 3D Slicer, but maybe others can help you out.