<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> </DIV>
<DIV>vtkImageData* image = widget->GetResliceOutput();</DIV>
<DIV> </DIV>
<DIV><FONT size=2>vtkImageMapToRGBA* image_map = vtkImageMapToRGBA::New(); </FONT><FONT size=2> </FONT></DIV>
<DIV><FONT size=2> image_map->SetInput(image); </FONT></DIV>
<DIV><FONT size=2> image_map->SetLookupTable(m_LookUpTable);</DIV>
<DIV>
<P></P>
<P></FONT><FONT size=2>imageActor->SetInput(image_map->GetOutput());</FONT><FONT color=#008000 size=2></P></FONT><FONT size=2>
<P>m_Renderer->AddProp(imageActor);</P>
<P> </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>