MantisBT - ParaView
View Issue Details
0012840ParaView(No Category)public2012-01-05 03:232016-08-12 09:59
Arno Mayrhofer 
Kitware Robot 
normalminorhave not tried
closedmoved 
3.12 
 
TBD
incorrect functionality
0012840: Threshold filter lowers precision of Points data
How to reproduce:

1.) Open a file that stores positions in double precision.
2.) Apply Threshold filter
3.) Look at point data in spreadsheet view

Before the point data in spreadsheet view was double precision, after applying the filter the point data is only in single precision.

I'm not a 100% sure but can this be related to line 40 in VTK/Graphics/vtkThreshold.cxx which reads
this->PointsDataType = VTK_FLOAT;
No tags attached.
Issue History
2012-01-05 03:23Arno MayrhoferNew Issue
2012-01-05 03:38Arno MayrhoferNote Added: 0027900
2012-01-05 13:51Robert MaynardNote Added: 0027901
2012-01-06 02:12Arno MayrhoferNote Added: 0027904
2012-01-27 14:44yifei wuNote Added: 0027994
2016-08-12 09:59Kitware RobotNote Added: 0038120
2016-08-12 09:59Kitware RobotStatusbacklog => closed
2016-08-12 09:59Kitware RobotResolutionopen => moved
2016-08-12 09:59Kitware RobotAssigned To => Kitware Robot

Notes
(0027900)
Arno Mayrhofer   
2012-01-05 03:38   
I can confirm that changing VTK/Graphics/vtkThreshold.cxx:40 from
this->PointsDataType = VTK_FLOAT;
to
this->PointsDataType = VTK_DOUBLE;
fixes the issue. It would be nice if this could be included in the next release.
(0027901)
Robert Maynard   
2012-01-05 13:51   
I would expect the correct solution is that by default the threshold points inherit the data type of the input DataSet.
(0027904)
Arno Mayrhofer   
2012-01-06 02:12   
Yeah you are right. I didn't know how to do this though and unfortunately lack the time to look into it any deeper.
(0027994)
yifei wu   
2012-01-27 14:44   
Arno, the code you changed is the default constructor. I believe in order to get it for double, you have to manually invoke

// Description:
  // Set the data type of the output points (See the data types defined in
  // vtkType.h). The default data type is float.
  void SetPointsDataTypeToDouble() { this->SetPointsDataType( VTK_DOUBLE ); }
  void SetPointsDataTypeToFloat() { this->SetPointsDataType( VTK_FLOAT ); }


Is there a method to id the datatype? If so, we can probably automatically overwrite the default.
(0038120)
Kitware Robot   
2016-08-12 09:59   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current ParaView Issues page linked in the banner at the top of this page.