<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm reading a jpeg image with vtkJPEGReader and visualize it as usual with vtkActor, vtkRenderer, vtkRenderWindow.... </DIV>
<DIV>&nbsp;</DIV>
<DIV>To scale and position correctly my image, I need to set up camera parameters, as I forgot yesterday. </DIV>
<DIV>&nbsp;</DIV>
<DIV>My image is 640*470 pixels. However, as I'm trying to retrieve its dimensions , I got something wrong. </DIV>
<DIV>&nbsp;</DIV>
<DIV>//pipeline</DIV>
<DIV>void ExecutePipeline()</DIV>
<DIV>{</DIV>
<DIV>&nbsp;&nbsp;<STRONG>shiftscale-&gt;SetInput( reader-&gt;GetOutput();</STRONG> //vtkImageShiftScale<BR>&nbsp; <STRONG>actor-&gt;SetInput( shiftscale-&gt;GetOutput();</STRONG>&nbsp; //vtkImageActor<BR>&nbsp;&nbsp;<STRONG>renderer-&gt;AddActor( actor );&nbsp;</STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //vtkRenderer<BR>&nbsp; <STRONG>renderWindow-&gt;AddRenderer( renderer );</STRONG>&nbsp;&nbsp; //vtkRenderWindow</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; <STRONG>SetupCamera();<BR></STRONG>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>void SetupCamera()</DIV>
<DIV>{</DIV>
<DIV>&nbsp;<STRONG>vtkImageData* image = reader-&gt;GetOutput();<BR></STRONG>
<DIV><STRONG>&nbsp;int dimension[2]; image-&gt;GetDimensions(dimension); --&gt; 106200544, 0 ???????????????<BR>&nbsp;float spacing[2]; image-&gt;GetSpacing(spacing);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt; 1,1<BR>&nbsp;float origin[2];&nbsp; image-&gt;GetOrigin(origin);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt; 0,0</STRONG></DIV></DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>here is how I call my functions:</DIV>
<DIV><STRONG>reader-&gt;SetFileName("image.jpg"); //vtkJPEGReader</STRONG></DIV>
<DIV><STRONG>ExecutePipeline();</STRONG></DIV>
<DIV><STRONG></STRONG>&nbsp;</DIV>
<DIV>What did I miss? Plese help me</DIV>
<DIV>&nbsp;</DIV>
<DIV>Isabelle</DIV>
<DIV><STRONG></STRONG>&nbsp;</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>