I was recently testing vtkFlyingEdges3D in replacement of vtkContourFilter and didn’t really notice that much of a difference in terms of performance, just to give an idea of the result of the task I was carrying out. The latter (vtkContourFilter) ran at about 1.08s whereas vtkFlyingEdges3D executed the same task at about 0.94s.
From what I understand Flying edges is expected to outperform other filters/algorithm in my this vtkContourFilter significantly, is there some necessary steps / setup that needs to be done in other to get the best out of Flying Edge.
note: It may be worth mentioning that the project am working on has always been making use of vtkContourFilter and all I had done was simply changing it to use vtkFlyingEdges (no extra change(s) were made).
See the filter’s documentation for explanation:
This class has been threaded with vtkSMPTools. Using TBB or other non-sequential type (set in the CMake variable VTK_SMP_IMPLEMENTATION_TYPE) may improve performance significantly.
My apologies, I forgot to mention that I actually testing both classes with TBB (I built VTK with VTK_SMP_IMPLEMENTATION_TYPE in CMake set to TBB, all required paths set and libraries added) I didn’t notice any performance difference. I’ve used TBB recently and seen improvements back then, I was just wondering if there was something specific to vtkFlyingEdges that I’m missing or maybe there’s something else I botched along the way.
What hardware and operating system do you use? What are the dimensions and scalar type of the input image? How many points and cells are in the output polydata?
How does the performance compares to marching cubes?
Can you also give us an insight of the size of the contour compared to the size of the data set ?
From what I understand, vtkContourFilter uses marching cube.
Hardware: iMac (3.5GHz, 8-Core, Intel Core i9)
OS: macOS 10.15.6 (Catalina)
For both cases of (vtkContourFilter & vtkFlyingEdges3D)
Input image (dimension): 180 x 256 x 256
Input image (Scalar type): int16_t
note: I filter the poly data through a stripper as a last step, this might explain why the cells are 0 (as I only work with strips). The result of the final output poly data is as follows
Output info - vtkContourFilter
number of cells - 0
number of strips - 71390
number of points - 211880
Output info - vtkFlyingEdges3D
number of cells - 0
number of strips - 72966
number of points - 217790
Can you make any sense of this?
I don’t quite understand what you mean by size of contour, does my reply above suffice?