[vtkusers] Background in vtkImageReslice

David Gobbi dgobbi at imaging.robarts.ca
Mon May 17 14:17:49 EDT 2004


Hi Mahesh,

My guess is that the output of vtkImageReslice is either going into
vtkImageViewer or going through vtkImageMapToColors before it is
displayed, so the values that vtkImageReslice sets to zero end up
being mapped to white.

The only way to be certain that the output of vtkImageReslice will be
black is to have vtkImageReslice operate on RGB or RGBA data, e.g.
pass the data through vtkImageMapToColors before it goes into
vtkImageReslice.

Also, be certain that you set the Background of the renderer to black.

 - David


On Mon, 17 May 2004, mahesh wrote:

> Hi there,
>
> I am using vtkImageReslice to reorient a volume (vtkImageData populated from a series of 2D images) and then retrieve slices along the newly oriented axes. Now, I'm delibrately setting the output extent of the reslice to be greater than the actual output slices' dimensions.
>
> My problem is that the extra area surrounding the output slice is all white and I need it to be black. I tried reslice -> SetBackgroundColor(0,0,0,1) and reslice ->SetBackgroundLevel(0); both did not work. Is there any other function that can do this? Any help regarding this would be greatly appreciated.
>
> Thanks for your time,
>
> ---
> Mahesh "Max" Nagarajan
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list