[vtkusers] vtkAppendFilter with double precision points (UNCLASSIFIED)
David Gobbi
david.gobbi at gmail.com
Fri Dec 11 08:23:41 EST 2009
On Fri, Dec 11, 2009 at 1:24 AM, Dominik Szczerba <dominik at itis.ethz.ch> wrote:
> Berk Geveci wrote:
>>>
>>> Single precision is hard coded - and is so in many filters. I have long
>>> argued to let the user specify the type, but nobody seemed interested
>>> even
>>> in my patches.
>>
>> You probably caught us in a time we were very busy (which is pretty
>> much always). Such patches would be of interest. However, I would argue
>> that instead of asking the user, the append filter should pick an
>> appropriate
>> precision. For example, if at least one of the inputs is double, it should
>> probably produce double as well. I would argue the same for most filters
>> except those that produce new arrays independent of their input arrays.
>
> I am not at this level of sophistication in my changes... just setting the
> precision by hand as desired. As to an automated choice, I would say there
> might be situations where you still want float, even if the input is double.
> Therefore I think a manual solution is most universal and easiest to add
> with smallest risk of introducing new bugs (let's keep the hardcoded float
> as default). Just drop me a line if my effort would make sense and I will
> submit some patches to the tracker.
If the code hardcodes to float, even on a double input, then the code
is broken and needs to be fixed. A manual override is fine, but the
first priority should be to fix the default behavior. Just my 2
cents.
The filters should follow C type coercion rules, as Berk proposed.
David
More information about the vtkusers
mailing list