<DIV>Hi Luis, </DIV>
<DIV> </DIV>
<DIV>I followed your advice and tried to create my own class to display my image with VTK. </DIV>
<DIV> </DIV>
<DIV>However, as Ì'm still new to VTK, I'm not familiar with all this notions of camera, actor, mapper and so on. I tried to set up my own parameters of a camera. However, I succed to view only a part of my image 1552*128.</DIV>
<DIV> </DIV>
<DIV>Here is what I did: </DIV>
<DIV> </DIV>
<DIV> <STRONG> m_Camera = vtkCamera::New();<BR> m_Actor = vtkImageActor::New();<BR> m_Renderer = vtkRenderer::New();<BR> m_RenderWindow = vtkRenderWindow::New();</STRONG></DIV>
<DIV><STRONG></STRONG> </DIV>
<DIV><STRONG> //setup the pipeline<BR> m_Renderer->AddActor( m_Actor );<BR> m_RenderWindow->AddRenderer( m_Renderer ); </STRONG></DIV>
<DIV><STRONG> </STRONG></DIV>
<DIV><STRONG> // The usual rendering stuff<BR> m_Camera->ComputeViewPlaneNormal();<BR> m_Camera->SetViewUp (0, 0, -1);<BR> m_Camera->SetPosition(0,0,1);<BR> m_Camera->SetFocalPoint(0,0,0);<BR> m_Camera->ParallelProjectionOn(); </STRONG></DIV>
<DIV><STRONG></STRONG> </DIV>
<DIV><STRONG> m_Renderer->SetActiveCamera(m_Camera);<BR> m_Renderer->ResetCamera();<BR> m_Renderer->SetBackground(0,0,0); //set a background color </STRONG></DIV>
<DIV><STRONG></STRONG> </DIV>
<DIV><STRONG> m_Actor->SetInput( image)<BR> m_Camera->SetClippingRange( 0.1, 1000.);<BR> m_RenderWindow->Render();</STRONG></DIV>
<DIV> </DIV>
<DIV>Do you think one or several parameters are not correct and explain my result, If so, could you tell me which one.</DIV>
<DIV> </DIV>
<DIV>Isabelle<BR><BR><B><I>Luis Ibanez <luis.ibanez@kitware.com></I></B> a écrit :</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>Hi Isabelle,<BR><BR>In order to have more control over the rendering of the image<BR>you should replace the vtkImageViewer class with the individual<BR>components used in ImageSliceViewer, namely:<BR><BR><BR>vtkImageActor * m_Actor;<BR>vtkRenderer * m_Renderer;<BR>vtkCamera * m_Camera;<BR>vtkRenderWindow * m_RenderWindow;<BR><BR><BR><BR>The vtkImageViewer is actually a grouping of<BR><BR>vtkRenderWindow *RenderWindow;<BR>vtkRenderer *Renderer;<BR>vtkImageMapper *ImageMapper;<BR>vtkActor2D *Actor2D;<BR>vtkRenderWindowInteractor *Interactor;<BR>vtkInteractorStyleImage *InteractorStyle;<BR><BR><BR>into a single class, just for convenience of use.<BR>http://www.vtk.org/doc/nightly/html/classvtkImageViewer.html<BR><BR>Regards,<BR><BR>Luis</BLOCKQUOTE><p>
                <hr size=1>
Découvrez le nouveau Yahoo! Mail : <font color="red">1 Go d'espace</font> de stockage pour vos mails, photos et vidéos !<br><a href="http://us.rd.yahoo.com/mail_fr/mail_campaigns/splash/taglines_1go/default/*http://fr.promotions.yahoo.com/mail/creer28.html" target="_blank">Créez votre Yahoo! Mail</a>