<div dir="ltr">I ma creating the polydat per conoutr like this<br><br><span style="color:#c0c0c0"> </span>vtkSmartPointer<span style="color:#000000"><</span>vtkPolyData<span style="color:#000000">></span>polydataContour<span style="color:#000000">=</span>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>vtkSmartPointer<span style="color:#000000"><</span>vtkPolyData<span style="color:#000000">>::</span>New<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"></span>polydataContour<span style="color:#000000">-></span>Initialize<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"></span>polydataContour<span style="color:#000000">-></span>SetPolys<span style="color:#000000">(</span><span style="color:#c0c0c0"> </span>cells<span style="color:#c0c0c0"> </span><span style="color:#000000">);</span><span style="color:#c0c0c0">//vtkCellArray<br>
</span>polydataContour<span style="color:#000000">-></span>SetPoints<span style="color:#000000">(</span><span style="color:#c0c0c0"> </span>points<span style="color:#c0c0c0"></span><span style="color:#000000">);</span>//vtkPoints<br>
<br>How should I do that?<br><br>Thanks very much<br><br>Jothy<br></pre><br><div class="gmail_quote">On Tue, Mar 6, 2012 at 3:31 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The contours must be polylines, not polygons, or it won't work.<br>
<div><div></div><div class="h5"><br>
On Tue, Mar 6, 2012 at 6:29 AM, Jothybasu Selvaraj <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>> wrote:<br>
> Yes, I have one contour for each z slice as a vtkPolyData. I will try<br>
> removing that.<br>
><br>
> Thanks<br>
><br>
><br>
> On Tue, Mar 6, 2012 at 1:26 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>><br>
>> Do you have one contour for each Z slice? If so, then try removing<br>
>> the Extrude filter from your pipeline.<br>
>><br>
>><br>
>> On Tue, Mar 6, 2012 at 2:51 AM, Jothybasu Selvaraj <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>><br>
>> wrote:<br>
>> > Another point here,<br>
>> ><br>
>> > I am creating a vtkPolyData for each contour and then adding it to the<br>
>> > vtkAppendPolydataFilter, then the output of vtkAppenPolydataFilter is<br>
>> > set as<br>
>> > input to vtkPolydataToImageStencil.<br>
>> ><br>
>> > Could this make any difference?<br>
>> ><br>
>> > Thanks<br>
>> ><br>
>> > Jothy<br>
>> ><br>
>> ><br>
>> > On Mon, Mar 5, 2012 at 7:49 PM, Jothybasu Selvaraj <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> No, it doesn't fix the problem.<br>
>> >><br>
>> >> But it seems to work fine for contours with z-spacing in steps of 1mm.<br>
>> >><br>
>> >> It is working well for a dataset with 3mm spacing but fails for 2.5 mm.<br>
>> >><br>
>> >> Maybe I need to test it thoroughly. Can I use those cxx and .h from 5.6<br>
>> >> in<br>
>> >> 5.8, that would be a easy workaround.<br>
>> >><br>
>> >> Thanks<br>
>> >><br>
>> >> Jothy<br>
>> >><br>
>> >><br>
>> >> On Mon, Mar 5, 2012 at 4:01 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>><br>
>> >> wrote:<br>
>> >>><br>
>> >>> Hi Jothy,<br>
>> >>><br>
>> >>> It underwent significant changes, but the only change I can think<br>
>> >>> of that might have affected your pipeline is the way that it does<br>
>> >>> rounding, it used to use a Floor() method that provided a small<br>
>> >>> tolerance even if you did SetTolerance(0). Try calling<br>
>> >>> SetTolerance(1e-6) on your PolyDataToImageStencil object, it<br>
>> >>> might help.<br>
>> >>><br>
>> >>> - David<br>
>> >>><br>
>> >>> On Mon, Mar 5, 2012 at 3:17 AM, Jothybasu Selvaraj<br>
>> >>> <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>><br>
>> >>> wrote:<br>
>> >>> > Hi all,<br>
>> >>> ><br>
>> >>> > I was able to create a mesh using the following pipeline in 5.6 and<br>
>> >>> > it<br>
>> >>> > worked well<br>
>> >>> ><br>
>> >>> ><br>
>> >>> ><br>
>> >>> > vtkPolyDataToImageStencil->vtkLinearExtrusionFilter->vtkImageStencil->vtkDiscreteMarchingCubes<br>
>> >>> ><br>
>> >>> > Now, I have updated vtk to 5.8 and I am getting gaps in the mesh<br>
>> >>> > along<br>
>> >>> > the z<br>
>> >>> > axis. I am really puzzled, I have tried with different data sets as<br>
>> >>> > well.<br>
>> >>> ><br>
>> >>> > I have read somewhere that vtkPolyDataToImageStencil had some<br>
>> >>> > changes<br>
>> >>> > in<br>
>> >>> > 5.8, does it has anything to do with this problem, or am I doing<br>
>> >>> > anything wrong?<br>
>> >>> ><br>
>> >>> > I have contours of constant z-spacing.<br>
>> >>> ><br>
>> >>> > Any hints?<br>
>> >>> ><br>
>> >>> > Thanks<br>
>> >>> ><br>
>> >>> > --<br>
>> >>> > Jothy<br>
>> >><br>
>> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> Jothy<br>
>> >><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > Jothy<br>
>> ><br>
><br>
><br>
><br>
><br>
> --<br>
> Jothy<br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Jothy<br></div><br>
</div>