[vtkusers] Problem with vtkPolyDataToImageStencil in 5.8

David Gobbi david.gobbi at gmail.com
Tue Mar 6 08:26:59 EST 2012


Do you have one contour for each Z slice?  If so, then try removing
the Extrude filter from your pipeline.


On Tue, Mar 6, 2012 at 2:51 AM, Jothybasu Selvaraj <jothybasu at gmail.com> wrote:
> Another point here,
>
> I am creating a vtkPolyData for each contour and then adding it to the
> vtkAppendPolydataFilter, then the output of vtkAppenPolydataFilter is set as
> input to vtkPolydataToImageStencil.
>
> Could this make any difference?
>
> Thanks
>
> Jothy
>
>
> On Mon, Mar 5, 2012 at 7:49 PM, Jothybasu Selvaraj <jothybasu at gmail.com>
> wrote:
>>
>> No, it doesn't fix the problem.
>>
>> But it seems to work fine for contours with z-spacing in steps of 1mm.
>>
>> It is working well for a dataset with 3mm spacing but fails for 2.5 mm.
>>
>> Maybe I need to test it thoroughly. Can I use those cxx and .h from 5.6 in
>> 5.8, that would be a easy workaround.
>>
>> Thanks
>>
>> Jothy
>>
>>
>> On Mon, Mar 5, 2012 at 4:01 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>>
>>> Hi Jothy,
>>>
>>> It underwent significant changes, but the only change I can think
>>> of that might have affected your pipeline is the way that it does
>>> rounding, it used to use a Floor() method that provided a small
>>> tolerance even if you did SetTolerance(0).  Try calling
>>> SetTolerance(1e-6) on your PolyDataToImageStencil object, it
>>> might help.
>>>
>>>  - David
>>>
>>> On Mon, Mar 5, 2012 at 3:17 AM, Jothybasu Selvaraj <jothybasu at gmail.com>
>>> wrote:
>>> > Hi all,
>>> >
>>> > I was able to create a mesh using the following pipeline in 5.6 and it
>>> > worked well
>>> >
>>> >
>>> > vtkPolyDataToImageStencil->vtkLinearExtrusionFilter->vtkImageStencil->vtkDiscreteMarchingCubes
>>> >
>>> > Now, I have updated vtk to 5.8 and I am getting gaps in the mesh along
>>> > the z
>>> > axis. I am really puzzled, I have tried with different data sets as
>>> > well.
>>> >
>>> > I have read somewhere that vtkPolyDataToImageStencil had some changes
>>> > in
>>> > 5.8, does it has anything to do with this problem, or am I doing
>>> > anything wrong?
>>> >
>>> > I have contours of constant z-spacing.
>>> >
>>> > Any hints?
>>> >
>>> > Thanks
>>> >
>>> > --
>>> > Jothy
>>
>>
>>
>>
>> --
>> Jothy
>>
>
>
>
> --
> Jothy
>



More information about the vtkusers mailing list