[vtkusers] How to make a patchwork quilt of images?
Peter Wainwright
prw at ceiriog.eclipse.co.uk
Tue Aug 26 16:38:25 EDT 2008
I'm trying to assemble an image from a square array of square tiles.
To do this, I have tried the following:
I read each image, then use vtkImageTranslateExtent to translate image
(i,j) by (d*i,d*j). Then I assemble each row with a vtkImageAppend
filter, and assemble the whole array by another vtkImageAppend filter in
the y direction. I use PreserveExtents so the position of each tile can
be specified exactly, for example, sometimes there are missing tiles
which should leave a hole.
I want to be able to insert and remove tiles from this mosaic.
Unfortunately, I find that if I remove the bottom left tile (0,0) - the
whole array moves to the left. This seems to be caused by the fact that
vtkImageTranslateExtent modifies the ORIGIN as well as the WHOLE_EXTENT,
and that my composite image copies its ORIGIN from the first tile on
the bottom row, which is no longer (0,0) but (1,0).
I don't understand why vtkImageTranslateExtent modifies the origin
in the way that it does.
It's not quite the right filter for my purpose. Can you suggest another
way to accomplish this image stitching?
Thanks,
Peter Wainwright
More information about the vtkusers
mailing list