SIVIC API
0.9.26
|
#include <svkPlotLine.h>
Public Types | |
enum | PlotComponent { REAL = 0, IMAGINARY, MAGNITUDE } |
enum | PlotDirection { ROW_COLUMN = 0, COLUMN_ROW, SLICE_ROW, ROW_SLICE, SLICE_COLUMN, COLUMN_SLICE } |
Public Member Functions | |
vtkTypeMacro (svkPlotLine, vtkObject) | |
svkPlotLine () | |
~svkPlotLine () | |
void | SetData (vtkDataArray *plotData) |
void | SetPointRange (int startPt, int endPt) |
void | SetValueRange (double minValue, double maxValue) |
double * | GetBounds () |
void | SetComponent (PlotComponent component) |
float * | GetDataPoints () |
void | SetDataPoints (float *polyLinePoints) |
double * | GetOrigin () |
void | SetOrigin (double *origin) |
double * | GetSpacing () |
void | SetSpacing (double *spacing) |
void | GetDcos (double dcos[3][3]) |
void | SetInvertPlots (bool invertPlots) |
void | SetMirrorPlots (bool mirrorPlots) |
void | SetPlotDirection (int amplitudeDirection, int plotDirection) |
void | Modified () |
void | SetDcos (vector< vector< double > > *dcos) |
void | SetGeneratePolyData (bool generatePolyData) |
bool | GetGeneratePolyData () |
template<class T > | |
void | GeneratePolyDataTemplated (T *castDataPtr) |
Static Public Member Functions | |
static svkPlotLine * | New () |
Protected Member Functions | |
void | GeneratePolyData () |
void | RecalculateScale () |
void | RecalculatePlotAreaBounds () |
Protected Attributes | |
bool | generatePolyData |
when modified should this object regenerate the poly data. More... | |
double | plotAreaBounds [6] |
The bounds in which the plot is to be placed. More... | |
int | startPt |
The index of the first point in the plotData to be plotted. More... | |
int | endPt |
The index of the last point in the plotData to be plotted. More... | |
int | numPoints |
The number of points in the plotData. More... | |
int | numComponents |
The number of components. More... | |
int | componentOffset |
double | minValue |
The minimum value to be plotted. More... | |
double | maxValue |
The maximum value to be plotted. More... | |
vtkDataArray * | plotData |
The data to be plotted. More... | |
void * | dataPtr |
int | dataType |
float * | polyLinePoints |
The points that make up the line. More... | |
bool | invertPlots |
Should the plots be inverted? More... | |
bool | mirrorPlots |
Should the plots be flipped Left-Right? More... | |
PlotDirection | plotDirection |
int | amplitudeIndex |
Which index should map to amplitude. More... | |
int | pointIndex |
Which index should map to frequency/points. More... | |
float | scale [2] |
the scale More... | |
PlotComponent | plotComponent |
Which component should we plot? More... | |
double | origin [3] |
Origin from which to start drawing the line. More... | |
double | spacing [3] |
Size of the box to fill. More... | |
vector< vector< double > > * | dcos |
The dcos of the dataset. More... | |
Friends | |
class | svkPlotLineGrid |
svkPlotLine is a utility class that manipulates values in an array of x-y-z floating point values. It can be used to manipulate the points in a vtkPolyData object to to represent a vtkDataArray.
enum PlotComponent |
enum PlotDirection |
svkPlotLine | ( | ) |
Constructor. This constructor creates new vtkObjects, and sets some instant variables.
References svkPlotLine::amplitudeIndex, svkPlotLine::dataType, svkPlotLine::dcos, svkPlotLine::endPt, svkPlotLine::generatePolyData, svkPlotLine::invertPlots, svkPlotLine::maxValue, svkPlotLine::minValue, svkPlotLine::mirrorPlots, svkPlotLine::numComponents, svkPlotLine::numPoints, svkPlotLine::origin, svkPlotLine::plotAreaBounds, svkPlotLine::plotComponent, svkPlotLine::plotData, svkPlotLine::plotDirection, svkPlotLine::pointIndex, svkPlotLine::polyLinePoints, svkPlotLine::REAL, svkPlotLine::ROW_COLUMN, svkPlotLine::scale, svkPlotLine::spacing, and svkPlotLine::startPt.
~svkPlotLine | ( | ) |
Destructor.
References svkPlotLine::plotData.
|
protected |
Calls template method.
References svkPlotLine::dataPtr, svkPlotLine::dataType, and svkPlotLine::GeneratePolyDataTemplated().
Referenced by svkPlotLine::Modified(), svkPlotLine::SetGeneratePolyData(), and svkPlotLineGrid::Update().
void GeneratePolyDataTemplated | ( | T * | castDataPtr | ) |
Modifies the input point data array that represent the data. This method will transform the current plotData into the pointData array.
References svkPlotLine::amplitudeIndex, svkPlotLine::componentOffset, svkPlotLine::dcos, svkPlotLine::endPt, svkPlotLine::IMAGINARY, svkPlotLine::invertPlots, svkPlotLine::maxValue, svkPlotLine::minValue, svkPlotLine::mirrorPlots, svkPlotLine::numComponents, svkPlotLine::numPoints, svkPlotLine::origin, svkPlotLine::plotComponent, svkPlotLine::plotData, svkPlotLine::pointIndex, svkPlotLine::polyLinePoints, svkPlotLine::REAL, svkPlotLine::scale, svkPlotLine::spacing, and svkPlotLine::startPt.
Referenced by svkPlotLine::GeneratePolyData().
double * GetBounds | ( | ) |
Returns the bounds of the line.
References svkPlotLine::plotAreaBounds.
float * GetDataPoints | ( | ) |
Get the vtkPoints object used by this class
References svkPlotLine::polyLinePoints.
void GetDcos | ( | double | dcos[3][3] | ) |
Get Dcos
bool GetGeneratePolyData | ( | ) |
Set to true if you want the poly data to be regenerating when modifying.
References svkPlotLine::generatePolyData.
double * GetOrigin | ( | ) |
Gets the origin,
References svkPlotLine::origin.
double * GetSpacing | ( | ) |
Get Spacing
References svkPlotLine::spacing.
void Modified | ( | ) |
The data has been modified so lets update the polyData.
References svkPlotLine::generatePolyData, and svkPlotLine::GeneratePolyData().
Referenced by svkPlotLine::SetComponent(), svkPlotLine::SetData(), svkPlotLine::SetDataPoints(), svkPlotLine::SetDcos(), svkPlotLine::SetInvertPlots(), svkPlotLine::SetMirrorPlots(), svkPlotLine::SetOrigin(), svkPlotLine::SetPlotDirection(), svkPlotLine::SetPointRange(), svkPlotLine::SetSpacing(), and svkPlotLine::SetValueRange().
|
static |
|
protected |
Recalculates the bounds of the the object
References svkPlotLine::dcos, svkPlotLine::origin, svkPlotLine::plotAreaBounds, and svkPlotLine::spacing.
Referenced by svkPlotLine::SetOrigin(), and svkPlotLine::SetSpacing().
|
protected |
Recalculates the scale based on the spacing and the ranges
References svkPlotLine::amplitudeIndex, svkPlotLine::endPt, svkPlotLine::maxValue, svkPlotLine::minValue, svkPlotLine::pointIndex, svkPlotLine::scale, svkPlotLine::spacing, and svkPlotLine::startPt.
Referenced by svkPlotLine::SetPlotDirection(), svkPlotLine::SetPointRange(), svkPlotLine::SetSpacing(), and svkPlotLine::SetValueRange().
void SetComponent | ( | PlotComponent | component | ) |
Set the component
References svkPlotLine::componentOffset, svkPlotLine::IMAGINARY, svkPlotLine::Modified(), svkPlotLine::plotComponent, and svkPlotLine::REAL.
void SetData | ( | vtkDataArray * | plotData | ) |
Set the Data Array to be plotted.
plotData | a vtkFloatArray that contains the data to be plotted |
References svkPlotLine::componentOffset, svkPlotLine::dataPtr, svkPlotLine::dataType, svkPlotLine::IMAGINARY, svkPlotLine::Modified(), svkPlotLine::numComponents, svkPlotLine::numPoints, svkPlotLine::plotComponent, svkPlotLine::plotData, and svkPlotLine::REAL.
Referenced by svkPlotLineGrid::UpdateDataArrays().
void SetDataPoints | ( | float * | polyLinePoints | ) |
Set the vtkPoints object that will be used by this class
References svkPlotLine::Modified(), and svkPlotLine::polyLinePoints.
Referenced by svkPlotLineGrid::SetPlotPoints().
void SetDcos | ( | vector< vector< double > > * | dcos | ) |
Set Dcos
References svkPlotLine::dcos, and svkPlotLine::Modified().
void SetGeneratePolyData | ( | bool | generatePolyData | ) |
Set to true if you want the poly data to be regenerated when modifying. As a side effect poly data will be generated if it is changed from false to true.
References svkPlotLine::generatePolyData, and svkPlotLine::GeneratePolyData().
Referenced by svkPlotLineGrid::SetPlotPoints(), and svkPlotLineGrid::Update().
void SetInvertPlots | ( | bool | invertPlots | ) |
References svkPlotLine::invertPlots, and svkPlotLine::Modified().
void SetMirrorPlots | ( | bool | mirrorPlots | ) |
References svkPlotLine::mirrorPlots, and svkPlotLine::Modified().
void SetOrigin | ( | double * | origin | ) |
Sets the origin
References svkPlotLine::Modified(), and svkPlotLine::RecalculatePlotAreaBounds().
void SetPlotDirection | ( | int | amplitudeDirection, |
int | plotDirection | ||
) |
void SetPointRange | ( | int | startPt, |
int | endPt | ||
) |
Set the start point and end point of the array to be plotted. This essentially sets the x-range.
startPt | the index of the first point to plot in the data array |
endPt | the index of the last point to plot in the data array |
References svkPlotLine::endPt, svkPlotLine::Modified(), svkPlotLine::numPoints, svkPlotLine::RecalculateScale(), and svkPlotLine::startPt.
void SetSpacing | ( | double * | spacing | ) |
Set Spacing
References svkPlotLine::Modified(), svkPlotLine::RecalculatePlotAreaBounds(), and svkPlotLine::RecalculateScale().
void SetValueRange | ( | double | minValue, |
double | maxValue | ||
) |
Set the value (Y) range of the data set to be plotted.
minValue | the minimum value you wish to plot |
maxValue | the maximum value you wish to plot |
References svkPlotLine::maxValue, svkPlotLine::minValue, svkPlotLine::Modified(), and svkPlotLine::RecalculateScale().
vtkTypeMacro | ( | svkPlotLine | , |
vtkObject | |||
) |
|
friend |
|
protected |
Which index should map to amplitude.
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::RecalculateScale(), svkPlotLine::SetPlotDirection(), and svkPlotLine::svkPlotLine().
|
protected |
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::SetComponent(), and svkPlotLine::SetData().
|
protected |
Referenced by svkPlotLine::GeneratePolyData(), and svkPlotLine::SetData().
|
protected |
Referenced by svkPlotLine::GeneratePolyData(), svkPlotLine::SetData(), and svkPlotLine::svkPlotLine().
|
protected |
The dcos of the dataset.
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::RecalculatePlotAreaBounds(), svkPlotLine::SetDcos(), and svkPlotLine::svkPlotLine().
|
protected |
The index of the last point in the plotData to be plotted.
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::RecalculateScale(), svkPlotLine::SetPointRange(), and svkPlotLine::svkPlotLine().
|
protected |
when modified should this object regenerate the poly data.
Referenced by svkPlotLine::GetGeneratePolyData(), svkPlotLine::Modified(), svkPlotLine::SetGeneratePolyData(), and svkPlotLine::svkPlotLine().
|
protected |
Should the plots be inverted?
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::SetInvertPlots(), and svkPlotLine::svkPlotLine().
|
protected |
The maximum value to be plotted.
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::RecalculateScale(), svkPlotLine::SetValueRange(), and svkPlotLine::svkPlotLine().
|
protected |
The minimum value to be plotted.
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::RecalculateScale(), svkPlotLine::SetValueRange(), and svkPlotLine::svkPlotLine().
|
protected |
Should the plots be flipped Left-Right?
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::SetMirrorPlots(), and svkPlotLine::svkPlotLine().
|
protected |
The number of components.
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::SetData(), and svkPlotLine::svkPlotLine().
|
protected |
The number of points in the plotData.
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::SetData(), svkPlotLine::SetPointRange(), and svkPlotLine::svkPlotLine().
|
protected |
Origin from which to start drawing the line.
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::GetOrigin(), svkPlotLine::RecalculatePlotAreaBounds(), and svkPlotLine::svkPlotLine().
|
protected |
The bounds in which the plot is to be placed.
Referenced by svkPlotLineGrid::CalculateTlcBrcBounds(), svkPlotLine::GetBounds(), svkPlotLine::RecalculatePlotAreaBounds(), and svkPlotLine::svkPlotLine().
|
protected |
Which component should we plot?
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::SetComponent(), svkPlotLine::SetData(), and svkPlotLine::svkPlotLine().
|
protected |
The data to be plotted.
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::SetData(), svkPlotLine::svkPlotLine(), and svkPlotLine::~svkPlotLine().
|
protected |
Referenced by svkPlotLine::svkPlotLine().
|
protected |
Which index should map to frequency/points.
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::RecalculateScale(), svkPlotLine::SetPlotDirection(), and svkPlotLine::svkPlotLine().
|
protected |
The points that make up the line.
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::GetDataPoints(), svkPlotLine::SetDataPoints(), and svkPlotLine::svkPlotLine().
|
protected |
the scale
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::RecalculateScale(), and svkPlotLine::svkPlotLine().
|
protected |
Size of the box to fill.
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::GetSpacing(), svkPlotLine::RecalculatePlotAreaBounds(), svkPlotLine::RecalculateScale(), and svkPlotLine::svkPlotLine().
|
protected |
The index of the first point in the plotData to be plotted.
Referenced by svkPlotLine::GeneratePolyDataTemplated(), svkPlotLine::RecalculateScale(), svkPlotLine::SetPointRange(), and svkPlotLine::svkPlotLine().