[vtkusers] update unstructured grid
Naim
naim at electromagneticworks.com
Tue Oct 3 10:45:03 EDT 2006
Yes John I did it in my Lut.
vtkLookupTable* pLut =
(vtkLookupTable*)this->Actor->GetMapper()->GetLookupTable();
pLut->SetTableRange(NewMinValue, NewMaxValue);
pLut->Modified();
Thanks.
Naim Himrane
Electromagneticworks Inc.
-----Original Message-----
From: John Platt [mailto:jcplatt at dsl.pipex.com]
Sent: September 29, 2006 7:00 PM
To: 'Naim'
Cc: vtkusers at vtk.org
Subject: RE: [vtkusers] update unstructured grid
I change the scalars in a UGrid all the time so I would be surprised if
you have hit a bug.
Have you updated the scalar range in your LUT or mapper?
John.
-----Original Message-----
From: vtkusers-bounces+jcplatt=dsl.pipex.com at vtk.org
[mailto:vtkusers-bounces+jcplatt=dsl.pipex.com at vtk.org] On Behalf Of
Naim
Sent: 29 September 2006 17:55
To: 'Dominik Szczerba'
Cc: vtkusers at public.kitware.com
Subject: RE: [vtkusers] update unstructured grid
Exactly, the results coloring are random.
I have 5 steps to plot my model. When I plot one by one step creating
again
the unstructured grid, all plots are correct (color), but when I do it
on
the loop by changing just the scalars values and update my unstructured
grid, the coloring results are not the same.
Naim Himrane
Electromagneticworks Inc.
1 Provost street, Suite 305
Montreal, Quebec H8S 4H2
Canada
Phone: (514) 634-9797
-----Original Message-----
From: Dominik Szczerba [mailto:domi at vision.ee.ethz.ch]
Sent: September 29, 2006 11:51 AM
To: Naim
Cc: 'Olivier Feys'; vtkusers at public.kitware.com
Subject: Re: [vtkusers] update unstructured grid
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
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061003/801739c1/attachment.htm>
More information about the vtkusers
mailing list