On Tue, Nov 30, 2010 at 7:10 AM, endlosschleife1 <span dir="ltr"><<a href="mailto:endlosschleife1@googlemail.com">endlosschleife1@googlemail.com</a>></span> wrote:<div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div class="im">
</div><div>I was actually looking for accelerated scaling, so this sounds like vtkActor2D is not be the right thing for that.</div></div></blockquote><div><br></div><div>For accelerated scaling, you need to use vtkImageActor. </div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div>I'm not sure, but it looks like my implementation probably doesn't use any GPU acceleration (it seems to be pure image data filtering). It still seemed to be not as performant as I expected (compared to an implementation where I only used VTK for the imaging pipeline, but did the LUT application and visualization separetely).</div>
</div></blockquote><div><br></div><div>The vtkImageMapper doesn't have accelerated window/level either. It does all the computations on the CPU and then uses glDrawPixels() to render the image.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote">
<div>I create a vtkWindowLevelTable, set the window and center, and then call build on the lut. Then I used it with a vtkImageMapToColors instance:</div>
<div> </div>
<div>vtkImageMapToColors *color = vtkImageMapToColors::New();</div>
<div>color->SetLookupTable(lut); // lut is the vtkWindowLevelTable</div>
<div>color->SetInput(...) // some vtkImageData</div></div></blockquote><div><br></div><div>Yes, that looks typical. Make sure that you call table->SetRampToLinear() because by default, a VTK lookup table uses a curved ramp instead of a linear ramp (I was shocked when I discovered this for the first time).</div>
<div><br></div><div> David</div></div><br></div>