<div dir="ltr">For resampling images, there's also vtkImageResize, which<div>is much faster if you need to interpolate while resampling:<br><div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ResizeImage">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ResizeImage</a><br></div><div><br></div><div>It provides three choices for choosing the output sampling:</div><div>1) SetResizeMethodToOutputSpacing() allows you directly select<br></div><div>the sample spacing (in physical units)</div><div>2) SetResizeMethodToMagnificationFactors() allows you to select</div><div>a factor by which to resample</div><div>3) SetResizeMethodToOutputDimensions() allows you to choose</div><div>the size of the output grid</div><div><br></div><div>The main advantage of this filter is that it is O(n) with respect to the</div></div><div>interpolation kernel size, whereas vtkImageResample is O(n^3). Of</div><div>course, for nearest-neighbor interpolation (e.g. decimation) it makes</div><div>no difference, but for sinc interpolation (n=6 or higher) it makes a huge</div><div>difference.</div><div><br></div><div>For completeness, there is also vtkImageShrink3D for simple image</div><div>decimation.</div><div><br></div><div> - David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 13, 2014 at 9:58 AM, Berk Geveci <span dir="ltr"><<a href="mailto:berk.geveci@kitware.com" target="_blank">berk.geveci@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">We are still working on this.<div><br></div><div>Meanwhile, you can use vtkImageResample.</div><div><br></div><div>Best,</div><div>-berk</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 12, 2014 at 11:01 AM, Karsten Tausche <span dir="ltr"><<a href="mailto:karsten.tausche@student.hpi.uni-potsdam.de" target="_blank">karsten.tausche@student.hpi.uni-potsdam.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
any news about that topic?<br>
I need to change the sampling rate of an image dynamically. Are
there any other ways to achieve this?<br>
<br>
Best regards,<br>
Karsten<div><div><br>
<br>
<div>On 2014-10-13 16:16, Berk Geveci wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">We completely rewrote vtkExtractVOI a few months
ago and it doesn't look like we didn't do a great job in fully
evaluating it. I will spend some quality time with it in the
next few weeks.
<div><br>
</div>
<div>Best,</div>
<div>-berk</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Oct 12, 2014 at 2:06 PM,
Karsten Tausche <span dir="ltr"><<a href="mailto:karsten.tausche@student.hpi.uni-potsdam.de" target="_blank">karsten.tausche@student.hpi.uni-potsdam.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> I just realized that
calling SetUpdateExtentToWholeExtent() on a downstream
algorithm (polyData in the example code) "fixes" this
error.
<div>
<div><br>
<br>
<div>On 2014-10-11 14:10, Karsten Tausche wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div>Hi everyone, <br>
<br>
I tried to use vtkExtractVOI to decrease the
resolution of a vtkImageData/vtkStructuredPoints
data set. This works fine when I set the sample rate
before I connect the filter to the pipeline. But
changing the sample rate while rendering always
results in an error like this: <br>
<br>
"ERROR: In
..\..\..\Common\ExecutionModel\vtkStreamingDemandDrivenPipeline.cxx,
line 857 <br>
vtkCompositeDataPipeline (0000000005D6E1A0): The
update extent specified in the information for
output port 0 on algorithm
vtkExtractVOI(0000000005D92710) is 0 10 0 10 0 0,
which is outside the whole extent 0 9 0 10 0 0." <br>
<br>
This behavior also depends on the initial sample
rate. With the defaults (1, 1, 1), the error message
pops up after changing the rate, and the filter
seems produce the expected result. When I set
different initial values and increase them while
rendering, I get the error message above, but the
filter result seems correct. When decreasing the
sample rate, I don't get an error, but the filter
decreases the size of the rendered image. <br>
<br>
I'm using the current VTK master. I appended a small
example the produces this error; it doesn't render
any visible points but I didn't know how to enforce
the required updates without adding the filter to a
rendering pipeline. <br>
<br>
BTW the error also occurs with
vtkStructuredGrid+vtkExtractGrid. <br>
<br>
Thanks, <br>
Karsten <br>
<br>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>
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>
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>
Follow this link to subscribe/unsubscribe:
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a>
</pre>
</blockquote>
<br>
</div>
<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://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>
</div></div><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://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>