<DIV>Hi,</DIV>
<DIV>I am using a vtkImagePlaneWidget to display a volume.</DIV>
<DIV>I want to display the content of the plane when an </DIV>
<DIV>interraction occurs. </DIV>
<DIV>However, the reslice image output is size is always</DIV>
<DIV>a power of 2, so my image is bigger than it should be, </DIV>
<DIV>filling the extra size with zeros.</DIV>
<DIV>Is there a way to crop the image to the original size</DIV>
<DIV>if I don't know it?</DIV>
<DIV>Here is what I do:</DIV>
<DIV>&nbsp;</DIV>
<DIV>vtkImageData* image = widget-&gt;GetResliceOutput();</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>vtkImageMapToRGBA* image_map = vtkImageMapToRGBA::New();&nbsp;</FONT><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp; image_map-&gt;SetInput(image); </FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp; image_map-&gt;SetLookupTable(m_LookUpTable);</DIV>
<DIV>
<P></P>
<P></FONT><FONT size=2>imageActor-&gt;SetInput(image_map-&gt;GetOutput());</FONT><FONT color=#008000 size=2></P></FONT><FONT size=2>
<P>m_Renderer-&gt;AddProp(imageActor);</P>
<P>&nbsp;</P>
<P>Thanks a lot...</P>
<P>MAthieu</P></FONT></DIV><p><br><hr size=1>Post your free ad now! <a href="http://ca.personals.yahoo.com/"><b>Yahoo! Canada Personals</b></a><br>