Reimplementation of 3D slicer CPR using pure VTK

Hello everyone,

I’m trying to develop 3d Slicer Curve Planar Reformation in my own PACS Viewer, specifically OHIF:

I’m looking to use VTK Wasm to implement this. My question is:
Since Slicer’s CPR extension is made specifically for Slicer, is it possible to translate those Slicer’s MRML abstractions to pure vtk/vtk.js code?
How should I approach this?

Hi @S-Linh,

VTK js already has a CPR implementation : ImageCPRMapper | VTK.js

There is also a pure VTK CPR implementation available through the vtkOpenGLSurfaceProbeVolumeMapper

For the C++ implementation, you can have a look at the tests for an example on how to use the mapper.

For VTK js, you also have an example available

Best,
Thibault

Hi @S-Linh,

You don’t need to translate Slicer MRML. A more direct approach is to use VTK.js ImageCPRMapper and integrate it within OHIF.

I implemented a CPR prototype using:

  • VTK.js ImageCPRMapper for CPR rendering

  • Custom Cornerstone3D CPR viewports, fully supporting native Cornerstone3D tools and interaction

  • OHIF Viewer as the integration layer

It demonstrates:

  • Curved planar reformation viewport and cross-sectional viewports with custom tooling

  • Real-time centerline editing with live CPR re-rendering

  • Segmentation rendering pipeline integration

@S_G Hi Gaber, Can you share the source code of your CPR prototype?

@S_G I have questions, as I am new to all these:

  • What are the 3 viewports on the right of the CPR viewport result? how do they work?
  • How do you calculate the orientation of each centerline?
  • Are you generating centerlines based on coronal/sagittal/axial view of the original CT dicom images?