[vtkusers] can't update contourFilter unless i do contourFilter->SetValue(, )

Liam Kurmos quantum.leaf at googlemail.com
Mon Jun 14 11:27:41 EDT 2010

Many Thanks Bill and Seb,

calling Modified() on the filter solves the problem.

I didn't know about this function or the need to call it.
I thought there was only need to call update on the last object and
when this didnt work i started calling update on everything else.

Thanks for setting me straight.

Incidentally, at least in my version of the Guild (for v5.0.2) there
doesn't see to be much on modified, lookup in the index gave me a few
obscure lines saying it modifies the time stamp on an object. Whilst
in hindsight this makes sense it doesn't give much indication to the
novice that this is required to successfully update the pipeline.
(ps. it possible that this is covered somewhere in the text and i
havent found it)

just feedback,


On Mon, Jun 14, 2010 at 12:55 PM, Sebastien Jourdain
<sebastien.jourdain at kitware.com> wrote:
> What I meant was not related to make an update call on all your
> pipeline objects, because this is not required at all. If you do it on
> the last object all the pipeline will be updated automatically if it
> needed it.
> Therefore, as I understand, after you changed the data, it does not
> recompute the pipeline.
> So it means, you didn't tell VTK that the data have changed....
> You should call a methods like this.
> vFrame->vol->Modified();
> renWin->Render();
> Seb
> On Mon, Jun 14, 2010 at 4:50 AM, Liam Kurmos
> <quantum.leaf at googlemail.com> wrote:
>> Thank Seb,
>> I am not observing this.
>> The contourActor below is unmodified without the contourFilter->SetValue() call.
>> my method is:
>>               vFrame->reinitField();//after this the vtkImageData is modified
>>              //try updating things
>>               vFrame->vol->Update();
>>               vFrame->contourFilter->Update();
>>               vFrame->contourFilter->GetOutput()->Update();
>>               vFrame->contourActor->GetMapper()->GetInput()->Update();
>>               //remove works but add it back and it is not updated
>>               vFrame->ren1->RemoveActor(vFrame->contourActor);
>>               vFrame->ren1->AddActor(vFrame->contourActor);
>>               //as a work around i can set the iso value to
>> something else and then set it back.
>>               vFrame->contourFilter->SetValue(0,newVal);
>>               vFrame->contourFilter->SetValue(0,origVal)
>>              renWin->Render();
>> without the SetValue() call the vtkActor is not being updated. I have
>> a work around for now, later today i will try to make a simple example
>> of this and if it persits file a bug report.
>> Liam
>> _______________________________________________
>> 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