Corinna, It seems that your use case is not currently supported. T.J. (CC'ed) is working on a bug fix in ParaView that should enable what you are doing.
https://gitlab.kitware.com/paraview/paraview/merge_requests/404 He can fill you in with more details if you need. Thanks, Cory On Wed, Jul 13, 2016 at 2:13 AM, corinna reuter <[email protected]> wrote: > Hi Cory, > can you still help me to find the problem, why the custom vtkTest source > cannot be produced inside paraview, but fails with a vtkPVPostFilter message > (see subject)? A complete test was attached to my previous email. > > Why does vtkPVPostFilter expect vtkPolyData input, although both in the > Servermanager xml and in FillOutputPortInformation the type is correctly > given as vtkTest? Is there another place, where I need to define the output > type? > > I also tried to make use of the vtkTableReader, but I can't seem to make it > work, because it tries to read point data, cell data etc., which don't exist > a priori in my use case. > > Corinna > > > On Fri, Jul 8, 2016 at 10:03 AM, corinna reuter <[email protected]> > wrote: >> >> Hi Cory, >> I attach the complete sources for compiling and testing the described >> problem. >> (Tested with Paraview 5.0.1 compiled from sources.) >> >> Corinna >> >> On Thu, Jul 7, 2016 at 7:31 PM, corinna reuter <[email protected]> >> wrote: >>> >>> Yes, FillOutputPortInformation already looks exactly as you say. >>> >>> I gave the link to the complete example code in my initial question: >>> http://www.vtk.org/Wiki/VTK_Examples_vtkAlgorithm_Source >>> I changed a few lines to make it compile with Paraview 5.0.1 (see the >>> comments in the CMakeLists.txt with my initial question). In addition, I can >>> send to you tomorrow a small source archive ready for compilation. >>> >>> I'll also check vtkTable to see if it solves my problem. I thought of >>> just deriving the vtkTest class from vtkDataSet and returning a fake, empty >>> dataset while keeping the information from which the actual vtkDataSet will >>> be processed downstream in the pipeline. Do you think that this workaround >>> is feasible, or what other problems should I excpect? >>> >>> Thank you >>> Corinna >>> >>> >>> On Thu, Jul 7, 2016 at 3:03 PM, Cory Quammen <[email protected]> >>> wrote: >>>> >>>> Hi Corinna, >>>> >>>> Does vtkTestSource override the FillOutputPortInformation() member >>>> function? It should look like >>>> >>>> >>>> //---------------------------------------------------------------------------- >>>> int vtkTestSource::FillOutputPortInformation( >>>> int vtkNotUsed(port), vtkInformation* info) >>>> { >>>> // now add our info >>>> info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkTest"); >>>> return 1; >>>> } >>>> >>>> If that doesn't fix the error, let us know. >>>> >>>> You may run into other problems with a custom data object - you may >>>> want to derive your vtkTest class from one of the vtkDataObject >>>> ParaView works with, e.g., vtkTable. >>>> >>>> Thanks, >>>> Cory >>>> >>>> On Thu, Jul 7, 2016 at 1:44 AM, corinna reuter >>>> <[email protected]> wrote: >>>> > Doesn't anybody know, why a vtkAlgorithm which produces a custom class >>>> > (vtkTest) that is not derived from vtkDataSet show the error "... but >>>> > a >>>> > vtkPolyData is required"? >>>> > >>>> > A side remark, previously I wrote that the custom class "vtkTest" is >>>> > neither >>>> > derived from vtkDataSet nor from vtkDataObject. Actually it is derived >>>> > from >>>> > vtkDataObject. >>>> > >>>> > If my question doesn't make sense, please let me know. Maybe it is >>>> > against >>>> > every paraview design, so that I'll have to find a completely >>>> > different >>>> > solution. But it becomes more and more urgent for me to include a data >>>> > source (mySQL database) of custom classes (not vtkDataSets) in the >>>> > paraview >>>> > tree. >>>> > >>>> > Thank you >>>> > Corinna >>>> > >>>> > On Mon, Jul 4, 2016 at 3:09 PM, corinna reuter >>>> > <[email protected]> >>>> > wrote: >>>> >> >>>> >> To anybody experienced in plugin programming: >>>> >> >>>> >> I am trying to include items in the paraview tree, which are not >>>> >> derived >>>> >> from vtkDataSet or vtkDataObject. For example, a mySQL database >>>> >> should be >>>> >> allowed as a data source, which delivers data in an intermediate >>>> >> format. >>>> >> Next I'd implement filters which take the intermediate format and >>>> >> produce >>>> >> vtkDataSets as output. >>>> >> >>>> >> Is it possible to use such "abstract" (not vtkDataSet) objects in the >>>> >> paraview tree as a representation of the intermediate format? I have >>>> >> tried >>>> >> to integrate the example for custom classes from >>>> >> http://www.vtk.org/Wiki/VTK_Examples_vtkAlgorithm_Source into a >>>> >> paraview >>>> >> plugin (CMakeLists and servermanager xml below). When the plugin is >>>> >> loaded >>>> >> and I add a source of the new type AlgorithmSourceExample, this error >>>> >> is >>>> >> thrown: >>>> >> >>>> >> ERROR: In >>>> >> >>>> >> /opt/ParaView-v5.0.1/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx, >>>> >> line 810 >>>> >> vtkPVPostFilterExecutive (0x3857810): Input for connection index 0 on >>>> >> input port index 0 for algorithm vtkPVPostFilter(0x3858910) is of >>>> >> type >>>> >> vtkTest, but a vtkPolyData is required. >>>> >> >>>> >> What do I need to change such that the vtkTest objects, produced by >>>> >> AlgorithmSourceExample, can live in the paraview tree? >>>> >> >>>> >> Thank you >>>> >> Corinna >>>> >> >>>> >> CMakeLists.txt: >>>> >> >>>> >> FIND_PACKAGE(ParaView REQUIRED) >>>> >> INCLUDE(${PARAVIEW_USE_FILE}) >>>> >> #changes required in >>>> >> http://www.vtk.org/Wiki/VTK_Examples_vtkAlgorithm_Source: >>>> >> # remove vtkCxxRevisionMacro calls >>>> >> # change vtkTypeRevisionMacro into vtkTypeMacro >>>> >> # remove call output->SetPipelineInformation( outInfo ); >>>> >> ADD_PARAVIEW_PLUGIN( >>>> >> AlgorithmSourceExample >>>> >> "1.0" >>>> >> SERVER_MANAGER_XML AlgorithmSourceExample.xml >>>> >> SERVER_MANAGER_SOURCES vtkTestSource.cxx vtkTest.cxx >>>> >> ) >>>> >> >>>> >> AlgorithmSourceExample.xml: >>>> >> >>>> >> <ServerManagerConfiguration> >>>> >> <ProxyGroup name="sources"> >>>> >> <SourceProxy name="AlgorithmSourceExample" class="vtkTestSource" >>>> >> label="AlgorithmSourceExample"> >>>> >> <Documentation >>>> >> long_help="AlgorithmSourceExample" >>>> >> short_help="AlgorithmSourceExample"> >>>> >> </Documentation> >>>> >> </SourceProxy> >>>> >> </ProxyGroup> >>>> >> </ServerManagerConfiguration> >>>> > >>>> > >>>> > >>>> > _______________________________________________ >>>> > 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 >>>> > >>>> >>>> >>>> >>>> -- >>>> Cory Quammen >>>> R&D Engineer >>>> Kitware, Inc. >>> >>> >> > -- Cory Quammen R&D Engineer Kitware, Inc. _______________________________________________ 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
