@dgobbi I find another stranger thing.
After using vtkImageSliceMapper
and vtkImageSlice
, the bounds of actor is the same as that of vtkImg.
Then, I want to add vtkImageMapToWindowLevelColors
in my pipeline as following:
vtkImg.SetDirectionMatrix(axialElement)
windowLevel = vtk.vtkImageMapToWindowLevelColors()
windowLevel.SetInputData(vtkImg)
windowLevel.Update()
sliceMapper = vtk.vtkImageSliceMapper()
# sliceMapper.SetInputData(vtkImg)
sliceMapper.SetInputConnection(windowLevel.GetOutputPort())
sliceMapper.Update()
sliceActor = vtk.vtkImageSlice()
sliceActor.SetMapper(sliceMapper)
Then, the output information is different:
prop bounds: (0.0, 49.0, 0.0, 49.0, 10.0, 10.0)
image bounds: (0.0, 0.0, 0.0, 49.0, 10.0, 59.0)
The bounds of vtkImg and actor is different.
Thus, the vtkImageMapToWindowLevelColors
would change the bounds of mapper?
How to fix this bug?
Maybe I should using the vtkImageData which do not including direction information ~~~