[vtkusers] Possibly found a bug in vtkImplicitModeller.cxx

Bill Lorensen bill.lorensen at gmail.com
Wed Jul 11 08:10:31 EDT 2012


MaximumDistance is clamped to be within 0 and 1.

On Wed, Jul 11, 2012 at 8:07 AM, Jothybasu Selvaraj <jothybasu at gmail.com>wrote:

> So, for instance what does 10.0 mean?
>
> Is it multiplication of the bounds of vtkPolyData?
>
> with bounds [-5,5,-5,5,-5,5] the operation will be applied in
> [-50,50,-50,50,-50,50]
>
> Thanks
>
> Jothy
>
> On Wed, Jul 11, 2012 at 1:03 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:
>
>> MaximumDistance is a percentage, not an absolute distance. The
>> documentation is not clear about this.
>>
>>
>> On Wed, Jul 11, 2012 at 3:45 AM, Roman Grothausmann <
>> roman.grothausmann at helmholtz-berlin.de> wrote:
>>
>>> 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
>>>
>>>
>>> ______________________________**_________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at http://www.kitware.com/**
>>> opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_**FAQ <http://www.vtk.org/Wiki/VTK_FAQ>
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/**listinfo/vtkusers<http://www.vtk.org/mailman/listinfo/vtkusers>
>>>
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
>
> --
> Jothybasu Selvaraj
> PhD Student
> University of Liverpool
> UK
>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120711/7a708f1e/attachment.htm>


More information about the vtkusers mailing list