[vtkusers] vtk pipeline problem

Shawn Waldon swaldon at cs.unc.edu
Thu Jun 27 18:25:40 EDT 2013


Unfortunately that is as much as I know.  I found it a few weeks ago here:
http://www.vtk.org/Wiki/VTK/FAQ#Using_ReleaseDataFlag

You should not need to clear the input with NULL as far as I know, but keep
in mind that the filter is set to delete its output, not its input.  So you
would need to set the flag on the filter that is creating the brain3D in
order to have the brain3D output data deleted.

If you are declaring the same pipeline each time through the loop, you may
be able to set up the pipeline initially and have the loop only feed it
different input data each time, modify parameters on filters (remember to
call Update()) and do something with the output.  However, depending on
what you are doing with the resulting data you may need to copy the output
if using this approach.

Shawn


On Thu, Jun 27, 2013 at 6:05 PM, johnsonjonaris <jgadel2 at uic.edu> wrote:

> HI
> Thanks Shawn for your reply, that was quick.
> I tried to do as you suggested with no luck :(
> for example, I did the following for the vtkImageThreshold filter:
>
>         threshold = vtkSmartPointer<vtkImageThreshold>::New();
>         threshold->ThresholdBetween(lblValues(i),lblValues(i)); //
> lblValues
> is a vector of the labels
>         threshold->SetOutValue(0);
>         threshold->SetInput(brain3D);
>         threshold->ReleaseDataFlagOn();
>
> Note that every time in the loop I declare the pipeline elements with New()
> Also, at the end of the loop I need to clear the input with NULL in order
> to
> clean the memory.
> Any suggestions ?
> Regards
>
>
>
>
> -----
> 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-tp5721639p5721642.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130627/b108ae6d/attachment.htm>


More information about the vtkusers mailing list