[vtkusers] vtkMultiThreshold Filter crashing on polyhedral cells
David Thompson
david.thompson at kitware.com
Tue Mar 27 00:13:28 EDT 2018
Hi Santosh,
The multithreshold filter was written before polyhedral cells were added to VTK and they changed the way connectivity is stored... so I am not surprised you have encountered a problem. Could you file a bug report? It would be great to have a simple polyhedral example dataset to test against, if you can provide one.
Thanks,
David
> On Mar 26, 2018, at 23:26, Santosh Biradar <scbiradar at gmail.com> wrote:
>
> Hi VTKers,
>
> I am trying to use the vtkMultiThreshold filter to threshold my data by different quantities.
> However, the filter seems to crash when the thresholded data contains polyhedral cells.
> If my thresholded data does not contain polyhedral cells the filter works correctly.
>
> Here is a Python code snippet where I am just trying to extract the cells which belong to the internal mesh (this contains polyhedral cells):
>
> reader = vtk.vtkXMLUnstructuredGridReader()
> reader.SetFileName(r"\path\to\mesh")
> reader.Update()
> ugrid = reader.GetOutput()
> # Setup the multithreshold filter
> mthreshold = vtk.vtkMultiThreshold()
> mthreshold.SetInputData(ugrid);
> components_2to7 = mthreshold.AddIntervalSet(2,7,vtk.vtkMultiThreshold.CLOSED,vtk.vtkMultiThreshold.CLOSED, vtk.vtkDataObject.FIELD_ASSOCIATION_CELLS, "component", 0, 0) # This works as the mesh does not have polyhedral cells in these regions
> component_1 = mthreshold.AddIntervalSet(1,1,vtk.vtkMultiThreshold.CLOSED,vtk.vtkMultiThreshold.CLOSED, vtk.vtkDataObject.FIELD_ASSOCIATION_CELLS, "component", 0, 0) # This FAILS as the mesh has polyhedral cells in this region
> mthreshold.OutputSet(bgroup_cells_0)
> mthreshold.Update(); #Crashes at this point for component_1 thresholding
> multhithresholdedPolydata = mthreshold.GetOutput();
> I'm wondering if it this is a bug in the filter.
> If I just use the vtkThreshold filter it works and I am able to extract the region containing the polyhedral cells
> I am running VTK-6.3.0 on Windows
> Thanks,
> Santosh
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180327/cf200620/attachment.html>
More information about the vtkusers
mailing list