Hi Sandra,<div><br></div><div>Maybe you have to rescale your image (using vtkImageShiftScale) after resampling with vtkResample, so as to ensure that pixels&#39; type is unsigned char.</div><div><br></div><div>Miguel<br><br>
<div class="gmail_quote">On Fri, Mar 30, 2012 at 6:23 PM, Hikaruchan <span dir="ltr">&lt;<a href="mailto:Sandra.Schroetter.fl@ait.ac.at">Sandra.Schroetter.fl@ait.ac.at</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi everyone!<br>
<br>
I have a little Problem with my vtkLookupTable, and I don&#39;t know why. I have<br>
a Lookuptable with 256 colors, but after rendering my actor it seems that<br>
the image which is rendered to the screen and was mapped through the<br>
lookuptable only something about eight colors (it only looks like that). And<br>
I don&#39;t get it, where I make my mistake. Hope you can help me or give me a<br>
hint.<br>
<br>
I have attached two images. The first one (HowItIsNow.jpg), shows the actual<br>
result. You can see that it seems, that there are not 256 colors.<br>
<br>
<a href="http://vtk.1045678.n5.nabble.com/file/n5607138/HowItIsNow.jpg" target="_blank">http://vtk.1045678.n5.nabble.com/file/n5607138/HowItIsNow.jpg</a><br>
<br>
The second one (HowIWouldLikeIt.jpg) shows the result, which I want to have.<br>
The two images are based on the same data, the second is a result in MATLAB<br>
the first in VTK. Maybe you can give me a hint how to get the image in VTK<br>
like the second image shown (done in Matlab).<br>
<br>
<a href="http://vtk.1045678.n5.nabble.com/file/n5607138/HowIWouldLikeIt.jpg" target="_blank">http://vtk.1045678.n5.nabble.com/file/n5607138/HowIWouldLikeIt.jpg</a><br>
<br>
My Pipeline is as follows:<br>
<br>
vtkImageData -&gt; filled via frequencyDataIma-&gt;GetScalarPointer() with<br>
unsigned char<br>
vtkLookupTable -&gt; 256 colors<br>
vtkResample -&gt; for resizing the image (make it bigger)<br>
vtkImageMapToColors -&gt; the lookuptable is applied to it and the<br>
resample-&gt;Output() is the Input for it<br>
vtkImageMapper -&gt; Input is the Output of the vtkImageMapToColors<br>
vtkActor2D -&gt; input is the mapper<br>
<br>
<br>
<br>
Greets<br>
<br>
Sandra<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Problem-with-vtkLookupTable-tp5607138p5607138.html" target="_blank">http://vtk.1045678.n5.nabble.com/Problem-with-vtkLookupTable-tp5607138p5607138.html</a><br>

Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br></div>