[vtkusers] vtk pipeline problem

johnsonjonaris jgadel2 at uic.edu
Thu Jun 27 17:41:56 EDT 2013


Dear All
I am making a vtk pipeline to visualize models out of a label volume. The
volume contains integral data (integer numbers). I make a loop of the
following pipeline to visualize the models. The pipeline is as follow:
vtkImageData (volume) 
-> vtkImageThreshold(at every value)
->vtkMarchingCubes(at the specific value)
-> vtkDecimatePro
->vtkWindowedSincPolyDataFilter
->vtkPolyDataNormals
->vtkStripper
->vtkPolyDataMapper
->vtkActor
->vtkRenderer (add Actor) 
-> vtkWidget (GetRenderWindow()->Render()) // this invoke the whole pipeline
everytime in the loop

In order to control the memory usage, I clean the filters at the end of the
loop using:

        if (stripper) { stripper->SetInput(NULL); stripper = NULL; }
        if (normals) { normals->SetInput(NULL); normals = NULL; }
        if (smoother) { smoother->SetInput(NULL); smoother = NULL; }
        if (decimator) { decimator->SetInput(NULL); decimator = NULL; }
        if (mcubes) { mcubes->SetInput(NULL); mcubes = NULL; }
        if (imgToStrPnts) { imgToStrPnts->SetInput(NULL); imgToStrPnts =
NULL; }
        if (threshold) { threshold->SetInput(NULL); threshold = NULL; }

The modules are displayed as I want, but I get the following error message
several times:

ERROR: In ..\..\vtk-5.6.1\Filtering\vtkDemandDrivenPipeline.cxx, line 727
vtkStreamingDemandDrivenPipeline (000000001BB996F0): Input port 0 of
algorithm vtkStripper(000000001B77C910) has 0 connections but is not
optional.

If remover the memory cleaning part, I get no ERRORS, but the memory is
heavily consumed.
Please advise on how to correct the pipeline.

Also, will it be better to use vtkDiscreteMarchingCubes

Regards
Johnson



-----
Johnson Jonaris 
PhD Candidate
Electrical & Computer Eng 
University of IL at Chicago
--
View this message in context: http://vtk.1045678.n5.nabble.com/vtk-pipeline-problem-tp5721639.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list