Commit 64974ce7 authored by Purves, Murray's avatar Purves, Murray
Browse files

Merge branch 'vtkchartwidget' of code.ornl.gov:jap/radix into vtkchartwidget

parents da27a878 a7d524b7
Pipeline #15674 passed with stages
in 8 minutes and 22 seconds
......@@ -5,6 +5,9 @@ stages:
.windows_before_script: &windows_before_script
before_script:
- set PATH=%PATH%;c:\vendors\mingw-w64\x86_64-4.8.5-posix-seh-rt_v4-rev0\mingw64\bin;c:\vendors\mingw-w64\qt\5.9.1\bin
.windows_msvc_before_script: &windows_msvc_before_script
before_script:
- set PATH=c:\Qt\5.9.1\msvc2013_64\bin;%PATH%;c:\Program Files (x86)\NSIS\Bin
mac_gcc_testing:
tags:
......@@ -13,14 +16,14 @@ mac_gcc_testing:
- which git
- git --version
- git clone https://github.com/lefebvre/TriBITS.git TriBITS
- module load cmake gcc/4.8.5
- module load cmake gcc/4.8.5 qt/5.9.1 vtk/8.1.0
- which cmake
- which python
- python --version
- python TriBITS/tribits/ci_support/clone_extra_repos.py
- mkdir build
- cd build
- cmake -DDEBUG_OUTPUT=1 -DBUILDNAME=$(uname -s)-GCC-4.8.5-Debug-${CI_BUILD_REF_NAME} -DCMAKE_BUILD_TYPE=DEBUG -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_radixplot=OFF -Dradix_ENABLE_radixwidgets=OFF ..
- cmake -DDEBUG_OUTPUT=1 -DBUILDNAME=$(uname -s)-GCC-4.8.5-Debug-${CI_BUILD_REF_NAME} -DCMAKE_BUILD_TYPE=DEBUG -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -DTPL_ENABLE_VTK=ON -Dradix_ENABLE_radixplot=OFF ..
- ctest -D ExperimentalStart -D ExperimentalBuild -D ExperimentalTest -DExperimentalMemCheck -D ExperimentalSubmit
mac_llvm_testing:
......@@ -30,14 +33,14 @@ mac_llvm_testing:
- which git
- git --version
- git clone https://github.com/lefebvre/TriBITS.git TriBITS
- module load cmake
- module load cmake qt/5.9.1 vtk/8.1.0
- which python
- python --version
- python TriBITS/tribits/ci_support/clone_extra_repos.py
- mkdir build
- cd build
- which cmake
- cmake -DDEBUG_OUTPUT=1 -DBUILDNAME=$(uname -s)-LLVM-Debug-${CI_BUILD_REF_NAME} -DCMAKE_BUILD_TYPE=DEBUG -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_radixplot=OFF -Dradix_ENABLE_radixwidgets=OFF ..
- cmake -DDEBUG_OUTPUT=1 -DBUILDNAME=$(uname -s)-LLVM-Debug-${CI_BUILD_REF_NAME} -DCMAKE_BUILD_TYPE=DEBUG -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -DTPL_ENABLE_VTK=ON -Dradix_ENABLE_radixplot=OFF ..
- ctest -D ExperimentalStart -D ExperimentalBuild -D ExperimentalTest -DExperimentalMemCheck -D ExperimentalSubmit
......@@ -53,10 +56,10 @@ linux_gcc_testing:
- python TriBITS/tribits/ci_support/clone_extra_repos.py
- mkdir build
- cd build
- module load cmake
- module load cmake qt/5.9.0 vtk/8.1.0
- which cmake
- module load valgrind
- cmake -DBUILDNAME=$(uname -s)-GCC-4.8.5-Release-${CI_BUILD_REF_NAME} -DCMAKE_BUILD_TYPE=Release -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_radixplot=OFF -Dradix_ENABLE_radixwidgets=OFF ..
- cmake -DBUILDNAME=$(uname -s)-GCC-4.8.5-Release-${CI_BUILD_REF_NAME} -DCMAKE_BUILD_TYPE=Release -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -DTPL_ENABLE_VTK=ON -Dradix_ENABLE_radixplot=OFF ..
- ctest -D ExperimentalStart -D ExperimentalBuild -D ExperimentalTest -D ExperimentalSubmit
linux_analysis:
......@@ -79,17 +82,6 @@ linux_analysis:
- ctest -D ExperimentalStart -D ExperimentalBuild -D ExperimentalTest -D ExperimentalMemCheck -D ExperimentalCoverage -D ExperimentalSubmit
allow_failure: true
linux_openmpi_testing:
tags:
- linux
script:
- which git
- git --version
- git clone https://github.com/lefebvre/TriBITS.git TriBITS
- which python
- python --version
- python TriBITS/tribits/ci_support/clone_extra_repos.py
linux_openmpi_testing:
tags:
- linux
......@@ -127,6 +119,7 @@ windows_mingw_testing:
windows_intel_shared_testing:
tags:
- nsmwin10
<<: *windows_msvc_before_script
script:
- 'call "c:/Program Files (x86)/Intel/Composer XE 2015/bin/ipsxe-comp-vars.bat" intel64 vs2013'
- where git
......@@ -138,5 +131,6 @@ windows_intel_shared_testing:
- git clone https://github.com/lefebvre/googletest googletest
- mkdir build
- cd build
- cmake -DBUILD_SHARED_LIBS=ON -DTPL_LAPACK_LIBRARIES=c:/vendors/intel/lapack/3.5.0/lib/lapack.lib -DTPL_BLAS_LIBRARIES=c:/vendors/intel/lapack/3.5.0/lib/blas.lib -DBUILDNAME=Windows-Intel-15-Release-%CI_BUILD_REF_NAME% -DCMAKE_C_COMPILER=icl -DCMAKE_CXX_COMPILER=icl -DCMAKE_BUILD_TYPE=RELEASE -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_radixplot=OFF -Dradix_ENABLE_radixwidgets=OFF -Dradix_ENABLE_radixglls=OFF -G "NMake Makefiles" ..
- SET VTK_DIR=c:\vendors\cl\vtk\8.1.0\
- cmake -Dradix_VERBOSE_CONFIGURE=ON -DBUILD_SHARED_LIBS=ON -DTPL_LAPACK_LIBRARIES=c:/vendors/intel/lapack/3.5.0/lib/lapack.lib\\\;c:/vendors/intel/lapack/3.5.0/lib/blas.lib -DBUILDNAME=Windows-Intel-15-Release-%CI_BUILD_REF_NAME% -DCMAKE_C_COMPILER=icl -DCMAKE_CXX_COMPILER=icl -DCMAKE_BUILD_TYPE=RELEASE -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -DTPL_ENABLE_VTK=ON -Dradix_ENABLE_radixplot=OFF -G "NMake Makefiles" ..
- ctest -D ExperimentalStart -D ExperimentalBuild -D ExperimentalTest -D ExperimentalSubmit
......@@ -32,9 +32,9 @@ vtkCxxSetObjectMacro(vtkPlotErrorBars, YAxis, vtkAxis);
//-----------------------------------------------------------------------------
vtkPlotErrorBars::vtkPlotErrorBars()
: ShiftScale(0.0, 0.0, 1.0, 1.0)
{
this->Pen = vtkSmartPointer<vtkPen>::New();
vtkPlot::ShiftScale = vtkRectd(0.0, 0.0, 1.0, 1.0);
this->Pen = vtkSmartPointer<vtkPen>::New();
this->Pen->SetWidth(2.0);
this->Brush = vtkSmartPointer<vtkBrush>::New();
......
......@@ -69,7 +69,7 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
* used by Plots that return more than one label.
*/
virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect,
int legendIndex);
int legendIndex) override;
//@{
/**
......@@ -84,24 +84,24 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
* Any other characters or unrecognized format tags are printed in the
* tooltip label verbatim.
*/
virtual void SetTooltipLabelFormat(const vtkStdString &label);
virtual vtkStdString GetTooltipLabelFormat();
virtual void SetTooltipLabelFormat(const vtkStdString &label) override;
virtual vtkStdString GetTooltipLabelFormat() override;
//@}
//@{
/**
* Sets/gets the tooltip notation style.
*/
virtual void SetTooltipNotation(int notation);
virtual int GetTooltipNotation();
virtual void SetTooltipNotation(int notation) override;
virtual int GetTooltipNotation() override;
//@}
//@{
/**
* Sets/gets the tooltip precision.
*/
virtual void SetTooltipPrecision(int precision);
virtual int GetTooltipPrecision();
virtual void SetTooltipPrecision(int precision) override;
virtual int GetTooltipPrecision() override;
//@}
/**
......@@ -110,7 +110,7 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
*/
virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos,
vtkIdType seriesIndex,
vtkIdType segmentIndex);
vtkIdType segmentIndex) override;
/**
* Function to query a plot for the nearest point to the specified coordinate.
......@@ -119,38 +119,39 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
*/
virtual vtkIdType GetNearestPoint(const vtkVector2f &point,
const vtkVector2f &tolerance,
vtkVector2f *location);
vtkVector2f *location) override;
/**
* Select all points in the specified rectangle.
*/
virtual bool SelectPoints(const vtkVector2f &min, const vtkVector2f &max);
virtual bool SelectPoints(const vtkVector2f &min,
const vtkVector2f &max) override;
/**
* Select all points in the specified polygon.
*/
virtual bool SelectPointsInPolygon(const vtkContextPolygon &polygon);
virtual bool SelectPointsInPolygon(const vtkContextPolygon &polygon) override;
//@{
/**
* Set the plot color
*/
virtual void SetColor(unsigned char r, unsigned char g, unsigned char b,
unsigned char a);
virtual void SetColor(double r, double g, double b);
virtual void GetColor(double rgb[3]);
unsigned char a) override;
virtual void SetColor(double r, double g, double b) override;
virtual void GetColor(double rgb[3]) override;
void GetColor(unsigned char rgb[3]);
//@}
/**
* Set the width of the line.
*/
virtual void SetWidth(float width);
virtual void SetWidth(float width) override;
/**
* Get the width of the line.
*/
virtual float GetWidth();
virtual float GetWidth() override;
//@{
/**
......@@ -189,29 +190,29 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
/**
* Set the label of this plot.
*/
virtual void SetLabel(const vtkStdString &label);
virtual void SetLabel(const vtkStdString &label) override;
/**
* Get the label of this plot.
*/
virtual vtkStdString GetLabel();
virtual vtkStdString GetLabel() override;
/**
* Set the plot labels, these are used for stacked chart variants, with the
* index referring to the stacking index.
*/
virtual void SetLabels(vtkStringArray *labels);
virtual void SetLabels(vtkStringArray *labels) override;
/**
* Get the plot labels. If this array has a length greater than 1 the index
* refers to the stacked objects in the plot. See vtkPlotBar for example.
*/
virtual vtkStringArray *GetLabels();
virtual vtkStringArray *GetLabels() override;
/**
* Get the number of labels associated with this plot.
*/
virtual int GetNumberOfLabels();
virtual int GetNumberOfLabels() override;
/**
* Get the label at the specified index.
......@@ -228,7 +229,7 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
/**
* Get the indexed labels array.
*/
virtual vtkStringArray *GetIndexedLabels();
virtual vtkStringArray *GetIndexedLabels() override;
/**
* Get the data object that the plot will draw.
......@@ -256,9 +257,9 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
* This is a convenience function to set the input table and the x, y column
* for the plot.
*/
virtual void SetInputData(vtkTable *table);
virtual void SetInputData(vtkTable *table) override;
virtual void SetInputData(vtkTable *table, const vtkStdString &xColumn,
const vtkStdString &yColumn);
const vtkStdString &yColumn) override;
void SetInputData(vtkTable *table, vtkIdType xColumn, vtkIdType yColumn);
virtual void SetInputData(vtkTable *table, const vtkStdString &xColumn,
const vtkStdString &yColumn,
......@@ -271,14 +272,14 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
/**
* Get the input table used by the plot.
*/
virtual vtkTable *GetInput();
virtual vtkTable *GetInput() override;
/**
* Convenience function to set the input arrays. For most plots index 0
* is the x axis, and index 1 is the y axis. The name is the name of the
* column in the vtkTable.
*/
virtual void SetInputArray(int index, const vtkStdString &name);
virtual void SetInputArray(int index, const vtkStdString &name) override;
//@{
/**
......@@ -298,7 +299,7 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
* If Selectable is false, then this method does nothing.
* \sa SetSelectable()
*/
virtual void SetSelection(vtkIdTypeArray *id);
virtual void SetSelection(vtkIdTypeArray *id) override;
vtkGetObjectMacro(Selection, vtkIdTypeArray);
//@}
......@@ -307,7 +308,7 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
* Get/set the X axis associated with this plot.
*/
vtkGetObjectMacro(XAxis, vtkAxis);
virtual void SetXAxis(vtkAxis *axis);
virtual void SetXAxis(vtkAxis *axis) override;
//@}
//@{
......@@ -315,7 +316,7 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
* Get/set the Y axis associated with this plot.
*/
vtkGetObjectMacro(YAxis, vtkAxis);
virtual void SetYAxis(vtkAxis *axis);
virtual void SetYAxis(vtkAxis *axis) override;
//@}
//@{
......@@ -334,7 +335,7 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
* See \a GetUnscaledInputBounds for more information.
*/
virtual void GetBounds(double bounds[4])
virtual void GetBounds(double bounds[4]) override
{
bounds[0] = bounds[1] = bounds[2] = bounds[3] = 0.0;
}
......@@ -363,7 +364,7 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
* The returned \a bounds are stored as (Xmin, Xmax, Ymin, Ymax).
*/
virtual void GetUnscaledInputBounds(double bounds[4])
virtual void GetUnscaledInputBounds(double bounds[4]) override
{
// Implemented here by calling GetBounds() to support plot
// subclasses that do no log-scaling or plot orientation.
......@@ -376,15 +377,16 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
* subclasses must add checks to avoid rebuilding of cache, unless necessary.
* Default implementation is empty.
*/
virtual void UpdateCache() {}
virtual void UpdateCache() override {}
//@{
/**
* A General setter/getter that should be overridden. It can silently drop
* options, case is important
*/
virtual void SetProperty(const vtkStdString &property, const vtkVariant &var);
virtual vtkVariant GetProperty(const vtkStdString &property);
virtual void SetProperty(const vtkStdString &property,
const vtkVariant &var) override;
virtual vtkVariant GetProperty(const vtkStdString &property) override;
//@}
protected:
......@@ -396,97 +398,6 @@ class VTKCHARTSCORE_EXPORT vtkPlotErrorBars : public vtkPlot
*/
vtkStdString GetNumber(double position, vtkAxis *axis);
/**
* This object stores the vtkPen that controls how the plot is drawn.
*/
vtkSmartPointer<vtkPen> Pen;
/**
* This object stores the vtkBrush that controls how the plot is drawn.
*/
vtkSmartPointer<vtkBrush> Brush;
/**
* This object stores the vtkPen that controls how the selected elements
* of the plot are drawn.
*/
vtkSmartPointer<vtkPen> SelectionPen;
/**
* This object stores the vtkBrush that controls how the selected elements
* of the plot are drawn.
*/
vtkSmartPointer<vtkBrush> SelectionBrush;
/**
* Plot labels, used by legend.
*/
vtkSmartPointer<vtkStringArray> Labels;
/**
* Holds Labels when they're auto-created
*/
vtkSmartPointer<vtkStringArray> AutoLabels;
/**
* Holds Labels when they're auto-created
*/
vtkSmartPointer<vtkStringArray> IndexedLabels;
/**
* Use the Y array index for the X value. If true any X column setting will be
* ignored, and the X values will simply be the index of the Y column.
*/
bool UseIndexForXSeries;
/**
* This data member contains the data that will be plotted, it inherits
* from vtkAlgorithm.
*/
vtkSmartPointer<vtkContextMapper2D> Data;
/**
* Whether plot points can be selected or not.
*/
bool Selectable;
/**
* Selected indices for the table the plot is rendering
*/
vtkIdTypeArray *Selection;
/**
* The X axis associated with this plot.
*/
vtkAxis *XAxis;
/**
* The X axis associated with this plot.
*/
vtkAxis *YAxis;
/**
* A printf-style string to build custom tooltip labels from.
* See the accessor/mutator functions for full documentation.
*/
vtkStdString TooltipLabelFormat;
/**
* The default printf-style string to build custom tooltip labels from.
* See the accessor/mutator functions for full documentation.
*/
vtkStdString TooltipDefaultLabelFormat;
int TooltipNotation;
int TooltipPrecision;
/**
* The current shift in origin and scaling factor applied to the plot.
*/
vtkRectd ShiftScale;
bool LegendVisibility;
private:
vtkPlotErrorBars(const vtkPlotErrorBars &) = delete;
void operator=(const vtkPlotErrorBars &) = delete;
......
......@@ -75,8 +75,8 @@ bool vtkPlotLineErrorBars::Paint(vtkContext2D *painter)
// render from last good point to one before this bad point
if (id - lastGood > 1)
{
int start = lastGood;
int numberOfPoints = id - start;
int start = int(lastGood);
int numberOfPoints = int(id) - start;
if (this->PolyLine)
{
painter->DrawPoly(points + pointSize * start, numberOfPoints);
......@@ -111,8 +111,8 @@ bool vtkPlotLineErrorBars::PaintLegend(vtkContext2D *painter,
const vtkRectf &rect, int)
{
painter->ApplyPen(this->Pen);
painter->DrawLine(rect[0], rect[1] + 0.5 * rect[3], rect[0] + rect[2],
rect[1] + 0.5 * rect[3]);
painter->DrawLine(float(rect[0]), float(rect[1] + 0.5f * rect[3]),
float(rect[0] + rect[2]), float(rect[1] + 0.5f * rect[3]));
this->Superclass::PaintLegend(painter, rect, 0);
return true;
}
......
......@@ -184,10 +184,10 @@ bool vtkPlotPointsErrorBars::Paint(vtkContext2D *painter)
float width = this->MarkerSize;
if (width < 0.0f)
{
width = this->Pen->GetWidth() * 2.3;
if (width < 8.0)
width = this->Pen->GetWidth() * 2.3f;
if (width < 8.0f)
{
width = 8.0;
width = 8.0f;
}
}
......@@ -212,7 +212,7 @@ bool vtkPlotPointsErrorBars::Paint(vtkContext2D *painter)
if (id - lastGood > 0)
{
// Draw lines for error bars
PaintErrorBars(painter, points + 2 * (lastGood), id - lastGood);
PaintErrorBars(painter, points + 2 * (lastGood), int(id - lastGood));
}
lastGood = id + 1;
bpIdx++;
......@@ -221,7 +221,7 @@ bool vtkPlotPointsErrorBars::Paint(vtkContext2D *painter)
else
{
// draw all of the error bars
PaintErrorBars(painter, points, this->Points->GetNumberOfPoints());
PaintErrorBars(painter, points, int(this->Points->GetNumberOfPoints()));
}
}
......@@ -257,9 +257,10 @@ bool vtkPlotPointsErrorBars::Paint(vtkContext2D *painter)
// render from last good point to one before this bad point
if (id - lastGood > 0)
{
painter->DrawMarkers(
this->MarkerStyle, false, points + 2 * (lastGood), id - lastGood,
colors ? colors + 4 * (lastGood) : nullptr, nColorComponents);
painter->DrawMarkers(this->MarkerStyle, false,
points + 2 * (lastGood), int(id - lastGood),
colors ? colors + 4 * (lastGood) : nullptr,
nColorComponents);
}
lastGood = id + 1;
bpIdx++;
......@@ -269,7 +270,7 @@ bool vtkPlotPointsErrorBars::Paint(vtkContext2D *painter)
{
// draw all of the points
painter->DrawMarkers(this->MarkerStyle, false, points,
this->Points->GetNumberOfPoints(), colors,
int(this->Points->GetNumberOfPoints()), colors,
nColorComponents);
}
}
......@@ -296,21 +297,21 @@ bool vtkPlotPointsErrorBars::Paint(vtkContext2D *painter)
vtkDebugMacro(<< "Selection set " << this->Selection->GetNumberOfTuples());
painter->GetPen()->SetColor(this->SelectionPen->GetColor());
painter->GetPen()->SetOpacity(this->SelectionPen->GetOpacity());
painter->GetPen()->SetWidth(width + 2.7);
painter->GetPen()->SetWidth(width + 2.7f);
if (this->MarkerStyle == VTK_MARKER_NONE)
{
painter->DrawMarkers(
VTK_MARKER_PLUS, false,
static_cast<float *>(this->SelectedPoints->GetVoidPointer(0)),
this->SelectedPoints->GetNumberOfTuples());
int(this->SelectedPoints->GetNumberOfTuples()));
}
else
{
painter->DrawMarkers(
this->MarkerStyle, true,
static_cast<float *>(this->SelectedPoints->GetVoidPointer(0)),
this->SelectedPoints->GetNumberOfTuples());
int(this->SelectedPoints->GetNumberOfTuples()));
}
}
......@@ -323,10 +324,10 @@ bool vtkPlotPointsErrorBars::PaintLegend(vtkContext2D *painter,
{
if (this->MarkerStyle)
{
float width = this->Pen->GetWidth() * 2.3;
if (width < 8.0)
float width = this->Pen->GetWidth() * 2.3f;
if (width < 8.0f)
{
width = 8.0;
width = 8.0f;
}
painter->ApplyPen(this->Pen);
painter->ApplyBrush(this->Brush);
......@@ -358,12 +359,12 @@ void vtkPlotPointsErrorBars::PaintErrorBars(vtkContext2D *painter,
for (int i = 0; i < n; ++i)
{
float thisX = points[2 * i], thisY = points[2 * i + 1];
float capLengthX = (this->GetXAxis()->GetMaximum() -
this->GetXAxis()->GetMinimum()) /
100,
capLengthY = (this->GetYAxis()->GetMaximum() -
this->GetYAxis()->GetMinimum()) /
100;
float capLengthX = float(this->GetXAxis()->GetMaximum() -
this->GetXAxis()->GetMinimum()) /
100.f,
capLengthY = float(this->GetYAxis()->GetMaximum() -
this->GetYAxis()->GetMinimum()) /
100.f;
if (XErrors && XErrors->GetNumberOfValues() > i)
{
......@@ -464,7 +465,7 @@ void vtkPlotPointsErrorBars::CreateSortedPoints()
vtkIdType n = this->Points->GetNumberOfPoints();
vtkVector2f *data =
static_cast<vtkVector2f *>(this->Points->GetVoidPointer(0));
this->Sorted = new VectorPIMPL(data, n);
this->Sorted = new VectorPIMPL(data, size_t(n));
std::sort(this->Sorted->begin(), this->Sorted->end(), compVector3fX);
}
}
......@@ -590,7 +591,7 @@ bool vtkPlotPointsErrorBars::SelectPointsInPolygon(
double point[3];
this->Points->GetPoint(pointId, point);
if (polygon.Contains(vtkVector2f(point[0], point[1])))
if (polygon.Contains(vtkVector2f(float(point[0]), float(point[1]))))
{
this->Selection->InsertNextValue(pointId);
}
......@@ -610,7 +611,7 @@ void SetBadPoints(T *data, vtkIdType n, std::set<vtkIdType> &bad)
{
for (vtkIdType i = 0; i < n; ++i)
{
if (vtkMath::IsInf(data[i]) || vtkMath::IsNan(data[i]))
if (vtkMath::IsInf(double(data[i])) || vtkMath::IsNan(double(data[i])))
{
bad.insert(i);
}
......@@ -754,12 +755,9 @@ template <typename A>
void CopyToXErrors(vtkFloatArray *xErrors, A *a, int n, const vtkRectd &ss)
{
xErrors->Initialize();
// xErrors->SetNumberOfComponents(n);
// float *data = static_cast<float *>(xErrors->GetVoidPointer(0));
for (int i = 0; i < n; ++i)
{
xErrors->InsertNextValue(static_cast<float>((a[i] + ss[0]) * ss[2]));
// data[i] = static_cast<float>((a[i] + ss[0]) * ss[2]);
}
}
......@@ -768,12 +766,9 @@ template <typename A>
void CopyToYErrors(vtkFloatArray *yErrors, A *a, int n, const vtkRectd &ss)
{
yErrors->Initialize();
// yErrors->SetNumberOfComponents(n);
// float *data = static_cast<float *>(yErrors->GetVoidPointer(0));
for (int i = 0; i < n; ++i)
{
yErrors->InsertNextValue(static_cast<float>((a[i] + ss[1]) * ss[3]));
// data[i] = static_cast<float>((a[i] + ss[1]) * ss[3]);
}
}
......@@ -843,9 +838,9 @@ bool vtkPlotPointsErrorBars::UpdateTableCache(vtkTable *table)
{
switch (y->GetDataType())
{
vtkTemplateMacro(CopyToPoints(this->Points,
static_cast<VTK_TT *>(y->GetVoidPointer(0)),
y->GetNumberOfTuples(), this->ShiftScale));
vtkTemplateMacro(CopyToPoints(
this->Points, static_cast<VTK_TT *>(y->GetVoidPointer(0)),
int(y->GetNumberOfTuples()), this->ShiftScale));