[Paraview] CellCenters filter produces non-deterministic result

Andy Bauer andy.bauer at kitware.com
Thu Mar 9 14:17:40 EST 2017


You can try doing the following in the GUI's Python shell (starting out
with the reader as the active source):
ii = ImageDataToUniformGrid()
ii.SelectInputScalars = ['CELLS', 'vtkGhostType']
Show()
Render()

This still shows the ghost cells but if you do operations like slice or cut
it will not include these cells. Note that the ImageDataToUniformGrid
filter has an option to Reverse whether zero/non-zero is to be interpreted
as a blanked cell.






On Wed, Mar 8, 2017 at 9:20 AM, David Doria <daviddoria at gmail.com> wrote:

> On Tue, Mar 7, 2017 at 8:10 PM, Andy Bauer <andy.bauer at kitware.com> wrote:
>
>> Hi David,
>>
>> I'm not sure how it works with structured grids but with vtkUniformGrids
>> (i.e. vtkImageData with blanking) the VTK readers and writers really just
>> produce vtkImageData and the blanking is ignored. It may be the same with
>> the XML structured grid files. My suggestion would be to look at the
>> vtkImageDataToUniformGrid class in VTK and try doing a similar thing in
>> ParaView using the Python Programmable filter.
>>
>> Cheers,
>> Andy
>>
>> On Tue, Mar 7, 2017 at 10:22 AM, David Doria <daviddoria at gmail.com>
>> wrote:
>>
>>> On Mon, Mar 6, 2017 at 11:14 AM, Andy Bauer <andy.bauer at kitware.com>
>>> wrote:
>>>
>>>> Thanks for the bug report!
>>>>
>>>> I think the stackoverflow issue is probably also related to blanking. I
>>>> added to your bug report with two other (likely) related issues.
>>>>
>>>> As a side note, I think if blanking was used instead of ghost cells
>>>> this may work properly.
>>>>
>>>> Thanks,
>>>> Andy
>>>>
>>>> On Mon, Mar 6, 2017 at 8:45 AM, David Doria <daviddoria at gmail.com>
>>>> wrote:
>>>>
>>>>> On Sun, Mar 5, 2017 at 7:05 PM, Andy Bauer <andy.bauer at kitware.com>
>>>>> wrote:
>>>>>
>>>>>> Hi David,
>>>>>>
>>>>>> This looks like it has to do with blanking (i.e. in PV 5.2 if I don't
>>>>>> load the vtkGhostType array it has the proper bounds). Would you mind
>>>>>> putting in a bug report on Gitlab (https://gitlab.kitware.com/pa
>>>>>> raview/paraview)?
>>>>>>
>>>>>> Thanks,
>>>>>> Andy
>>>>>>
>>>>>
>>>>> Done:
>>>>> https://gitlab.kitware.com/paraview/paraview/issues/17244
>>>>>
>>>>> Here is another presumed bug that seems to also have to do with
>>>>> blanking: http://stackoverflow.com/questions/42543340/cell-l
>>>>> abels-in-selection-display-inspector-dont-work-when-any-cell
>>>>> s-are-ghosted - not trying to pollute this thread but do you think
>>>>> that behavior could be helpful to understand the Cell Centers issue?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> David
>>>>>
>>>>
>>>>
>>> Hi Andy,
>>>
>>> The file was created with something like this:
>>>
>>> https://gist.github.com/daviddoria/8bf981aa593b7cefcd9114588e4766db
>>>
>>> Does calling
>>>
>>> structuredGrid->BlankPoint(0);
>>>
>>> not count as "using blanking"? Can you point me to the "right way" to do
>>> this if this is not the current best practice?
>>>
>>> Thanks!
>>>
>>> David
>>>
>>
>>
> I created a uniform grid:
>
> https://gist.github.com/daviddoria/99fa99c52aa07ee78b7e7412e74d592f
> https://drive.google.com/open?id=0B8yIfGqnlfSoNTNKWWtua1pEUTA
>
> Using the vtkXMLImageDataWriter seemed to write the same type of
> vtkGhostType array (shown in the cell data in Paraview), but Paraview
> doesn't seem to respect the blanking - all 8 voxels are drawn.
>
> Any other ideas?
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170309/8cad37b0/attachment.html>


More information about the ParaView mailing list