[vtkusers] Possibly found a bug in vtkImplicitModeller.cxx
Roman Grothausmann
roman.grothausmann at helmholtz-berlin.de
Wed Jul 11 03:45:37 EDT 2012
Dear mailing list members,
Could it be that in vtkImplicitModeller.cxx there is a bug that causes
the maximum distance (that is calculated and saved in the image) to be
bigger than specified with SetMaximumDistance()?
From the description of the filter and its parameters and also from the
comments in the source I would expect that the output stored in 32-bit
real does not contain values above SetMaximumDistance() except for the
"background" value.
Having checked the source it seems to me that the squared distance was
always very carefully assigned to a variable name ending with 2 (e.g.
maxDistance2). However at line 967 there is a *= assignment (see patch
below). Removing the '*', the output image of the filter then fulfils my
expectations mentioned above.
Could the '*' be a bug?
--- VTK_orig/Hybrid/vtkImplicitModeller.cxx 2012-05-12
13:59:27.000000000 +0200
+++ VTK/Hybrid/vtkImplicitModeller.cxx 2012-07-10 16:22:21.060066823 +0200
@@ -967,7 +967,7 @@
}
}
- maxDist *= this->MaximumDistance;
+ maxDist = this->MaximumDistance;
// Set volume origin and data spacing
output->SetOrigin(this->ModelBounds[0],
Happy coding
Roman
--
Dr. Roman Grothausmann
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Bereich Funktionale Materialien
Institut für angewandte Materialforschung
Hahn-Meitner-Platz 1
D-14109 Berlin
(früher Hahn-Meitner-Institut und BESSY)
Tel.: +49-(0)30-8062-42816
Fax.: +49-(0)30-8062-43059
Vorsitzender des Aufsichtsrats: Prof. Dr. Dr. h.c. mult. Joachim Treusch
Stellvertretende Vorsitzende: Dr. Beatrix Vierkorn-Rudolph
Geschäftsführer: Prof. Dr. Anke Rita Kaysser-Pyzalla, Dr. Ulrich Breuer
Sitz der Gesellschaft: Berlin
Handelsregister: AG Charlottenburg, 89 HRB 5583
More information about the vtkusers
mailing list