glance
glance copied to clipboard
New view supporting slicing in an arbitrary direction
I would like to add a new 2D view, where the image is sliced in an arbitrary, chosen direction (other than sagittal/coronal/axial). Since the slice isn't aligned with any of the axes, some sort of interpolation will be needed. I noticed vtk provides the vtkImageReslicer filter, which seems fit for this purpose.
However, since I am not so familiar with the Paraview architecture, I wonder where to start. Right now, the idea is to use a slightly modified version of the vtkSliceRepresentationProxy for this new view. In this modified representation, the input data would be fed through a vtkImageReslicer before being passed to the mapper.
Do you have any suggestions on how to proceed? Or, if you don't agree on the approach, could you perhaps point me in the right direction?
Your help is greatly appreciated.
If you create a vtkCameraSliceRepresentationProxy in vtk.js, Glance could then be updated to support that just by extending its proxy configuration.
Here is an example of how you can extend vtkSliceRepresentationProxy
: https://github.com/KitwareMedical/paraview-medical/blob/master/src/vtk/TransformedSliceRepresentationProxy/index.js. The core logic that inserts a transform filter step is in here: https://github.com/KitwareMedical/paraview-medical/blob/5357466e318100bf2d749ca9b1e76dcaa9f06e9f/src/vtk/transformMixin.js#L1.
Don't forget to update proxy.js
to uses your new slice representation proxy.