VTK/Charts: Difference between revisions

From KitwarePublic
< VTK
Jump to navigationJump to search
(Updated links.)
 
(5 intermediate revisions by one other user not shown)
Line 13: Line 13:
* Maybe real-time charting? (just-in-time visualization of data sets)
* 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 <code>double Get(vtkMark* m, int i)</code>)
* Override virtual methods in mark (i.e. subclass vtkDotMark which has virtual method <code>double GetSize(int i)</code>)
* Inherit from parent mark
=== Parameter Storage ===
* Named member variables
* Named member variables with import/export to name/value map
* Generic name/value map
<tt>
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;
}
</tt>
* Generic name/value map with setter/getter syntactic sugar for discoverability
<code>
class vtkDotMark {
public:
  ParamType GetSize() { return this->GetParameter("size"); }
  void SetSize(ParamType p) { this->SetParameter("size", p); }
}
</code>
=== Other Features ===
* Declarative API


== Further Details on 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.
Please see [[VTK/2DAPI]] and [[VTK/Charts/ChartAPI]] for details about the 2D API and chart API, along with proposed class relationships. [[VTK/Marks]] discusses options for a [http://www.protovis.org protovis]-like API in VTK, that would build on the 2D API. The [[VTK/CanvasAPI]] details the canvas API that both the chart and marks API build on.


== Chart Types ==
== Chart Types ==

Latest revision as of 16:32, 11 December 2009

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)


Further Details on API

Please see VTK/2DAPI and VTK/Charts/ChartAPI for details about the 2D API and chart API, along with proposed class relationships. VTK/Marks discusses options for a protovis-like API in VTK, that would build on the 2D API. The VTK/CanvasAPI details the canvas API that both the chart and marks API build on.

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)