[vtkusers] update unstructured grid

Dominik Szczerba domi at vision.ee.ethz.ch
Fri Sep 29 11:50:31 EDT 2006


what do you mean by not correct results. I once had a similar problem 
which turned out to be merely an error in cell id numbering (my cell 
id's didnt match those of vtk and resulting coloring seemed random)
--DS

Naim wrote:
> Hi Olivier,
> 
> I try it, but the results still the same.
> I try also calling Modified() and/or Update() functions for all pipeline
> objects, it still not working. May be there is a bug when we update an
> unstructured grid 's scalars inside the pipeline connections (sources,
> filters and mappers).
> 
> Thank you.
> 
> Naim Himrane
> Electromagneticworks Inc.
> 
> -----Original Message-----
> From: Olivier Feys [mailto:olivier.feys at gmail.com] 
> Sent: September 29, 2006 5:01 AM
> To: Naim
> Cc: vtkusers at public.kitware.com
> Subject: Re: [vtkusers] update unstructured grid
> 
> 
> try
> 
> pUnstructuredGrid->Modified()
> 
> Naim wrote:
>> Hi vtkUsers,
>>
>> I need help how to update an unstructured grid?
>>
>> I change the scalars and I call "update" and/or "modified" functions, 
>> but the results are wrong.
>>
>> I create pScalars (vtkDoubleArray)
>>
>> pUnstructuredGrid->GetPointData()->SetScalars(pScalars);
>>
>> .
>>
>> I show the plot. The plot is fine.
>>
>> I change the scalars like this:
>>
>> for(long i = 0; i < Size; ++i)
>>
>> {
>>
>> aNodeValue = pPlotData[i]; // new scalars data
>>
>> pScalars->SetValue(i, aNodeValue);
>>
>> }
>>
>> pScalars->Update(); // or pScalars->Modified();
>>
>> pUnstructuredGrid->GetPointData()->SetScalars(pScalars);
>>
>> .
>>
>> I show the plot but the results are not correct.
>>
>> Please any idea.
>>
>> //Naim Himrane//////
>>
>> //Electromagneticworks Inc.//
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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
>>   
> 
> _______________________________________________
> 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

-- 
Dominik Szczerba, Ph.D.
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi



More information about the vtkusers mailing list