MantisBT - VTK
View Issue Details
0006866VTK(No Category)public2008-04-22 00:542013-04-05 20:24
amaclean 
David Partyka 
normalmajoralways
closedfixed 
 
 
0006866: There is a copy/pase error in vtkParticlereader.cxx
In
int vtkParticleReader::ProduceOutputFromBinaryFileDouble(vtkInformationVector *outputVector)

starting at line 640 the code should be changed to read:

  vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
  points->SetDataTypeToDouble();
  points->SetNumberOfPoints(length);
  vtkSmartPointer<vtkDoubleArray> array = vtkSmartPointer<vtkDoubleArray>::New();
  array->SetName("Scalar");
  vtkSmartPointer<vtkCellArray> verts = vtkSmartPointer<vtkCellArray>::New();
  
  // Each cell will have 1000 points. Leave a little extra space just in case.
  // We break up the cell this way so that the render will check for aborts
  // at a reasonable rate.
  verts->Allocate((int)((double)length * 1.002));
  // Keep adding cells until we run out of points.


The issue is that vtkPoints are float by default so there is a loss of precision in reading in doubles and these being converted to floats.
No tags attached.
Issue History
2008-04-22 00:54amacleanNew Issue
2011-03-30 08:41David PartykaAssigned To => David Partyka
2011-03-30 08:41David PartykaStatusbacklog => tabled
2011-03-30 08:42David PartykaNote Added: 0025964
2011-03-30 08:42David PartykaStatustabled => @80@
2011-03-30 08:42David PartykaResolutionopen => fixed
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2013-04-05 20:24Berk GeveciStatuscustomer review => closed

Notes
(0025964)
David Partyka   
2011-03-30 08:42   
Applied patch provided by Glen Faken

http://review.source.kitware.com/#change,1285 [^]

Thanks to you both for the fix.