93 #ifndef vtkXYPlotActor_h
94 #define vtkXYPlotActor_h
96 #define VTK_XYPLOT_INDEX 0
97 #define VTK_XYPLOT_ARC_LENGTH 1
98 #define VTK_XYPLOT_NORMALIZED_ARC_LENGTH 2
99 #define VTK_XYPLOT_VALUE 3
101 #define VTK_XYPLOT_ROW 0
102 #define VTK_XYPLOT_COLUMN 1
104 #define VTK_XYPLOT_Y_AXIS_TOP 0
105 #define VTK_XYPLOT_Y_AXIS_HCENTER 1
106 #define VTK_XYPLOT_Y_AXIS_VCENTER 2 // rotate by 90 degrees (y-axis aligned)
112 class vtkXYPlotActorConnections;
169 this->RemoveDataSetInputConnection(in, NULL, 0);
175 void RemoveAllDataSetInputConnections();
181 void SetPointComponent(
int i,
int comp);
182 int GetPointComponent(
int i);
196 vtkGetMacro(XValues,
int);
202 const char *GetXValuesAsString();
226 vtkGetMacro(DataObjectPlotMode,
int);
231 const char *GetDataObjectPlotModeAsString();
241 void SetDataObjectXComponent(
int i,
int comp);
242 int GetDataObjectXComponent(
int i);
252 void SetDataObjectYComponent(
int i,
int comp);
253 int GetDataObjectYComponent(
int i);
262 void SetPlotColor(
int i,
double r,
double g,
double b);
264 this->SetPlotColor(i, color[0], color[1], color[2]); };
265 double *GetPlotColor(
int i);
268 void SetPlotLabel(
int i,
const char *label);
269 const char *GetPlotLabel(
int i);
274 vtkGetMacro(PlotCurvePoints,
int);
275 vtkSetMacro(PlotCurvePoints,
int);
276 vtkBooleanMacro(PlotCurvePoints,
int);
278 vtkGetMacro(PlotCurveLines,
int);
279 vtkSetMacro(PlotCurveLines,
int);
280 vtkBooleanMacro(PlotCurveLines,
int);
282 void SetPlotLines(
int i,
int);
283 int GetPlotLines(
int i);
285 void SetPlotPoints(
int i,
int);
286 int GetPlotPoints(
int i);
292 vtkSetMacro(ExchangeAxes,
int);
293 vtkGetMacro(ExchangeAxes,
int);
294 vtkBooleanMacro(ExchangeAxes,
int);
302 vtkSetMacro(ReverseXAxis,
int);
303 vtkGetMacro(ReverseXAxis,
int);
304 vtkBooleanMacro(ReverseXAxis,
int);
312 vtkSetMacro(ReverseYAxis,
int);
313 vtkGetMacro(ReverseYAxis,
int);
314 vtkBooleanMacro(ReverseYAxis,
int);
328 vtkSetStringMacro(Title);
329 vtkGetStringMacro(Title);
334 vtkSetStringMacro(XTitle);
335 vtkGetStringMacro(XTitle);
340 virtual void SetYTitle(
const char* );
364 vtkSetVector2Macro(XRange,
double);
365 vtkGetVectorMacro(XRange,
double,2);
366 vtkSetVector2Macro(YRange,
double);
367 vtkGetVectorMacro(YRange,
double,2);
369 {this->SetXRange(xmin,xmax); this->SetYRange(ymin,ymax);}
378 vtkSetClampMacro(NumberOfXLabels,
int, 0, 50);
379 vtkGetMacro(NumberOfXLabels,
int);
380 vtkSetClampMacro(NumberOfYLabels,
int, 0, 50);
381 vtkGetMacro(NumberOfYLabels,
int);
383 {this->SetNumberOfXLabels(num); this->SetNumberOfYLabels(num);}
392 void SetAdjustXLabels(
int adjust);
393 vtkGetMacro( AdjustXLabels,
int );
394 void SetAdjustYLabels(
int adjust);
395 vtkGetMacro( AdjustYLabels,
int );
400 void SetNumberOfXMinorTicks(
int num);
401 int GetNumberOfXMinorTicks();
402 void SetNumberOfYMinorTicks(
int num);
403 int GetNumberOfYMinorTicks();
410 vtkSetMacro(Legend,
int);
411 vtkGetMacro(Legend,
int);
412 vtkBooleanMacro(Legend,
int);
418 vtkSetVector2Macro(TitlePosition,
double);
419 vtkGetVector2Macro(TitlePosition,
double);
425 vtkSetMacro(AdjustTitlePosition,
int);
426 vtkGetMacro(AdjustTitlePosition,
int);
427 vtkBooleanMacro(AdjustTitlePosition,
int);
438 AlignAxisLeft = 0x100,
439 AlignAxisRight = 0x200,
440 AlignAxisHCenter = 0x400,
441 AlignAxisTop = 0x1000,
442 AlignAxisBottom = 0x2000,
443 AlignAxisVCenter = 0x4000
452 vtkSetMacro(AdjustTitlePositionMode,
int);
453 vtkGetMacro(AdjustTitlePositionMode,
int);
463 vtkSetVector2Macro(LegendPosition,
double);
464 vtkGetVector2Macro(LegendPosition,
double);
465 vtkSetVector2Macro(LegendPosition2,
double);
466 vtkGetVector2Macro(LegendPosition2,
double);
491 vtkSetMacro(Logx,
int);
492 vtkGetMacro(Logx,
int);
493 vtkBooleanMacro(Logx,
int);
499 virtual void SetLabelFormat (
const char* );
502 return this->GetXLabelFormat();
508 virtual void SetXLabelFormat (
const char* );
509 vtkGetStringMacro(XLabelFormat);
514 virtual void SetYLabelFormat (
const char* );
515 vtkGetStringMacro(YLabelFormat);
521 vtkSetClampMacro(Border,
int, 0, 50);
522 vtkGetMacro(Border,
int);
529 vtkGetMacro(PlotPoints,
int);
530 vtkSetMacro(PlotPoints,
int);
531 vtkBooleanMacro(PlotPoints,
int);
537 vtkGetMacro(PlotLines,
int);
538 vtkSetMacro(PlotLines,
int);
539 vtkBooleanMacro(PlotLines,
int);
546 vtkSetClampMacro(GlyphSize,
double, 0.0, 0.2);
547 vtkGetMacro(GlyphSize,
double);
552 void ViewportToPlotCoordinate(
vtkViewport *viewport,
double &u,
double &v);
558 void ViewportToPlotCoordinate(
vtkViewport *viewport);
559 vtkSetVector2Macro(PlotCoordinate,
double);
560 vtkGetVector2Macro(PlotCoordinate,
double);
564 void PlotToViewportCoordinate(
vtkViewport *viewport,
double &u,
double &v);
571 void PlotToViewportCoordinate(
vtkViewport *viewport);
572 vtkSetVector2Macro(ViewportCoordinate,
double);
573 vtkGetVector2Macro(ViewportCoordinate,
double);
578 int IsInPlot(
vtkViewport *viewport,
double u,
double v);
583 vtkSetMacro(ChartBox,
int);
584 vtkGetMacro(ChartBox,
int);
585 vtkBooleanMacro(ChartBox,
int);
591 vtkSetMacro(ChartBorder,
int);
592 vtkGetMacro(ChartBorder,
int);
593 vtkBooleanMacro(ChartBorder,
int);
601 vtkSetMacro(ShowReferenceXLine,
int);
602 vtkGetMacro(ShowReferenceXLine,
int);
603 vtkBooleanMacro(ShowReferenceXLine,
int);
608 vtkSetMacro(ReferenceXValue,
double);
609 vtkGetMacro(ReferenceXValue,
double);
614 vtkSetMacro(ShowReferenceYLine,
int);
615 vtkGetMacro(ShowReferenceYLine,
int);
616 vtkBooleanMacro(ShowReferenceYLine,
int);
621 vtkSetMacro(ReferenceYValue,
double);
622 vtkGetMacro(ReferenceYValue,
double);
630 void PrintAsCSV(ostream &os);
654 void SetXTitlePosition(
double position);
655 double GetXTitlePosition();
660 vtkSetMacro(YTitlePosition,
int);
661 vtkGetMacro(YTitlePosition,
int);
678 virtual void SetPlotGlyphType(
int,
int );
679 virtual void SetLineWidth(
double );
680 virtual void AddUserCurvesPoint(
double,
double,
double );
681 virtual void RemoveAllActiveCurves();
686 virtual void SetLegendBorder(
int );
687 virtual void SetLegendBox(
int );
688 virtual void SetLegendUseBackground(
int );
689 virtual void SetLegendBackgroundColor(
double,
double,
double );
694 virtual void SetTitleColor(
double,
double,
double );
695 virtual void SetTitleFontFamily(
int );
696 virtual void SetTitleBold(
int );
697 virtual void SetTitleItalic(
int );
698 virtual void SetTitleShadow(
int );
699 virtual void SetTitleFontSize(
int );
700 virtual void SetTitleJustification(
int );
701 virtual void SetTitleVerticalJustification(
int );
706 virtual void SetXAxisColor(
double,
double,
double );
707 virtual void SetYAxisColor(
double,
double,
double );
712 virtual void SetAxisTitleColor(
double,
double,
double );
713 virtual void SetAxisTitleFontFamily(
int );
714 virtual void SetAxisTitleBold(
int );
715 virtual void SetAxisTitleItalic(
int );
716 virtual void SetAxisTitleShadow(
int );
717 virtual void SetAxisTitleFontSize(
int );
718 virtual void SetAxisTitleJustification(
int );
719 virtual void SetAxisTitleVerticalJustification(
int );
724 virtual void SetAxisLabelColor(
double,
double,
double );
725 virtual void SetAxisLabelFontFamily(
int );
726 virtual void SetAxisLabelBold(
int );
727 virtual void SetAxisLabelItalic(
int );
728 virtual void SetAxisLabelShadow(
int );
729 virtual void SetAxisLabelFontSize(
int );
730 virtual void SetAxisLabelJustification(
int );
731 virtual void SetAxisLabelVerticalJustification(
int );
753 double XComputedRange[2];
754 double YComputedRange[2];
766 double TitlePosition[2];
779 double ViewportCoordinate[2];
780 double PlotCoordinate[2];
798 void InitializeEntries();
803 double LegendPosition[2];
804 double LegendPosition2[2];
834 void ComputeXRange(
double range[2],
double *lengths);
835 void ComputeYRange(
double range[2]);
836 void ComputeDORange(
double xrange[2],
double yrange[2],
double *lengths);
838 virtual void CreatePlotData(
int *pos,
int *pos2,
double xRange[2],
839 double yRange[2],
double *norms,
840 int numDS,
int numDO);
841 void PlaceAxes(
vtkViewport *viewport,
int *
size,
int pos[2],
int pos2[2]);
842 void GenerateClipPlanes(
int *pos,
int *pos2);
843 double ComputeGlyphScale(
int i,
int *pos,
int *pos2);
844 void ClipPlotData(
int *pos,
int *pos2,
vtkPolyData *pd);
845 double *TransformPoint(
int pos[2],
int pos2[2],
double x[3],
double xNew[3]);
861 const char* arrayName,
vtkPolyDataMapper2D * ChartBorderMapper
const char * GetLabelFormat()
generate an x-y plot from input dataset(s) or field data
vtkLegendBoxActor * LegendActor
maintain an unordered list of dataset objects
copy oriented and scaled glyph geometry to every input point (2D specialization)
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
vtkXYPlotActorConnections * InputConnectionHolder
virtual void ReleaseGraphicsResources(vtkWindow *)
abstract specification for Viewports
vtkPolyDataMapper2D * ReferenceLinesMapper
abstract class to specify dataset behavior
void AddDataSetInputConnection(vtkAlgorithmOutput *in)
maintain an unordered list of data objects
a actor that draws 2D data
vtkAxisActor2D * GetXAxisActor2D()
record modification and/or execution time
vtkTextProperty * AxisTitleTextProperty
#define VTK_XYPLOT_Y_AXIS_TOP
implicit function for convex set of planes
Create an axis with tick marks and labels.
void SetPlotRange(double xmin, double ymin, double xmax, double ymax)
char ** SelectedInputScalars
concrete dataset represents vertices, lines, polygons, and triangle strips
vtkSmartPointer< vtkDoubleArray > ActiveCurve
vtkProperty2D * GetChartBoxProperty()
#define VTKRENDERINGANNOTATION_EXPORT
Proxy object to connect input/output ports.
vtkPolyData * ChartBorderPolyData
dynamic, self-adjusting array of double
#define VTK_XYPLOT_Y_AXIS_HCENTER
window superclass for vtkRenderWindow
vtkAxisActor2D * GetYAxisActor2D()
An actor that displays text. Scaled or unscaled.
#define VTK_XYPLOT_ARC_LENGTH
dynamic, self-adjusting array of int
vtkPolyDataMapper2D ** PlotMapper
vtkActor2D * ChartBoxActor
virtual unsigned long GetMTime()
vtkXYPlotActorConnections * DataObjectInputConnectionHolder
virtual int HasTranslucentPolygonalGeometry()
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
a simple class to control print indentation
void PrintSelf(ostream &os, vtkIndent indent)
static vtkActor2D * New()
vtkAppendPolyData ** PlotAppend
void SetPlotColor(int i, const double color[3])
appends one or more polygonal datasets together
vtkGlyphSource2D * GlyphSource
vtkTextMapper * TitleMapper
vtkTextProperty * AxisLabelTextProperty
represent text properties.
void AddDataSetInput(vtkDataSet *ds)
void SetNumberOfLabels(int num)
void SetXValuesToArcLength()
vtkTextProperty * TitleTextProperty
vtkActor2D * ChartBorderActor
#define VTK_XYPLOT_NORMALIZED_ARC_LENGTH
void SetYTitlePositionToVCenter()
#define VTK_XYPLOT_COLUMN
void SetXValuesToNormalizedArcLength()
void SetDataObjectPlotModeToRows()
vtkTextActor * YTitleActor
virtual int RenderOverlay(vtkViewport *viewport)
void SetYTitlePositionToHCenter()
represent surface properties of a 2D image
create 2D glyphs represented by vtkPolyData
vtkPolyDataMapper2D * ChartBoxMapper
void RemoveDataSetInputConnection(vtkAlgorithmOutput *in)
vtkIntArray * SelectedInputScalarsComponent
vtkPolyData * ReferenceLinesPolyData
vtkActor2D * ReferenceLinesActor
general representation of visualization data
void RemoveDataSetInput(vtkDataSet *ds)
int AdjustTitlePositionMode
draw vtkPolyData onto the image plane
vtkPolyData * ChartBoxPolyData
void SetDataObjectPlotModeToColumns()
#define VTK_XYPLOT_Y_AXIS_VCENTER
void SetYTitlePositionToTop()