I would like to view the combination of two images (specifically two slices from a volume). It appears that I can do this with vtkImageStack or vtkImageBlend. Which class is preferable?
thank you in advance,
In general, vtkImageBlend is easier to use and is preferable if it satisfies your needs. The most common use case is for blending multiple color images together, where all the images have the same dimensions, pixel spacing, etc. Each output pixel or voxel is a blend of the input pixels or voxels.
The vtkImageStack works in a completely different manner, since it’s part of the rendering pipeline rather than part of the image processing pipeline. It controls the rendering of images to the screen to ensure that they are rendered in the desired order, according to the LayerNumber that is set in the vtkImageProperty for each image. The blending is done on the screen pixels, rather than the image data pixels, so the input images don’t have to have the same pixel spacing or the same dimensions.
Thanks very much for the explanation, David. That makes good sense (and that distinction was nowhere apparent to me in what I could find online).