[vtkusers] vtkPolyDataAlgorithm's Update() method

Isidro Moreno morenoisidro at yahoo.com.ar
Sat Jun 9 08:51:36 EDT 2007


Hi Bernard!

Thanks! It worked! I'm a newbe, so..

Is there any criterion to use Update()? If I can draw the line without using
it, why must I call Update to know the dataset structure, like num of cells?

----- Original Message ----- 
From: "Bernard Giroux" <giroux at geo.polymtl.ca>
To: "Isidro Moreno" <morenoisidro at yahoo.com.ar>
Cc: <vtkusers at vtk.org>
Sent: Friday, June 08, 2007 5:52 PM
Subject: Re: [vtkusers] Get number of cells


> Isidro Moreno a écrit :
>> Hi! Here's the situation:
>>  vtkLineSource *line->vtkLineSource::New();
>> vtkPolyData *polydata->vtkPolyData::New();
>> ...
>> ...
>> polydata=line->GetOutput();
>> int nofc;
>> nofc=polydata->GetNumberOfCells();
>>  1st) Why "GetNumberOfCells()" returns 0 ? ("line" it's just a straight 
>> line).
>
> Hi Isidoro,
>
> Make sure you call line->Update() _before_ GetOutput()...
>
>
>> 2st) polydata=line->GetOutput(): Is it the correct way to copy 
>> vtkPolyData? I've tried ShallowCopy() and DeepCopy(), but nothing 
>> happened.
>>  I'm using vtk 5.0, thanks everybody!!
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> This is the private VTK discussion list. Please keep messages on-topic. 
>> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
> -- 
> Bernard Giroux, ing., Ph.D.
> Chercheur
>
> http://geo.polymtl.ca/~giroux
> 




More information about the vtkusers mailing list