Page MenuHomePhabricator

"Smoothed polygon model" function doesnt work
Closed, ResolvedPublic

Description

Clicking on smoothed polygon model on a 3D interpolated segmentation
creates an empty surface node.

I saved the file and looked into:
<PolyData>

<Piece NumberOfPoints="0" 
       NumberOfVerts="0" 
       NumberOfLines="0" 
       NumberOfStrips="0" 
       NumberOfPolys="0">

-> The polydata is empty

Event Timeline

The error is the following

VTK-src/Filters/Core/vtkSmoothPolyDataFilter.cxx, line 213
vtkSmoothPolyDataFilter (0x7fffa80096b0): No data to smooth!

Creation of non-smoothed surfaces works fine. So the error is caused by the image smoothing ( for smooth model, the image is first filtered by a gaussian ). The filter very likely provides empty output, maybe data release/scope problems?

The problem occurs independently of the origin of the segmentation.

The threshold filter does not work as expected and the filter returns an zero image that leads to an empty surface.

The filter itself is used only to scale the intensity values from [0,1] to [0,100]. The more suitable filter for this is the vtkImageShiftScale. The fixes replaces the filter.

User hering has pushed new remote branch:

bug-18203-SmoothPolygonModelCreationFix

[24d9f9]: Merge branch 'bug-18203-SmoothPolygonModelCreationFix'

Merged commits:

2014-10-15 15:58:37 Jan Hering [3a52a9]
Fixing intensity scaling before smoothing

  • replacing somewhat unreliable Threshold filter by the more appropriate ShiftScaleFilter to expand intensities from 0,1 to 0,100