Questions about ImageCPRMapper

Hi everyone,

I’ve done with the cpr function for a long time and recently finished a demo which almost meet the demand of efficiency based on webgl shader, then I saw that vtk added an ImageCPRMapper in recent updates which is close to my work. But the example of it is bind to a widget, so I’m trying to seperate it from the widget by doing:

  1. Give it a vtkImageData as input 0.
  2. Give it a vtkPolyData as input 1 which has a point data for center positions and a dataArray for points’ orientations.
  3. Set it as a mapper for a vtkImageSlice and put it to a renderWindow.
    However, the actor did not show anything, do I need to add any more?

Second is, the api doc mentioned the stretched mode and straightened mode, but I didn’t find the switch, is this decided by the orientation input?

Thanks in advance

The first question is solved because I didn’t set the lines for the polydata, but there is an additional question.
In my methods I do the sampling on each point with a tangent to create a straightened cpr, it results like this:
cpr

But the centerline orientations used in the imageCPRMapper does not seems like a tangent or biTangent, the directions are a bit confusing,