[vtkusers] Does anybody know how to use vtkIdType in Python?

David Gobbi david.gobbi at gmail.com
Mon Jan 11 09:13:36 EST 2010


Hi Youbing,

For the second parameter for InsertNextCell() use a vtkIdList, not a
vtkIdType.  But as for for vtkIdType, it's just a typedef as Jerome
says.  In Python, you can use a python "int" or "long" for vtkIdType.

   David

On Mon, Jan 11, 2010 at 7:10 AM, Jérôme <jerome.velut at gmail.com> wrote:
> Hi,
>
> In python, as far as I remember, the type of the data is given by the first
> affectation. And in vtkType.h,
> vtkIdType is a simple c++ define of int (basically speaking. It seems to
> handle 64/32 integer cases.).
> I think you should not have to give such a type to your "id"...
>
> Can you be more precise about your problem? eg giving code, error messages,
> etc. ?
>
> Jerome
>
> 2010/1/11 Youbing Zhao <zhaoyoubing at gmail.com>
>>
>> Dear Guys,
>>
>> I'm try to call vtkPolyData.InsertNextCell(1, id) in Python which requires
>> a vtkIdType variable as the second input.
>>
>> But I have no idea of setup a vtkIdType variable. I tried vtk.vtkIdType,
>> but it's not in the module.
>>
>> Does anybody has the experience?
>>
>> Thank you very much
>>
>> Youbing
>>
>> _______________________________________________
>> 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
>>
>
>
> _______________________________________________
> 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
>
>



More information about the vtkusers mailing list