<div dir="ltr"><div><div>I tried to set different values of kernel size and erode/dilate values without seeing any difference in the output; also I added the Update() call and tried using he two filters separately, still no changes. <br>
<br></div>here&#39;s my code (I&#39;m using python):<br><br></div># imageReader is a vtkBMPReader<br><div><br># apply the dilate/erode filter to the image<br><br>erode = vtk.vtkImageDilateErode3D()<br>erode.SetInputConnection(imageReader.GetOutputPort())<br>
erode.SetErodeValue(3)<br>erode.SetKernelSize(5, 5, 1)<br>erode.ReleaseDataFlagOff()<br>erode.Update()<br><br>dilate = vtk.vtkImageDilateErode3D()<br>dilate.SetInputConnection(erode.GetOutputPort())<br>dilate.SetDilateValue(3)<br>
dilate.SetKernelSize(5, 5, 1)<br>dilate.ReleaseDataFlagOff()<br>dilate.Update()<br><br># create the actors one for the original image ad one for the <br># processed one<br>originalActor = vtk.vtkImageActor()<br>originalActor.GetMapper().SetInputConnection(imageReader.GetOutputPort())<br>
<br>processedActor = vtk.vtkImageActor()<br>processedActor.GetMapper().SetInputConnection(dilate.GetOutputPort())<br><br></div><div># rendering stuff...<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/11/27 Jon Haitz Legarreta <span dir="ltr">&lt;<a href="mailto:jhlegarreta@vicomtech.org" target="_blank">jhlegarreta@vicomtech.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div>Dear Elena,<br>another alternative would be to vary the kernel size to some extreme values so that you can really be aware of any changes.<br></div>Another possibility would be to use the erode/dilate filters separately.<br>

And yes, you are right, if you erode an object to the ground it cannot be dilated anymore however hard you try.<br><br></div>HTH,<br>JON HAITZ<div><div class="h5"><br><br><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">
On 27 November 2013 13:29, Marco Nawijn <span dir="ltr">&lt;<a href="mailto:nawijn@gmail.com" target="_blank">nawijn@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Elena,</div><div> </div><div>Although I probably cannot help you directly, I would advise you</div>

<div>isolate your problem to the smallest compilable piece of code</div><div>and post this so experts can take a look at it. One thing that</div>
<div>bit me in the past is that ones you apply a filter, you have to</div><div>a.) call Update() on it and b.) call GetOutput() to get the result</div><div>you are looking for. Without seeing your code however it is </div>


<div>difficult to judge.</div><div> </div><div>Kind regards,</div><div> </div><div>Marco</div><div> </div><div>P.S. There is nothing wrong with your english! </div><div> </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

<div><div>
On Wed, Nov 27, 2013 at 12:24 PM, elena bresciani <span dir="ltr">&lt;<a href="mailto:elena.bresciani87@gmail.com" target="_blank">elena.bresciani87@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div>
<div dir="ltr">I&#39;m getting started with vtk and I&#39;m still unable to solve a lot of<br>
problems.<br>
<br>
I&#39;m trying to apply the vtk filter vtkImageDilateErode3D to a CT image but I<br>
can&#39;t obtain the result I&#39;m looking for.<br>
In fact I expect the result to be a at least slightly different image but<br>
the output is instead an image identical to the one given as input (I even<br>
checked subtracting the two images with vtkImageMathematics and after the<br>
operation there&#39;s really nothing left!).<br>
I don&#39;t understand if the problem is in the setting of the Erode and Dilate<br>
values and in the kernel size or maybe in the function of the filter itself,<br>
i.e. I expect that the output image has something less compared to the<br>
original one after erosion and dilatation (what has been eroded &quot;to the<br>
ground&quot; canot be dilated back - is this correct?)<br>
<br>
Thank you in advance<br>
Sorry for the bad english<span><font color="#888888"><br>
<br>
Elena</font></span></div>
<br></div></div>_______________________________________________<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>
<br></blockquote></div><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://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div></div></div></div></div></div></div>
</blockquote></div><br></div>