<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I'm reading a jpeg image with vtkJPEGReader and visualize it as usual with vtkActor, vtkRenderer, vtkRenderWindow.... </DIV>
<DIV> </DIV>
<DIV>To scale and position correctly my image, I need to set up camera parameters, as I forgot yesterday. </DIV>
<DIV> </DIV>
<DIV>My image is 640*470 pixels. However, as I'm trying to retrieve its dimensions , I got something wrong. </DIV>
<DIV> </DIV>
<DIV>//pipeline</DIV>
<DIV>void ExecutePipeline()</DIV>
<DIV>{</DIV>
<DIV> <STRONG>shiftscale->SetInput( reader->GetOutput();</STRONG> //vtkImageShiftScale<BR> <STRONG>actor->SetInput( shiftscale->GetOutput();</STRONG> //vtkImageActor<BR> <STRONG>renderer->AddActor( actor ); </STRONG> //vtkRenderer<BR> <STRONG>renderWindow->AddRenderer( renderer );</STRONG> //vtkRenderWindow</DIV>
<DIV> </DIV>
<DIV> <STRONG>SetupCamera();<BR></STRONG>}</DIV>
<DIV> </DIV>
<DIV>void SetupCamera()</DIV>
<DIV>{</DIV>
<DIV> <STRONG>vtkImageData* image = reader->GetOutput();<BR></STRONG>
<DIV><STRONG> int dimension[2]; image->GetDimensions(dimension); --> 106200544, 0 ???????????????<BR> float spacing[2]; image->GetSpacing(spacing); --> 1,1<BR> float origin[2]; image->GetOrigin(origin); --> 0,0</STRONG></DIV></DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV>here is how I call my functions:</DIV>
<DIV><STRONG>reader->SetFileName("image.jpg"); //vtkJPEGReader</STRONG></DIV>
<DIV><STRONG>ExecutePipeline();</STRONG></DIV>
<DIV><STRONG></STRONG> </DIV>
<DIV>What did I miss? Plese help me</DIV>
<DIV> </DIV>
<DIV>Isabelle</DIV>
<DIV><STRONG></STRONG> </DIV><p>
<hr size=1>
<b><font color=#FF0000>Appel audio GRATUIT</font> partout dans le monde</b> avec le nouveau Yahoo! Messenger<br>
<a href="http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com">Téléchargez le ici !</a>