[Paraview] Volume reader
Sébastien Lasserre
sebastien.lasserre at epfl.ch
Mon Feb 22 09:15:40 EST 2010
Hello everyone,
I am trying to write a VTK reader to read custom volumetric data into Paraview.
I started with the example vtkImageAlgorithm
(http://www.itk.org/Wiki/VTK_Examples_vtkImageAlgorithm_Filter) and
changed it so the Filter doesn't take any input and output a
vtkImageData.
To simplify, I generate a vtkImageData with constant values in the
RequestData method of my filter and assign it to the output using
output->ShallowCopy(imageData) at the end of the method.
When I tried to use this reader as plugin in Paraview, the views
(Outline, Volume) of the data are not working because the dimension of
the vtkImageData are null.
I tried to use the same filter in a VTK code. The output has a
dimension and I can print the content of the vtkImageData. If I add a
Outline actor, I am able to see the extend of the data but if I attach
a Volume actor, I get this error during the runtime :
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
If I copy the content of the output into a new vtkImageData, then I am
able to see the data using the Volume Actor and I don't get anymore
the error.
Did I forget something while declaring my filter ?
I attached the header and implementation file of my filter and the
main.cxx for the VTK test.
I am using Paraview 3.7.0 on Ubuntu 9.10.
Thanks for your help,
Sebastien
Aborted
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkImageAlgorithmFilter.h
Type: text/x-chdr
Size: 671 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100222/ed836e7c/attachment-0001.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkImageAlgorithmFilter.cxx
Type: text/x-c++src
Size: 1941 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100222/ed836e7c/attachment-0002.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cxx
Type: text/x-c++src
Size: 4086 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100222/ed836e7c/attachment-0003.cxx>
More information about the ParaView
mailing list