MantisBT - VTK
View Issue Details
0013495VTK(No Category)public2012-10-08 08:002012-12-04 09:46
Seungbum Koo 
David Gobbi 
highminorhave not tried
closedunable to reproduce 
5.8.0 
 
TBD
incorrect functionality
0013495: vtkImageActor image shift
Image is shifted by one or two pixels in vtkImageActor. It is observed in 5.8.0 and 5.10.0. When I tested it using a color picture then it looks like color layers shift differently.

Attached is a test result using a 20x10 pixel BMP image (24bit, made in PhotoShop) with some grids. Left image is the original image and the right image is the image on vtkImageActor through the following pipeline. You can see a strangely shifted image.

vtkBMPReader
vtkImageShiftScale
vtkImageShiftScale.SetOutputScalarTypeToUnsignedChar()
vtkImageData
vtkImageActor
vtkImageActor.InterpolateOff()
No tags attached.
png vtkimageactor_problem.PNG (51,491) 2012-10-08 08:00
https://www.vtk.org/Bug/file/9294/vtkimageactor_problem.PNG
png

png imageactor.png (15,478) 2012-10-29 23:11
https://www.vtk.org/Bug/file/9324/imageactor.png
png
Issue History
2012-10-08 08:00Seungbum KooNew Issue
2012-10-08 08:00Seungbum KooFile Added: vtkimageactor_problem.PNG
2012-10-29 23:11David GobbiFile Added: imageactor.png
2012-10-29 23:25David GobbiNote Added: 0029587
2012-10-29 23:27David GobbiNote Edited: 0029587bug_revision_view_page.php?bugnote_id=29587#r513
2012-12-04 09:45David GobbiAssigned To => David Gobbi
2012-12-04 09:45David GobbiStatusbacklog => tabled
2012-12-04 09:45David GobbiStatustabled => closed
2012-12-04 09:46David GobbiResolutionopen => unable to reproduce

Notes
(0029587)
David Gobbi   
2012-10-29 23:25   
(edited on: 2012-10-29 23:27)
I cannot reproduce this bug. I grabbed a screenshot of your test image, resized it to 10x20, saved it as a png file, and displayed it with vtkImageActor. The result is shown in imageactor.png. The rendered result is identical to the original image (except for the border, which can be rendered by calling vtkImageActor->GetMapper()->BorderOn()).

I suspect that the problem is due to incompatibility between your BMP file and the vtkBMPReader. Try using a different file format (PNG, TIFF, JPEG or PNM).