MantisBT - VTK
View Issue Details
0013237VTK(No Category)public2012-06-11 19:512015-01-09 14:01
Dale Lukas Peterson 
Kyle Lutz 
normalminorhave not tried
closedfixed 
 
6.0.0 
TBD
incorrect functionality
0013237: misspelled member function in vtkContourFilter
This method is present in the vtkContourFilter:

void vtkContourFilter::SetOuputPointsPrecision(int precision)

The member name is missing a 't' after the 'u' and before the 'p'. It should be:

void vtkContourFilter::SetOutputPointsPrecision(int precision)

Also, the parameter is of type int, but shouldn't it be of type vtkAlgorithm::DesiredOutputPrecision ?

There is also a misspelling in the Doxygen documentation, explanation is spelled: "explaination".

Finally, on my machine, when I call SetOuputPointsPrecision(vtkAlgorithm::DOUBLE_PRECISION), and then call contours->GetOutput()->Print(std::cout), I get:

vtkPolyData (0x7fe4f0)
  Debug: Off
  Modified Time: 431
  Reference Count: 1
  Registered Events: (none)
  Information: 0x7fca40
  Data Released: False
  Global Release Data: Off
  UpdateTime: 432
  Field Data:
    Debug: Off
    Modified Time: 380
    Reference Count: 1
    Registered Events: (none)
    Number Of Arrays: 0
    Number Of Components: 0
    Number Of Tuples: 0
  Number Of Points: 38708
  Point Data:
    Debug: Off
    Modified Time: 431
    Reference Count: 1
    Registered Events: (none)
    Number Of Arrays: 2
    Array 0 name = scalars
    Array 1 name = Normals
    Number Of Components: 4
    Number Of Tuples: 38708
    Copy Tuple Flags: ( 0 1 1 1 1 1 1 1 )
    Interpolate Flags: ( 0 1 1 1 1 1 1 1 )
    Pass Through Flags: ( 0 1 1 1 1 1 1 1 )
    Scalars:
      Debug: Off
      Modified Time: 425
      Reference Count: 1
      Registered Events: (none)
      Name: scalars
      Data type: float

Which indicates that double is not being used when computing the scalars. So it seems that this member function isn't actually doing what it advertises, unless I am misusing it or misunderstanding the documentation (very possibly the case). I am giving a vtkSampleFunction to vtkContourFilter, and I have called vtkSampleFunction::SetOutputScalarTypeToDouble(). Or perhaps the PrintSelf method isn't properly implemented and the underlying data type is actually correct?



No tags attached.
Issue History
2012-06-11 19:51Dale Lukas PetersonNew Issue
2012-06-12 09:17Kyle LutzAssigned To => Kyle Lutz
2012-06-12 09:17Kyle LutzStatusbacklog => todo
2012-06-12 09:17Kyle LutzResolutionopen => fixed
2012-06-12 09:17Kyle LutzStatustodo => active development
2012-06-12 09:17Kyle LutzResolutionfixed => open
2012-06-12 09:47Kyle LutzNote Added: 0028690
2012-06-12 09:47Kyle LutzStatusactive development => gatekeeper review
2012-06-12 09:47Kyle LutzResolutionopen => fixed
2013-07-22 19:42Dave DeMarleStatusgatekeeper review => closed
2013-07-22 19:42Dave DeMarleFixed in Version => 6.0.0
2015-01-09 14:01Kyle LutzSource_changeset_attached => VTK master b1441223

Notes
(0028690)
Kyle Lutz   
2012-06-12 09:47   
Hi Dale,

Thanks for catching this! I've pushed a topic with the spelling fixes to gerrit and, after review, it should be merged into VTK. The topic can be seen here: http://review.source.kitware.com/#/t/800/ [^]

The method parameter is an int rather than the enum value because currently our wrapper generators (for python, tcl, etc.) don't correctly handle enums. But you're right, and ideally the parameter would be the enum type.

The desired precision only affects the output point coordinates, not any of the scalar data values associated with the data set. This should probably be made more explicit in the method's documentation.

Thanks,
Kyle