[Paraview] Filter with variable outputs as plugin
Joachim Pouderoux
joachim.pouderoux at kitware.com
Mon Dec 5 08:54:07 EST 2016
Unfortunately it is not possible.
You could however have a single multiblock outpout port that would contains
your meshes and set the name of each block with the name you read in your
file.
Eg:
vtkPolyData* polyData[10];
std::string polyDataName[10];
for (int i = 0; i < 10; i++)
{
mb->SetBlock(i, polydata[i]);
mb->GetMetaData(i)->Set(vtkCompositeDataSet::NAME(),
polyDataName[i].c_str());
}
Best,
*Joachim Pouderoux*, PhD
*Technical Expert - Scientific Computing Team*
*Kitware SAS <http://www.kitware.fr>*
2016-12-05 9:42 GMT-04:00 Lodron, Gerald <Gerald.Lodron at joanneum.at>:
> But here i need to know it at compiletime. The ouputs name is in my file
> name which differs from input file to input file…
>
>
>
> e.g. I want to load a file
>
>
>
> myfile.myformat
>
>
>
> which has a polydata “SomeString” and a polydata “someOtherString” in it.
>
>
>
> When my reader applys, there should be 2 outputs with 2 vtkPolyDatas with
> those strings, is that possible?
>
>
>
> *Von:* Joachim Pouderoux [mailto:joachim.pouderoux at kitware.com]
> *Gesendet:* Montag, 05. Dezember 2016 14:35
> *An:* Lodron, Gerald
> *Cc:* Paraview User (paraview at paraview.org)
> *Betreff:* Re: [Paraview] Filter with variable outputs as plugin
>
>
>
> Hi Gerald,
>
> To give a name to the different ports of your filter in ParaView, you need
> to add some "OutputPort" hints to the definition of your filter's proxy.
>
> <SourceProxy class="..." ...>
> ...
>
> <Hints>
>
> <OutputPort index="0" name="*My Output 0*"/>
> <OutputPort index="1" name="*My Output 1*"/>
> <OutputPort index="2" name="*My Output 2*"/>
> ...
>
> </Hint>
>
> </SourceProxy>
>
> Best,
>
> Joachim
>
>
> *Joachim Pouderoux*, PhD
>
> *Technical Expert - Scientific Computing Team*
> *Kitware SAS <http://www.kitware.fr>*
>
>
>
> 2016-12-05 3:05 GMT-04:00 Lodron, Gerald <Gerald.Lodron at joanneum.at>:
>
> Hi
>
>
>
> I am programming a vtk Polydata source on my own. The source is reading a
> proprietary file which consists of very simple 0 to N polygonal objects
> with a string identifier. My question is: Where do I specify the number of
> outputs (RequestInformation?) and where can I tell paraview the string
> identifier of the polygonal data (when I set number of outputs to 10 in
> filters constructor I get “Output-0” string in paraview’s pipeline browser,
> I want to specify that string on my own)!
>
>
>
> Thanks for help…
>
>
>
>
> *------------------------------------------------------------------------------------*
>
> *Gerald Lodron*
>
>
>
> Researcher of Machine Vision Applications Group
>
> DIGITAL - Institute for Information and Communication Technologies
>
>
>
> JOANNEUM RESEARCH Forschungsgesellschaft mbH
>
> Steyrergasse 17, 8010 Graz, AUSTRIA
>
>
>
> phone: +43-316-876-1751
>
> general fax: +43-316-876-1751
>
> web: http://www.joanneum.at/digital
>
> e-mail: gerald.lodron at joanneum.at
>
>
>
>
>
>
>
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20161205/9ef6d8d5/attachment.html>
More information about the ParaView
mailing list