[vtkusers] Double precision in VTK

Berk Geveci berk.geveci at kitware.com
Thu Apr 22 21:01:20 EDT 2010


That makes sense. Would you mind submitting feature requests at
vtk.org/Bug? Thanks.

-berk

On Sun, Apr 18, 2010 at 2:35 PM, egk865 at yahoo.com <egk865 at yahoo.com> wrote:
> Thanks! Looking forward to it. One class I noticed that has a
> vtkFloatArray hard coded into it is vtkPolyDataNormals. The normals
> are computed as float even if the original vertices are double (besides
> the vertices themselves which get truncated to float from double in
> the output). I can't think of a reason why the algorithm would be
> limited in precision if the vertices are in double, so I would think a
> check should be done such that if the vertices are in double, the
> normals are computed as double and float otherwise. This should apply
> as well to other filters that generate point or cell attribute
> data such as vtkTransformPolyDataFilter.
>
> Also for source filters such as vtkSphereSource which don't have
> inputs, I think there should be a way to specify the data type of the
> output.
>
> Thanks again,
> Eli
>
>
>
>> Date: Fri, 16 Apr 2010 20:12:12 -0400
>> From: Berk Geveci <berk.geveci at kitware.com>
>> Subject: Re: [vtkusers] Double precision in VTK
>> To: "egk865 at yahoo.com"
>> <egk865 at yahoo.com>
>> Cc: vtkusers at vtk.org
>> Message-ID:
>>     <l2j45d654b1004161712n54293807gd6d53004ca90dcb at mail.gmail.com>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> We are slowly moving towards preserving the native type of
>> the input.
>> There are some filters that are internally templated for
>> this purpose.
>> If you see ones that you think should be double precision,
>> please
>> report them. Note that not all filters need to produce
>> double
>> precision data. If an algorithm is inherently limited in
>> precision, it
>> is best to use floating point for performance reasons.
>>
>> -berk
>>
>> On Thu, Apr 15, 2010 at 10:55 AM, egk865 at yahoo.com
>> <egk865 at yahoo.com>
>> wrote:
>> > Are there any plans to support double precision in VTK
>> anytime soon?
>> > It seems that much of VTK is optimized primarily for
>> > single floating point precision with many filters
>> hardcoded to output
>> > data in single precision even when the input to them
>> is in double
>> > precision.
>> >
>> > One possible reason I can see why vtk may have been
>> written
>> > primarily with single precision in mind is that most
>> modern
>> > graphics cards are optimized for single precision and
>> internally
>> > store the data in single precision. However, not all
>> applications
>> > need to write to the graphics card and the ability for
>> VTK to work
>> > well with double precision data would be very useful
>> especially for
>> > science and research applications where accuracy is
>> important.
>> >
>> > Thanks,
>> > Eli
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > 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
>> >
>
>
>
>
>
>
>
>
> _______________________________________________
> 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
>



More information about the vtkusers mailing list