<font color="#333333"><font size="4"><font face="arial,helvetica,sans-serif">Hi,</font></font></font><div><font color="#333333"><font size="4"><font face="arial,helvetica,sans-serif">You should resample the origin image to have a better image in higher resolution. I think with your currently solution, the quality of images on sagittal or coronal not good because the distance between two slices is too long.</font></font></font></div>

<div><font color="#333333"><font size="4"><font face="arial,helvetica,sans-serif"><br></font></font></font></div><div><font color="#333333"><font size="4"><font face="arial,helvetica,sans-serif"> You should use vtkImageResample to resample the image before displaying (this is also interpolate too). Here is an example code:</font></font></font></div>

<div><font color="#333333"><font size="4"><font face="arial,helvetica,sans-serif"><br></font></font></font></div><div><font color="#333333"><font size="4"><font face="arial,helvetica,sans-serif">        vtkSmartPointer&lt;vtkImageData&gt; OriginImageData; /** Your origin image  */</font></font></font></div>

<div><font color="#333333"><font size="4"><font face="arial,helvetica,sans-serif">        ...</font></font></font></div><div><font color="#333333"><font size="4"><font face="arial,helvetica,sans-serif"><br></font></font></font></div>

<div><font color="#333333"><font size="4"><font face="arial,helvetica,sans-serif"><div><span class="Apple-tab-span" style="white-space:pre">        </span>// Object for resampling</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkImageResample&gt; resample = vtkSmartPointer&lt;vtkImageResample&gt;::New();</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>resample-&gt;SetInput(OriginImageData);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>resample-&gt;SetInterpolationModeToLinear();<span class="Apple-tab-span" style="white-space:pre">        </span>// Set type of interpolation here if you need</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>resample-&gt;SetAxisMagnificationFactor(2, MagnificationZ); // ex. Change the resolution along OZ</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>resample-&gt;SetAxisMagnificationFactor(1, MagnificationY); // and OY</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>resample-&gt;SetAxisMagnificationFactor(0, MagnificationX);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>resample-&gt;Update();</div>

<div>        ....</div><div>       vtkSmartPointer&lt;vtkImageData&gt; ResampledImageData(resample-&gt;GetOutput());</div><div><br></div><div>After that, you can use ResampledImageData for further processing.</div><div><br>

</div><div>/Quang</div></font></font></font><br><div class="gmail_quote">2011/11/2 Hikaruchan <span dir="ltr">&lt;<a href="mailto:Sandra.Schroetter.fl@ait.ac.at">Sandra.Schroetter.fl@ait.ac.at</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi everybody!<br>
<br>
I have a little problem, which takes me nearly a week now to find a<br>
solution. I have an application with four renderviews where I display<br>
MRI-Data in three 2D Views (sagittal, coronal and axial) and one for a 3D<br>
View. That works fine.<br>
<br>
But now I have some electric density values which I want to visualize. The<br>
visualization itself is not the problem. The Problem is, that the points are<br>
arround 8-10 pixels away from each other (as I want them to visualize I put<br>
them into a vtkImageData), and I have tried to interpolate it, but the<br>
interpolation takes to much time. My last try which brought the best resulat<br>
was:<br>
<br>
1. load the electric density data<br>
2. put them into an imagedata and &quot;blow up&quot; the pixel which stands for the<br>
density value<br>
<br>
3. make a vtkImageGaussianSmooth with dimensionality 3 with<br>
standarddeviation (3,3,3)<br>
4. make a vtkImageMedian3D with kernelsize(5,5,5)<br>
<br>
I understand that that takes long, so I desiced to make it in 2D for every<br>
slice which works &quot;ok&quot;. But it is not effective enough. So my question is,<br>
is there a better way to interpolate the data in vtkImagedata? The reason<br>
why it must be effective is, that it is time critical, I have around half a<br>
second before I must interpolate the next electric density data.<br>
<br>
Do anybody know what is the way to do it right? I think what I have done, is<br>
far away from the best solution ;-) So I would be glad if somebody could<br>
help me and give me an idea for a better solution of the problem.<br>
<br>
Dear<br>
<span class="HOEnZb"><font color="#888888"><br>
Hikaruchan<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/how-to-interpolate-between-few-data-points-in-imagedata-tp4958600p4958600.html" target="_blank">http://vtk.1045678.n5.nabble.com/how-to-interpolate-between-few-data-points-in-imagedata-tp4958600p4958600.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>
</font></span></blockquote></div><br></div>