InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.41k stars 664 forks source link

itkCleanQuadEdgeMeshFilter: writes invalid cell data / deletes point and cell data #3453

Open crossmanith opened 2 years ago

crossmanith commented 2 years ago

Description

Filter cleans points and cells but does not update point ids for cell vertices. Furthermore it removes point and cell data from input mesh.

Steps to Reproduce

  1. download MWE MWE_CleanQuadEdgeMeshFilter.tar.gz and unpack it
  2. compile MWE
  3. execute "./itkCleanTest cube.vtk cube_out.vtk 0.01"
  4. open cube_out.vtk in any editor

Expected behavior

Point ids for cells should be replaced with new ids If e.g. point 0, 1 and 2 are removed by itkCleanQuadEdgeMeshFilter, then point 3 becomes new point 0. That means a cell 3 3 4 5 (3 being the number of vertices in polygon - here a triangle cell) should become 3 0 1 2 Point and cell data should not be removed.

Actual behavior

Point ids for cells keep their original value. Point and cell data are removed.

Reproducibility

100%

Versions

f5805bca32

Environment

linux (5.13.0-44-generic) cmake version 3.16.3 g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

Additional Information

none

PranjalSahu commented 2 years ago

This I think is by design. Similar results will be seen when using vtkPolyDataConnectivityFilter for triangle meshes.