View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004212VTK(No Category)public2006-12-15 07:532016-08-12 09:54
ReporterMichael Knopke 
Assigned ToWill Schroeder 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0004212: vtkImageMarchingCubes produces division by zero errors
Descriptionwhen using this class to create isosurfaces from volume data the class will produce "division by zero" errors on certain threshold values (e.g. 1068). This also seems to be related to the used dataset, since this only happens with some datasets. However using vtkMarchingCubes does not produce those errors when used with the same datasets and pipeline. (datasets are unsigned char arrays)
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0011958)
Andy Turner (reporter)
2008-05-16 07:25

Hi, I came across this issue today in the guise of NaNs in the normal data. I came up with this quick fix (on the CVS version):-

diff -r1.1 vtkImageMarchingCubes.cxx
479,482c479,486
< temp = -1.0 / sqrt(g[0]*g[0] + g[1]*g[1] + g[2]*g[2]);
< g[0] *= temp;
< g[1] *= temp;
< g[2] *= temp;
---
> temp = sqrt(g[0]*g[0] + g[1]*g[1] + g[2]*g[2]);
> if ( temp != 0 )
> {
> temp = -1.0 / temp;
> g[0] *= temp;
> g[1] *= temp;
> g[2] *= temp;
> }

I wonder whether it would in fact be better to do this with vtkMath::normalize?
(0036897)
Kitware Robot (administrator)
2016-08-12 09:54

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2008-05-16 07:25 Andy Turner Note Added: 0011958
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:54 Kitware Robot Note Added: 0036897
2016-08-12 09:54 Kitware Robot Status expired => closed
2016-08-12 09:54 Kitware Robot Resolution open => moved


Copyright © 2000 - 2018 MantisBT Team