I am trying to generate DRR of a CT using python code. I am also using Slicer to get an idea of the approximate idea of the transfer function.
I observered that just ther rendering part of my code (only the line renWin.Render()) takes about 4 seconds while the Slicer rendering seems almost instantaneous.
Am I missing something over here?
Please let me know any additional information that you need. I am not exactly sure what all is required to debug this.
It could be the data type of the image data. Some DICOM readers convert CT data to float, which might slow down the GPU. I’m fairly certain that Slicer would use short or ushort for DICOM CT. If the data is float, then check the range to see if you can safely cast to ushort.
Wow, I did not know that this could make such a difference. I would be interested in what your rendering pipeline looks like @tzodge. Are you using vtkGPUVolumeRayCastMapper?
The reason I’m asking is that we are doing rendering of float data in our application, but hearing this I’m wondering whether we should possibly convert to ushort prior to rendering (our data range would permit it).