[vtkusers] vtkExtractionSelection update when input is modified?

Martin Puttke puttke at langer-emv.de
Wed Mar 19 20:18:06 EDT 2014


it seems like my code was not included in the mail, so i resend it:

vtkUnstructuredGrid* pVTKVolume = vtkUnstructuredGrid::New();
//... setup the Volume

// create the selection filter
vtkExtractionSelection* m_pVisibilityFilter = vtkExtractSelection::New();
vtkSelection* pVisibilitySelection = vtkSelection::New();
// ... setup the selection

m_pVisibilityFilter->SetInputData(0, pVTKVolume2);
m_pVisibilityFilter->SetInputData(1, pVisibilitySelection);

// Get Output of the Selection
m_pDataSet = 
vtkUnstructuredGrid::SafeDownCast(m_pVisibilityFilter->GetOutput());
m_pVisibilityFilter->Update();

//... visualize it

// modify input
pVTKVolume->SetPointData()->GetScalars()->SetArray(...);

// make the filter run again
pVTKVolume->Modified(); // this should help, but it doesn't
m_pVisibilityFilter->Update(); // does it

Martin

On 19.03.2014 21:08, mputtke wrote:
> Hello folks,
>
> i have a vtkUnstructuredGrid connected to a vtkExtractionSelection as input.
> It works fine, but now i want it to run automatically when the input alters.
> So i alter the input grid and call Modified() on it.
>
> In my unterstanding this should be enough to make the vtkExtractionSelection
> run again, but it seems not. i have to call Update() on the
> vtkExtractionSelection manually for that.
>
> Some code excerpt:
>
>
> Without the vtkExtractionSelection calling Modified() on the
> vtkUnstructuredGrid or even on the Scalars vtkDoubleArray is enough to
> update the visualization.
>
> Did i missunderstand something and it behaves like intended, did i do
> something wrong or is it bug in vtk?
> I am using vtk 6.1.0.
>
> Thanks
> Martin
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/vtkExtractionSelection-update-when-input-is-modified-tp5726414.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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