[vtkusers] vtkGridTransform
David Gobbi
dgobbi at irus.rri.ca
Thu Jan 31 14:26:42 EST 2002
Hi Zhang,
I didn't read the code, but here are some comments:
> Dear all:
> I want to do a deformable transformation to several image
> slices. I use the imageblend to blend the raw image and the
> vtkimagegridsource, and then after the transform, I want to
> show the transformed image and the grid, there is one matter, the grid
> will disappear every time when the image number is time of 4, which is
> the setting of the grid space. what's the reason for this?
The grid is 3D, it is made of planes in X, Y and Z. If the slice plane
lies inside one of the grid planes, then the grid disappears.
The grid is only useful if you limit the grid to two dimensions, i.e.
use vtkImageGridSource::SetGridSpacing(4,4,0) if you want to look
at (x,y) slices, to (4,0,4) if you want to look at (x,z) slices, etc.
If you want to properly visualize the deformation in all three dimensions,
then you really need to use three separate grids.
> Also I have a question on the vtkImageBlend, if I want to
> superposition the grid on the image, then after blend, the intensity of
> the image will be changed, cos I cant set the opacity of the image into
> 1, otherwise the grid will be invisible. then I can only set the opacity
> of the image to be less than 1, for example 0.9, then the blended image
> intensity will be only 0.9 of the original image, and is there any way
> to solve this?
To solve this, do the same thing that the examples do:
1) blend in the proper order i.e. the image must be input #0, and the
grid must be input #1
2) put the grid through vtkImageMapToColors with a vtkLookupTable that
has an AlphaRange(0,1) so that the grid lines are opaque and the
space between the grid lines is completely transparent
- David
--
David Gobbi, MSc dgobbi at irus.rri.ca
Advanced Imaging Research Group
Robarts Research Institute, University of Western Ontario
More information about the vtkusers
mailing list