<div dir="ltr">Yes, FillOutputPortInformation already looks exactly as you say.<br><div class="gmail_extra"><br>I gave the link to the complete example code in my initial question: <a href="http://www.vtk.org/Wiki/VTK_Examples_vtkAlgorithm_Source" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_Examples_vtkAlgorithm_Source</a><br></div><div class="gmail_extra">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.<br><br></div><div class="gmail_extra">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?<br><br></div><div class="gmail_extra">Thank you<br></div><div class="gmail_extra">Corinna<br></div><div class="gmail_extra"><br><br></div><div class="gmail_extra"><div class="gmail_quote">On Thu, Jul 7, 2016 at 3:03 PM, Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Corinna,<br>
<br>
Does vtkTestSource override the FillOutputPortInformation() member<br>
function? It should look like<br>
<br>
//----------------------------------------------------------------------------<br>
int vtkTestSource::FillOutputPortInformation(<br>
int vtkNotUsed(port), vtkInformation* info)<br>
{<br>
// now add our info<br>
info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkTest");<br>
return 1;<br>
}<br>
<br>
If that doesn't fix the error, let us know.<br>
<br>
You may run into other problems with a custom data object - you may<br>
want to derive your vtkTest class from one of the vtkDataObject<br>
ParaView works with, e.g., vtkTable.<br>
<br>
Thanks,<br>
Cory<br>
<div><div class="h5"><br>
On Thu, Jul 7, 2016 at 1:44 AM, corinna reuter<br>
<<a href="mailto:corinnareuter75@gmail.com">corinnareuter75@gmail.com</a>> wrote:<br>
> Doesn't anybody know, why a vtkAlgorithm which produces a custom class<br>
> (vtkTest) that is not derived from vtkDataSet show the error "... but a<br>
> vtkPolyData is required"?<br>
><br>
> A side remark, previously I wrote that the custom class "vtkTest" is neither<br>
> derived from vtkDataSet nor from vtkDataObject. Actually it is derived from<br>
> vtkDataObject.<br>
><br>
> If my question doesn't make sense, please let me know. Maybe it is against<br>
> every paraview design, so that I'll have to find a completely different<br>
> solution. But it becomes more and more urgent for me to include a data<br>
> source (mySQL database) of custom classes (not vtkDataSets) in the paraview<br>
> tree.<br>
><br>
> Thank you<br>
> Corinna<br>
><br>
> On Mon, Jul 4, 2016 at 3:09 PM, corinna reuter <<a href="mailto:corinnareuter75@gmail.com">corinnareuter75@gmail.com</a>><br>
> wrote:<br>
>><br>
>> To anybody experienced in plugin programming:<br>
>><br>
>> I am trying to include items in the paraview tree, which are not derived<br>
>> from vtkDataSet or vtkDataObject. For example, a mySQL database should be<br>
>> allowed as a data source, which delivers data in an intermediate format.<br>
>> Next I'd implement filters which take the intermediate format and produce<br>
>> vtkDataSets as output.<br>
>><br>
>> Is it possible to use such "abstract" (not vtkDataSet) objects in the<br>
>> paraview tree as a representation of the intermediate format? I have tried<br>
>> to integrate the example for custom classes from<br>
>> <a href="http://www.vtk.org/Wiki/VTK_Examples_vtkAlgorithm_Source" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_Examples_vtkAlgorithm_Source</a> into a paraview<br>
>> plugin (CMakeLists and servermanager xml below). When the plugin is loaded<br>
>> and I add a source of the new type AlgorithmSourceExample, this error is<br>
>> thrown:<br>
>><br>
>> ERROR: In<br>
>> /opt/ParaView-v5.0.1/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx,<br>
>> line 810<br>
>> vtkPVPostFilterExecutive (0x3857810): Input for connection index 0 on<br>
>> input port index 0 for algorithm vtkPVPostFilter(0x3858910) is of type<br>
>> vtkTest, but a vtkPolyData is required.<br>
>><br>
>> What do I need to change such that the vtkTest objects, produced by<br>
>> AlgorithmSourceExample, can live in the paraview tree?<br>
>><br>
>> Thank you<br>
>> Corinna<br>
>><br>
>> CMakeLists.txt:<br>
>><br>
>> FIND_PACKAGE(ParaView REQUIRED)<br>
>> INCLUDE(${PARAVIEW_USE_FILE})<br>
>> #changes required in<br>
>> <a href="http://www.vtk.org/Wiki/VTK_Examples_vtkAlgorithm_Source" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_Examples_vtkAlgorithm_Source</a>:<br>
>> # remove vtkCxxRevisionMacro calls<br>
>> # change vtkTypeRevisionMacro into vtkTypeMacro<br>
>> # remove call output->SetPipelineInformation( outInfo );<br>
>> ADD_PARAVIEW_PLUGIN(<br>
>> AlgorithmSourceExample<br>
>> "1.0"<br>
>> SERVER_MANAGER_XML AlgorithmSourceExample.xml<br>
>> SERVER_MANAGER_SOURCES vtkTestSource.cxx vtkTest.cxx<br>
>> )<br>
>><br>
>> AlgorithmSourceExample.xml:<br>
>><br>
>> <ServerManagerConfiguration><br>
>> <ProxyGroup name="sources"><br>
>> <SourceProxy name="AlgorithmSourceExample" class="vtkTestSource"<br>
>> label="AlgorithmSourceExample"><br>
>> <Documentation<br>
>> long_help="AlgorithmSourceExample"<br>
>> short_help="AlgorithmSourceExample"><br>
>> </Documentation><br>
>> </SourceProxy><br>
>> </ProxyGroup><br>
>> </ServerManagerConfiguration><br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
><br>
<span class=""><font color="#888888"><br>
<br>
<br>
--<br>
Cory Quammen<br>
R&D Engineer<br>
Kitware, Inc.<br>
</font></span></blockquote></div><br></div></div>