[prev in list] [next in list] [prev in thread] [next in thread]
List: vtkusers
Subject: [vtkusers] GetResliceOutput() problem with vtkImagePlaneWidget
From: Mathieu Coursolle <mcoursolle () yahoo ! ca>
Date: 2004-08-31 14:41:53
Message-ID: 20040831144153.48969.qmail () web60205 ! mail ! yahoo ! com
[Download RAW message or body]
Hi,
I am using a vtkImagePlaneWidget to display a volume.
I want to display the content of the plane when an
interraction occurs.
However, the reslice image output is size is always
a power of 2, so my image is bigger than it should be,
filling the extra size with zeros.
Is there a way to crop the image to the original size
if I don't know it?
Here is what I do:
vtkImageData* image = widget->GetResliceOutput();
vtkImageMapToRGBA* image_map = vtkImageMapToRGBA::New();
image_map->SetInput(image);
image_map->SetLookupTable(m_LookUpTable);
imageActor->SetInput(image_map->GetOutput());
m_Renderer->AddProp(imageActor);
Thanks a lot...
MAthieu
---------------------------------
Post your free ad now! Yahoo! Canada Personals
[Attachment #3 (text/html)]
<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>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic