[vtkusers] display image with vtkImageViewer
Adrian Albert
a.albert at jacobs-university.de
Thu May 1 17:55:04 EDT 2008
Hi All
I was wondering what does one need to do to make vtkImageViewer work, since
I am following the examples in the documentation, and I get no result.
My data is a 2D vtkImageData object of dimensions (2x2x1) (so 4 boxes), with
4 non-zero entries, with values:
2D Slice value at 0 0: 3376
2D Slice value at 0 1: 305194
2D Slice value at 1 0: 334
2D Slice value at 1 1: 811
I'd like to render this image on the screen, but I only get a black output
with my code:
vtkImageViewer *viewer = vtkImageViewer::New();
viewer->SetInput (my2DSlice);
viewer->SetZSlice (0);
// viewer->SetColorWindow(0.5);
viewer->SetColorLevel (0.001);
viewer->Render ();
What is the problem here? I know that one value is way larger than the
others, but it should appear darker or lighter, and the others should be
still visible.
Any ideas and hints will be appreciated.
Best,
Adrian
--
---------------------------------------------------
Adrian Albert
School of Engineering and Science
Jacobs University Bremen
Germany
Tel.: 00494212003258
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080501/4abcbdff/attachment.htm>
More information about the vtkusers
mailing list