Hi VTK team,
starting with VTK9, there is an issue/a difference with respect to SetUserMatrix of vtkActor. Earlier (e.g. VTK 8.1.2), the matrix was correctly applied, but now this does not seem to be the case. Has there be some change?
My application shows DICOM images with their true DICOM orientation and a border (vtkPolyData, result of vtkResliceMapper’s SlicePlane being used in a vtkCutter for a vtkOutlineFilter applied to the image data), and while setting the Matrix from unrotated to rotated DICOM coordinates works perfectly with vtkImageSlice, it does not seem to apply to the vtkActor handling the border. While (obviously) rendering is correct in case of an identity matrix, it fails for other orientations since VTK9.
Has there been a change or is this a bug? How can I help fix this (locally with a work-around or in the VTK archive?). Is there a test case?
In VTK9, you can store the image orientation properly in vtkImageData. Actors could get the orientation from there, so no user matrix manipulation should be necessary anymore. Of course, since oriented images are quite new in VTK, probably support for them is not implemented everywhere yet, but if you need to spend time with debugging anyway, it would be nice if you could work on the modern way of handling oriented images.
In 3D Slicer, we are just switching to VTK9 and encountered many issues (some of them are listed here), but once things settle, we will start moving to using oriented VTK images everywhere. It will simplify greatly simplify the entire application.
Well, I have found the problem - before VTK 9.0, I had to transform the output of the vtkOutlineFilter such that the bounding box matched the oriented volume. In VTK 9.0, this is done indeed as vtkImageData has proper orientation. So I had to remove this extra rotation step.
@lassoan - over the time, I guess I will completely move to the orientation in vtkImageData.