[Paraview] use of vtkSynchronizedTemplates

Berk Geveci berk.geveci at kitware.com
Fri Mar 6 16:23:40 EST 2009


Did you figure out how to fix this yet? Did you try this:

vtkDataSet* sc = input->NewInstance();
sc->ShallowCopy(sc);
contour->SetInput(sc);
sc->Update();

-berk

On Tue, Feb 24, 2009 at 3:42 AM, Natalie Happenhofer
<nataliehapp at hotmail.com> wrote:
> Hi!
>
> Update() doesn´t work either, I still get the segmentation fault. (I hate
> segmentation faults, you never know what´s causing them). At least  I´d need
> to call the vtkContourFilter from my filter, surely there is a possibility?
> How could I achieve that? Or maybe there are any filters in paraview which
> are already calling other filters?
>
> thx,
> Natalie
>
>> Date: Mon, 23 Feb 2009 20:51:42 -0500
>> Subject: Re: [Paraview] use of vtkSynchronizedTemplates
>> From: berk.geveci at kitware.com
>> To: nataliehapp at hotmail.com
>> CC: paraview at paraview.org
> - Show quoted text -
>>
>> Did you try calling Update() on SynchronizedTemplated3D instead of
>> ThreadedExecute()? ThreadedExecute() is really meant to be used
>> internally.
>>
>> -berk
>>
>> On Mon, Feb 23, 2009 at 7:48 AM, Natalie Happenhofer
>> <nataliehapp at hotmail.com> wrote:
>> > Hi!
>> > I want to display isosurfaces of values I compute in my filter, so
>> > looking
>> > at vtkContourFilter, I got the idea to use the
>> > vtkSynchronizedTemplates3D
>> > (as my filter is going to handle 3D ImageData).
>> > I have a vtkSynchronizedTemplate3D as an instance of my filter, in the
>> > constructor it´s initialized and then I do the following:
>> >
>> >
>> > this -> SynchronizedTemplates3D -> SetInput(TauSet);
>> > this -> SynchronizedTemplates3D -> ComputeNormalsOff();
>> > this -> SynchronizedTemplates3D -> ComputeGradientsOff();
>> > this -> SynchronizedTemplates3D -> SetComputeScalars(1);
>> > this -> SynchronizedTemplates3D -> SetNumberOfContours(1);
>> > this -> SynchronizedTemplates3D -> SetValue(0, TauValue);
>> >
>> > int ext[6];
>> > inInfo -> Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), ext);
>> > this -> SynchronizedTemplates3D ->
>> > ThreadedExecute(TauSet,inInfo,outInfo,ext, TauValues);
>> >
>> >
>> > It does compile, but running I get an segmentation fault, debugging and
>> > backtracing I get:
>> >
>> > #0 0x00007f42ffc5eb10 in ContourImage<double> () from
>> > /home/happenhofer/Paraview/build-svn/bin/libvtkGraphics.so.pv3.4
>> > #1 0x00007f42ffc5a308 in vtkSynchronizedTemplates3D::ThreadedExecute ()
>> > from /home/happenhofer/Paraview/build-svn/bin/libvtkGraphics.so.pv3.4
>> > #2 0x00007f4309195f06 in vtkTauFilter::RequestData () from
>> > /home/happenhofer/Paraview/build-svn/bin/libvtkPVFilters.so
>> >
>> > vtkTauFilter would be my filter, so the error occurs in
>> > ContourImage<double>.
>> >
>> > Does anyone have an idea even how to find the problem? That would be a
>> > great
>> > help..
>> >
>> > and just in general - calling ThreadedExecute would execute the
>> > SynchronizedTemplate filter and return a grid with the isosurface
>> > computed,
>> > does it not? or do I have to specifiy the output somehow?
>> >
>> > thx a lot,
>> > Natalie Happenhofer
>> >
>> > ________________________________
>> > ¡Conoce el nuevo Calendario de Windows Live! ¿Quieres tener un 2009 más
>> > organizado?
>> > _______________________________________________
>> > 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 ParaView Wiki at:
>> > http://paraview.org/Wiki/ParaView
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.paraview.org/mailman/listinfo/paraview
>> >
>> >
>
> ________________________________
> con Windows Live Messenger comparte fotos mientras charlas. El doble de
> diversión:


More information about the ParaView mailing list