[vtkusers] vtkAppendFilter with double precision points (UNCLASSIFIED)

Berk Geveci berk.geveci at kitware.com
Thu Dec 10 20:16:19 EST 2009


> 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 cc'ed vtk-developers since this may be relevant to other developers as
well.

-berk

On Thu, Dec 10, 2009 at 3:29 PM, Dominik Szczerba <dominik at itis.ethz.ch> 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.
>
> My workaround is to maintain vtkAppendFilter2 (with an appropriate function
> to set the precision) under vtkmy structure.
>
> Once again, if interest, I can contribute a few patches.
>
> Dominik
>
> Leiter, Kenneth (Cont, ARL/CISD) wrote:
>>
>>
>> Classification:  * UNCLASSIFIED* **
>> Caveats: NONE
>>
>> Hello all,
>>
>> I am reading an exodus II file into vtk using the vtkExodusIIReader and am
>> converting the resulting vtkMultiBlockDataSet to a vtkUnstructuredGrid for
>> further processing.  I am using a vtkAppendFilter to get from the
>> vtkMultiBlockDataSet to a vtkUnstructuredGrid.
>>
>> However, I am losing precision for the point values after running through
>> the vtkAppendFilter.  I have verified that the points are double precision
>> before entering the filter and single precision afterwards.  I am not
>> surprised that I lose precision as it looks like a new vtkPoints (default =
>> single precision) is allocated in the vtkAppendFilter class and there
>> appears to be no way to change this behavior.
>>
>> Does anyone have a workaround or another way to accomplish what I need to
>> do?  It was difficult enough to get the vtkExodusIIReader to read in double
>> precision points without converting them to floats!
>>
>> Thanks,
>> Ken
>>
>> ---------------------------------------------------------
>> Kenneth Leiter
>> Scientific Visualization Team
>> Lockheed Martin / ARL DoD Supercomputing Resource Center
>>
>>  Classification:  * UNCLASSIFIED * **
>> Caveats: NONE
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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