We have been using
vtkImagePermute to swap two axes on
vtkImageData in Tomviz. We have also recently been adding support for the
vtkImageData to have multiple scalars associated with it (i. e.,
image->GetPointData()->GetNumberOfArrays() > 1).
However, I noticed that the permute is only applied to the active scalars.
I currently have a semi-complicated workaround for this, which involves creating a
vtkImageData for each of the scalars, performing a
vtkImagePermute on each, and then putting the scalars back into the original
But I was wondering, is there any interest in getting
vtkImagePermute to work on all of the scalars? I think one option could be to loop through all of the scalars in vtkImageReslice, and perform the operation on each of the scalars. However,
vtkImageReslice does call some functions that work with the active scalars. We might would either need to change these function calls, or change the active scalars in each iteration of the loop via
SetActiveScalars (and I’m not sure if that’s desirable).