91 #ifndef vtkXYPlotActor_h
92 #define vtkXYPlotActor_h
94 #define VTK_XYPLOT_INDEX 0
95 #define VTK_XYPLOT_ARC_LENGTH 1
96 #define VTK_XYPLOT_NORMALIZED_ARC_LENGTH 2
97 #define VTK_XYPLOT_VALUE 3
99 #define VTK_XYPLOT_ROW 0
100 #define VTK_XYPLOT_COLUMN 1
102 #define VTK_XYPLOT_Y_AXIS_TOP 0
103 #define VTK_XYPLOT_Y_AXIS_HCENTER 1
104 #define VTK_XYPLOT_Y_AXIS_VCENTER 2 // rotate by 90 degrees (y-axis aligned)
107 #include "vtkRenderingAnnotationModule.h"
110 class vtkXYPlotActorConnections;
163 this->AddDataSetInputConnection(in,
nullptr, 0);
176 this->RemoveDataSetInputConnection(in,
nullptr, 0);
184 void RemoveAllDataSetInputConnections();
191 void SetPointComponent(
int i,
int comp);
192 int GetPointComponent(
int i);
208 vtkGetMacro(XValues,
int);
213 const char* GetXValuesAsString();
244 vtkGetMacro(DataObjectPlotMode,
int);
247 const char* GetDataObjectPlotModeAsString();
259 void SetDataObjectXComponent(
int i,
int comp);
260 int GetDataObjectXComponent(
int i);
272 void SetDataObjectYComponent(
int i,
int comp);
273 int GetDataObjectYComponent(
int i);
282 void SetPlotColor(
int i,
double r,
double g,
double b);
285 this->SetPlotColor(i, color[0], color[1], color[2]);
290 void SetPlotLabel(
int i,
const char* label);
291 const char* GetPlotLabel(
int i);
304 void SetPlotLines(
int i,
int);
305 int GetPlotLines(
int i);
307 void SetPlotPoints(
int i,
int);
308 int GetPlotPoints(
int i);
358 vtkSetStringMacro(Title);
359 vtkGetStringMacro(Title);
366 vtkSetStringMacro(XTitle);
367 vtkGetStringMacro(XTitle);
374 virtual void SetYTitle(
const char*);
396 vtkSetVector2Macro(XRange,
double);
397 vtkGetVectorMacro(XRange,
double, 2);
398 vtkSetVector2Macro(YRange,
double);
399 vtkGetVectorMacro(YRange,
double, 2);
402 this->SetXRange(xmin, xmax);
403 this->SetYRange(ymin, ymax);
414 vtkSetClampMacro(NumberOfXLabels,
int, 0, 50);
415 vtkGetMacro(NumberOfXLabels,
int);
416 vtkSetClampMacro(NumberOfYLabels,
int, 0, 50);
417 vtkGetMacro(NumberOfYLabels,
int);
420 this->SetNumberOfXLabels(num);
421 this->SetNumberOfYLabels(num);
433 void SetAdjustXLabels(
int adjust);
434 vtkGetMacro(AdjustXLabels,
int);
435 void SetAdjustYLabels(
int adjust);
436 vtkGetMacro(AdjustYLabels,
int);
443 void SetNumberOfXMinorTicks(
int num);
444 int GetNumberOfXMinorTicks();
445 void SetNumberOfYMinorTicks(
int num);
446 int GetNumberOfYMinorTicks();
465 vtkSetVector2Macro(TitlePosition,
double);
466 vtkGetVector2Macro(TitlePosition,
double);
487 AlignAxisLeft = 0x100,
488 AlignAxisRight = 0x200,
489 AlignAxisHCenter = 0x400,
490 AlignAxisTop = 0x1000,
491 AlignAxisBottom = 0x2000,
492 AlignAxisVCenter = 0x4000
503 vtkSetMacro(AdjustTitlePositionMode,
int);
504 vtkGetMacro(AdjustTitlePositionMode,
int);
516 vtkSetVector2Macro(LegendPosition,
double);
517 vtkGetVector2Macro(LegendPosition,
double);
518 vtkSetVector2Macro(LegendPosition2,
double);
519 vtkGetVector2Macro(LegendPosition2,
double);
562 virtual void SetLabelFormat(
const char*);
570 virtual void SetXLabelFormat(
const char*);
571 vtkGetStringMacro(XLabelFormat);
578 virtual void SetYLabelFormat(
const char*);
579 vtkGetStringMacro(YLabelFormat);
587 vtkSetClampMacro(Border,
int, 0, 50);
588 vtkGetMacro(Border,
int);
618 vtkSetClampMacro(GlyphSize,
double, 0.0, 0.2);
619 vtkGetMacro(GlyphSize,
double);
626 void ViewportToPlotCoordinate(
vtkViewport* viewport,
double& u,
double& v);
634 void ViewportToPlotCoordinate(
vtkViewport* viewport);
635 vtkSetVector2Macro(PlotCoordinate,
double);
636 vtkGetVector2Macro(PlotCoordinate,
double);
642 void PlotToViewportCoordinate(
vtkViewport* viewport,
double& u,
double& v);
651 void PlotToViewportCoordinate(
vtkViewport* viewport);
652 vtkSetVector2Macro(ViewportCoordinate,
double);
653 vtkGetVector2Macro(ViewportCoordinate,
double);
660 int IsInPlot(
vtkViewport* viewport,
double u,
double v);
700 vtkSetMacro(ReferenceXValue,
double);
701 vtkGetMacro(ReferenceXValue,
double);
717 vtkSetMacro(ReferenceYValue,
double);
718 vtkGetMacro(ReferenceYValue,
double);
729 void PrintAsCSV(ostream& os);
758 void SetXTitlePosition(
double position);
759 double GetXTitlePosition();
766 vtkSetMacro(YTitlePosition,
int);
767 vtkGetMacro(YTitlePosition,
int);
777 virtual void SetPlotGlyphType(
int,
int);
778 virtual void SetLineWidth(
double);
779 virtual void AddUserCurvesPoint(
double,
double,
double);
780 virtual void RemoveAllActiveCurves();
787 virtual void SetLegendBorder(
int);
788 virtual void SetLegendBox(
int);
789 virtual void SetLegendUseBackground(
int);
790 virtual void SetLegendBackgroundColor(
double,
double,
double);
797 virtual void SetTitleColor(
double,
double,
double);
798 virtual void SetTitleFontFamily(
int);
799 virtual void SetTitleBold(
int);
800 virtual void SetTitleItalic(
int);
801 virtual void SetTitleShadow(
int);
802 virtual void SetTitleFontSize(
int);
803 virtual void SetTitleJustification(
int);
804 virtual void SetTitleVerticalJustification(
int);
811 virtual void SetXAxisColor(
double,
double,
double);
812 virtual void SetYAxisColor(
double,
double,
double);
819 virtual void SetAxisTitleColor(
double,
double,
double);
820 virtual void SetAxisTitleFontFamily(
int);
821 virtual void SetAxisTitleBold(
int);
822 virtual void SetAxisTitleItalic(
int);
823 virtual void SetAxisTitleShadow(
int);
824 virtual void SetAxisTitleFontSize(
int);
825 virtual void SetAxisTitleJustification(
int);
826 virtual void SetAxisTitleVerticalJustification(
int);
833 virtual void SetAxisLabelColor(
double,
double,
double);
834 virtual void SetAxisLabelFontFamily(
int);
835 virtual void SetAxisLabelBold(
int);
836 virtual void SetAxisLabelItalic(
int);
837 virtual void SetAxisLabelShadow(
int);
838 virtual void SetAxisLabelFontSize(
int);
839 virtual void SetAxisLabelJustification(
int);
840 virtual void SetAxisLabelVerticalJustification(
int);
862 double XComputedRange[2];
863 double YComputedRange[2];
875 double TitlePosition[2];
888 double ViewportCoordinate[2];
889 double PlotCoordinate[2];
907 void InitializeEntries();
912 double LegendPosition[2];
913 double LegendPosition2[2];
943 void ComputeXRange(
double range[2],
double* lengths);
944 void ComputeYRange(
double range[2]);
945 void ComputeDORange(
double xrange[2],
double yrange[2],
double* lengths);
947 virtual void CreatePlotData(
948 int* pos,
int* pos2,
double xRange[2],
double yRange[2],
double* norms,
int numDS,
int numDO);
949 void PlaceAxes(
vtkViewport* viewport,
const int*
size,
int pos[2],
int pos2[2]);
950 void GenerateClipPlanes(
int* pos,
int* pos2);
951 double ComputeGlyphScale(
int i,
int* pos,
int* pos2);
952 void ClipPlotData(
int* pos,
int* pos2,
vtkPolyData* pd);
953 double* TransformPoint(
int pos[2],
int pos2[2],
double x[3],
double xNew[3]);
vtkPolyDataMapper2D * ChartBorderMapper
const char * GetLabelFormat()
Set/Get the format with which to print the labels .
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)
int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
vtkXYPlotActorConnections * InputConnectionHolder
vtkTypeUInt32 vtkMTimeType
abstract specification for Viewports
vtkPolyDataMapper2D * ReferenceLinesMapper
abstract class to specify dataset behavior
void AddDataSetInputConnection(vtkAlgorithmOutput *in)
Add a dataset to the list of data to append.
vtkMTimeType GetMTime() override
Return this objects MTime.
maintain an unordered list of data objects
a actor that draws 2D data
vtkAxisActor2D * GetXAxisActor2D()
Retrieve handles to the X and Y axis (so that you can set their text properties for example) ...
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)
Set the plot range (range of independent and dependent variables) to plot.
char ** SelectedInputScalars
concrete dataset represents vertices, lines, polygons, and triangle strips
vtkSmartPointer< vtkDoubleArray > ActiveCurve
vtkProperty2D * GetChartBoxProperty()
Get the box vtkProperty2D.
Proxy object to connect input/output ports.
vtkPolyData * ChartBorderPolyData
dynamic, self-adjusting array of double
vtkTypeBool PlotCurveLines
#define VTK_XYPLOT_Y_AXIS_HCENTER
vtkTypeBool ShowReferenceYLine
window superclass for vtkRenderWindow
vtkAxisActor2D * GetYAxisActor2D()
Retrieve handles to the X and Y axis (so that you can set their text properties for example) ...
An actor that displays text.
#define VTK_XYPLOT_ARC_LENGTH
dynamic, self-adjusting array of int
vtkPolyDataMapper2D ** PlotMapper
vtkActor2D * ChartBoxActor
vtkXYPlotActorConnections * DataObjectInputConnectionHolder
vtkTypeBool AdjustTitlePosition
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
a simple class to control print indentation
static vtkActor2D * New()
Creates an actor2D with the following defaults: position (0,0) (coordinate system is viewport); at la...
vtkAppendPolyData ** PlotAppend
void SetPlotColor(int i, const double color[3])
appends one or more polygonal datasets together
vtkGlyphSource2D * GlyphSource
vtkTextMapper * TitleMapper
vtkTextProperty * AxisLabelTextProperty
#define VTK_SIZEHINT(...)
represent text properties.
void AddDataSetInput(vtkDataSet *ds)
Add a dataset to the list of data to append.
void SetNumberOfLabels(int num)
Set/Get the number of annotation labels to show along the x and y axes.
vtkTypeBool PlotCurvePoints
void SetXValuesToArcLength()
Specify how the independent (x) variable is computed from the points.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
void SetXValuesToValue()
Specify how the independent (x) variable is computed from the points.
vtkTextProperty * TitleTextProperty
vtkActor2D * ChartBorderActor
#define VTK_XYPLOT_NORMALIZED_ARC_LENGTH
void SetYTitlePositionToVCenter()
Set/Get the position of the title of Y axis.
#define VTK_XYPLOT_COLUMN
vtkTypeBool ShowReferenceXLine
void SetXValuesToNormalizedArcLength()
Specify how the independent (x) variable is computed from the points.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
void SetDataObjectPlotModeToRows()
Indicate whether to plot rows or columns.
vtkTextActor * YTitleActor
void SetYTitlePositionToHCenter()
Set/Get the position of the title of Y axis.
represent surface properties of a 2D image
create 2D glyphs represented by vtkPolyData
vtkPolyDataMapper2D * ChartBoxMapper
void SetXValuesToIndex()
Specify how the independent (x) variable is computed from the points.
void RemoveDataSetInputConnection(vtkAlgorithmOutput *in)
Remove a dataset from the list of data to append.
vtkIntArray * SelectedInputScalarsComponent
vtkPolyData * ReferenceLinesPolyData
vtkActor2D * ReferenceLinesActor
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
general representation of visualization data
void RemoveDataSetInput(vtkDataSet *ds)
Remove a dataset from the list of data to append.
int AdjustTitlePositionMode
draw vtkPolyData onto the image plane
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyData * ChartBoxPolyData
void SetDataObjectPlotModeToColumns()
Indicate whether to plot rows or columns.
#define VTK_XYPLOT_Y_AXIS_VCENTER
void SetYTitlePositionToTop()
Set/Get the position of the title of Y axis.