[vtkusers] newbie:Displaying Images with VTK
rouven at uni-koblenz.de
rouven at uni-koblenz.de
Thu Jan 25 04:43:31 EST 2007
Dear Users,
I´m developing an medical image processing tool with VS 2005 using MFC. My
first task now is to simply open an image and displaying it on the screen.
For this I´m using the vtkImageViewer, ´cause the documentation says it´s
a quite easy to use wrapper around several functionalities. Here is what I
did so far:
1. reading file with vtkFileReader:
...
this->m_imgReader->SetFileName(lpszPathName);
...
2. passing image to the Image Viewer
...
this->ImageViewer->SetInput(this->GetDocument()->m_imgReader->GetOutput());
this->ImageViewer->GetActor2D()->VisibilityOn();
...
3. rendering content
...
this->ImageViewer->Render();
...
I also used SetParentID/SetWindowID to let the ImageViewer know which
window to use. The result is, that I only get a black background.
So my question is, if I also have to create the
Renderer/RenderWindow/Actor2D... and assigning it to my ImageViewer to
make it work, or if I have forgotten s.th. else important.
Thank you in advance
Rouven Asmus
More information about the vtkusers
mailing list