[vtkusers] Re: Plz help!!Tiff so Dark

Jeremy Winston winston at cat.rpi.edu
Mon Apr 14 11:43:07 EDT 2003

yasser salman wrote:
> hi all.

   Please don't email me directly with such questions unless we 
have previously established a dialog about it on the vtk-users

> when i read a tiff image it seems so dark the following cose that i use:
> vtkTIFFReader* reader = vtkTIFFReader::New();
>      reader->SetFileName("D:/yasser/1.tif"); //location of tiff image.
>      vtkImageViewer* viewer = vtkImageViewer::New();
>      viewer->SetInput(reader->GetOutput());
>      viewer->SetSize(256,256); //size of my image
>      viewer->Render();

You need to set your window and level:


The values you use will be dependent on your data; I used 256 & 128
as an example (with 8-bit unsigned monochrome pixels).

As for the medical example, I don't have one handy & I don't have
time to find one for you.  I suggest you try searching the archives
http://www.kitware.com/search.html   or try Google  http://www.google.com

Also, just keep trying to massage the medical example code -- it's all
there; you just have to tweak it.


More information about the vtkusers mailing list