[vtkusers] bug in vtkXMLWriterC_SetCellsWithTypes ?

Frédéric Petit fredmfp at gmail.com
Wed Feb 21 16:42:54 EST 2007


2007/2/21, Mathieu Malaterre <mathieu.malaterre at kitware.com>:
>
> fred wrote:
> > Hi,
> >
> > In vtkXMLWriterC.h, vtkXMLWriterC_SetCellsWithTypes is declared as
> >
> > void vtkXMLWriterC_SetCellsWithTypes(vtkXMLWriterC* self,
> >                                     int* cellTypes, vtkIdType ncells,
> >                                     vtkIdType* cells, vtkIdType
> cellsSize);
> >
> > I think the last argument should be read vtkIdType* cellsSize instead of
> > vtkIdType cellsSize, because if cells could have different type, they
> > should have
> > different size.
> >
> > Could someone confirm ? And fix, please ?
>
>
> I am not sure I understand your issue here. Could you please provide an
> example that demonstrate the problem.


Hi,
I can't give you example now (not on my computer).
But simply say that we have some VTK_QUAD (4 points) and VTK_VOXEL (8
points)
cells.

As cellTypes is a pointer, there is no problem:
cellTypes = [VTK_QUAD VTK_QUAD ... VTK_VOXEL VTK_VOXEL]

The problem comes from cellsSize, which is not a pointer but a
integer. So, as my cells have different size, how can I put these sizes
in vtkXMLWriterC_SetCellsWithTypes ?


I would suggest looking at the documentation of vtkCellArray and an
> example such as otherCellArray:
>
> VTK/Filtering/Testing/Cxx/otherCellArray.cxx


Ok, I'll look at asap.

Cheers,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070221/0544607a/attachment.htm>


More information about the vtkusers mailing list