VTK/Charts

From KitwarePublic
< VTK
Revision as of 20:12, 24 November 2009 by Jeff (talk | contribs) (→‎Open Questions)
Jump to navigationJump to search

Goals

  • Render 2D charts using OpenGL/VTK
  • Scalable to large data sets
  • Simple, flexible API
  • Enable server side rendering of charts with VTK compositing
  • Proper handling of IEEE Not-A-Number (NaN) values in plots of both experimental and simulation data.

Open Questions

  • Alternate backend to produce publication quality output?
  • Possibility to extend the API to 3D charts in the future?
  • Maybe real-time charting? (just-in-time visualization of data sets)

Unlimited Options

Supported Parameter Types

  • Basic types (double, int, string)
  • vtkVariant
  • Data object
  • Pipeline output port
  • vtkArray
  • vtkAbstractArray
  • Data object + array name
  • Data object + array name + component index
  • Function pointer
  • Functor (i.e. struct type with operator())
  • Lambda function (boost::lambda)
  • Strategies (i.e. subclass vtkDoubleParameter which has virtual method double Get(vtkMark* m, int i))
  • Override virtual methods in mark (i.e. subclass vtkDotMark which has virtual method double GetSize(int i))
  • Inherit from parent mark

Parameter Storage

  • Named member variables
  • Named member variables with import/export to name/value map
  • Generic name/value map

class vtkMark { public:

 ParamType GetParameter(string key)
 { return this->Parameters[key].Valid ? this->Parameters[key] : this->Parent->GetParameter(key); }
 void SetParameter(string key, ParamType p)
 { this->Parameters[key] = p; }

private:

 map<string, ParamType> Parameters;

}

  • Generic name/value map with setter/getter syntactic sugar for discoverability

class vtkDotMark { public:

 ParamType GetSize() { return this->GetParameter("size"); }
 void SetSize(ParamType p) { this->SetParameter("size", p); }

}

Other Features

  • Declarative API

Further Details on API

Please see VTK/Charts/API for a discussion about the API. There is also more detail about the VTK/Charts/2DAPI and the VTK/Charts/ChartAPI along with proposed class relationships.

Chart Types

  • XY plot
  • Scatter
  • Bar chart
  • Histogram
  • Stack chart
  • Pie chart
  • Parallel axes
  • Tree map
  • Bubble chart

Existing Applications/Libraries

Below is a summary of different libraries or applications that produce 2D charts and plots. Those listed either provide both screen and publication quality rendering, or just screen rendering.

Optimized for Screen Rendering

Multiple Backends (Publication Quality)