[VTK] Possible bug in clipVolume2 and clipVolume3 tests

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[VTK] Possible bug in clipVolume2 and clipVolume3 tests

Jon Haitz Legarreta
Hi there,
I was trying to execute the clipVolume2 example located in Filters\General\Testing\Python (using VTK 6.1.0). I translated the code into C++ for internal practical reasons. Please, find attached the source and CMakeLists.txt.

However, I'd dare to say that both clipVolume2 and clipVolume3 contain a bug. The compiler complains about the following statement:

  dataset->SetDataSet(sample->GetOutput());

The function SetDataSet expects a vtkDataSet * argument type and gets a vtkImageData * argument type.

I guess the Python examples fails at this point as well.

Is this a know bug or am I missing something?

Thank you,
JON HAITZ





_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

CMakeLists.txt (430 bytes) Download Attachment
clipVolume2.cxx (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [VTK] Possible bug in clipVolume2 and clipVolume3 tests

David Cole-2
> The compiler complains about the following statement:
>
>   dataset->SetDataSet(sample->GetOutput());
>
> The function SetDataSet expects a vtkDataSet * argument type and gets
> a vtkImageData * argument type.

Did you include "vtkImageData.h"? The vtkImageData class is a direct
subclass of vtkDataSet, so it should not be a problem.

HTH,
David C.

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: [VTK] Possible bug in clipVolume2 and clipVolume3 tests

Jon Haitz Legarreta
Hi David,
thanks.
That solves the issue.
Kind regards,
JON HAITZ



On 11 June 2014 13:45, David Cole <[hidden email]> wrote:
> The compiler complains about the following statement:
>
>   dataset->SetDataSet(sample->GetOutput());
>
> The function SetDataSet expects a vtkDataSet * argument type and gets
> a vtkImageData * argument type.

Did you include "vtkImageData.h"? The vtkImageData class is a direct
subclass of vtkDataSet, so it should not be a problem.

HTH,
David C.



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers