Closed GoogleCodeExporter closed 8 years ago
Just checked that it compiles fine with a custom installed vtk-5.10.
A compilation with vtk-5.8 would nevertheless be desirable as it simplifies
building under Ubuntu 12.04 considerably.
Original comment by martin.f...@gmail.com
on 8 Nov 2012 at 1:01
Could you try this patch? It should resolve the issue.
Original comment by arnaud.barre
on 8 Nov 2012 at 1:37
Attachments:
Not quite working. I now get the following error:
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.cpp: In member
function ‘virtual void btk::VTKAxis::AutoScale()’:
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.cpp:202:30: error: no
matching function for call to ‘btk::VTKAxis::SetRange(double&, double&)’
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.cpp:202:30: note:
candidate is:
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.h:81:18: note: virtual
void btk::VTKAxis::SetRange(double*)
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.h:81:18: note:
candidate expects 1 argument, 2 provided
make[2]: *** [Code/VisSupport/VTK/CMakeFiles/BTKVTK.dir/btkVTKAxis.cpp.o] Error
1
make[1]: *** [Code/VisSupport/VTK/CMakeFiles/BTKVTK.dir/all] Error 2
I tried to use a quick fix to replace /Code/VisSupport/VTK/btkVTKAxis.cpp:202
this->SetRange(min, max);
with
double range[2];
range[0] = min;
range[1] = max;
this->SetRange(range);
but this gave me additional errors:
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp: In
member function ‘void btk::VTKChartTimeSeries::SetBounds(double*)’:
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp:164:98:
error: no matching function for call to ‘btk::VTKAxis::SetRange(double,
double)’
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp:164:98:
note: candidate is:
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.h:81:18: note: virtual
void btk::VTKAxis::SetRange(double*)
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.h:81:18: note:
candidate expects 1 argument, 2 provided
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp:165:98:
error: no matching function for call to ‘btk::VTKAxis::SetRange(double,
double)’
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp:165:98:
note: candidate is:
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.h:81:18: note: virtual
void btk::VTKAxis::SetRange(double*)
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.h:81:18: note:
candidate expects 1 argument, 2 provided
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp: In
member function ‘virtual bool
btk::VTKChartTimeSeries::MouseButtonReleaseEvent(const
vtkContextMouseEvent&)’:
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp:884:58:
error: no matching function for call to ‘btk::VTKAxis::SetRange(float&,
float&)’
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp:884:58:
note: candidate is:
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.h:81:18: note: virtual
void btk::VTKAxis::SetRange(double*)
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.h:81:18: note:
candidate expects 1 argument, 2 provided
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp:885:58:
error: no matching function for call to ‘btk::VTKAxis::SetRange(float&,
float&)’
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp:885:58:
note: candidate is:
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.h:81:18: note: virtual
void btk::VTKAxis::SetRange(double*)
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.h:81:18: note:
candidate expects 1 argument, 2 provided
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp: In
constructor ‘btk::VTKChartTimeSeries::VTKChartTimeSeries()’:
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp:992:38:
error: no matching function for call to ‘btk::VTKAxis::SetRange(double,
double)’
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp:992:38:
note: candidate is:
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.h:81:18: note: virtual
void btk::VTKAxis::SetRange(double*)
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.h:81:18: note:
candidate expects 1 argument, 2 provided
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp:994:38:
error: no matching function for call to ‘btk::VTKAxis::SetRange(double,
double)’
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKChartTimeSeries.cpp:994:38:
note: candidate is:
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.h:81:18: note: virtual
void btk::VTKAxis::SetRange(double*)
/spare1/mfelis/temp/btkhg/Code/VisSupport/VTK/btkVTKAxis.h:81:18: note:
candidate expects 1 argument, 2 provided
make[2]: ***
[Code/VisSupport/VTK/CMakeFiles/BTKVTK.dir/btkVTKChartTimeSeries.cpp.o] Error 1
make[1]: *** [Code/VisSupport/VTK/CMakeFiles/BTKVTK.dir/all] Error 2
Original comment by martin.f...@gmail.com
on 8 Nov 2012 at 2:02
I tried to add the missing SetRange function:
void VTKAxis::SetRange(double min, double max)
{
this->SetMinimum(min);
this->SetMaximum(max);
};
which fixed the other errors but now I have a new one which I do not know how
to fix:
/spare1/mfelis/temp/btkhg/Tools/Mokka/ChartWidget.cpp: In member function
‘void ChartWidget::refreshPlots()’:
/spare1/mfelis/temp/btkhg/Tools/Mokka/ChartWidget.cpp:297:14: error: ‘class
vtkAxis’ has no member named ‘GetRange’
/spare1/mfelis/temp/btkhg/Tools/Mokka/ChartWidget.cpp:298:14: error: ‘class
vtkAxis’ has no member named ‘GetRange’
/spare1/mfelis/temp/btkhg/Tools/Mokka/ChartWidget.cpp:303:29: error: no
matching function for call to ‘vtkAxis::SetRange(double [2])’
/spare1/mfelis/temp/btkhg/Tools/Mokka/ChartWidget.cpp:303:29: note: candidate
is:
/usr/include/vtk-5.8/vtkAxis.h:117:16: note: virtual void
vtkAxis::SetRange(double, double)
/usr/include/vtk-5.8/vtkAxis.h:117:16: note: candidate expects 2 arguments, 1
provided
/spare1/mfelis/temp/btkhg/Tools/Mokka/ChartWidget.cpp:305:31: error: no
matching function for call to ‘vtkAxis::SetRange(double [2])’
/spare1/mfelis/temp/btkhg/Tools/Mokka/ChartWidget.cpp:305:31: note: candidate
is:
/usr/include/vtk-5.8/vtkAxis.h:117:16: note: virtual void
vtkAxis::SetRange(double, double)
/usr/include/vtk-5.8/vtkAxis.h:117:16: note: candidate expects 2 arguments, 1
provided
make[2]: *** [Tools/Mokka/CMakeFiles/Mokka.dir/ChartWidget.cpp.o] Error 1
make[1]: *** [Tools/Mokka/CMakeFiles/Mokka.dir/all] Error 2
make: *** [all] Error 2
Original comment by martin.f...@gmail.com
on 8 Nov 2012 at 2:07
Is it possible that the patch didn't work correctly?
The methods btk::VTKAxis::SetRange and btk::VTKAxis::GetRange are in the
proposed patch.
After applying the patch, they should be declared in btkVTKAxis.h (line
~80) and defined in the file btkVTKAxis.cpp (line ~505).
Original comment by arnaud.barre
on 8 Nov 2012 at 2:12
Yes the patch introduces the function VTKAxis::SetRange, however only taking a
double array of length 2 and not the variant that takes two separate doubles.
Original comment by martin.f...@gmail.com
on 9 Nov 2012 at 8:32
The method SetRange(double, double) is already implemented in the class
vtkAxis with VTK 5.8 (
http://www.vtk.org/doc/release/5.8/html/a00197.html#b08b3a09494df12959043e516eb0
6549).
Did you have any warnings during the compilation? Like a shadow
declaration? Maybe a "using vtkAxis::SetRange;" is missing just before the
declaration of SetRange in the btkVTKAxis.h (line 81). Can you add it and
see if it works?
Original comment by arnaud.barre
on 9 Nov 2012 at 9:56
I do not have a warning about shadowed declarations. Also I am compiling
everything in a new directory.
Line 81 int btkVTKAxis.h reads for me:
virtual void SetRange(double range[2]);
Line 117 of vtkAxis.h that comes with the vtk-5.8 package lists the proper
function declaration:
virtual void SetRange(double minimum, double maximum);
It seems somehow that btk::VTKAxis does not properly inherit this function from
vtkAxis.
Original comment by martin.f...@gmail.com
on 12 Nov 2012 at 1:03
Original issue reported on code.google.com by
martin.f...@gmail.com
on 8 Nov 2012 at 12:58