<div dir="ltr">Franck,<div><br></div><div>Thanks for letting us know. I'm glad you figured it out. The client/server wrapping indeed assumes your class header file is defined in a .h file. You should, however, have gotten a warning that said something like</div><div><br></div><div>Unable to find: myWriter<br></div><div><br></div><div>Cory</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 6, 2015 at 3:03 AM, houssen <span dir="ltr"><<a href="mailto:houssen@ipgp.fr" target="_blank">houssen@ipgp.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">By the way, the crash occured because myWriter.hpp was a .hpp : I moved it to myWriter.h and it worked !...<br>
I guess this should be added in the doc but I don't know who to contact for that : I let you forward this if you can.<span class=""><br>
<br>
Franck<br>
<br>
Le 2015-06-30 6:08, Cory Quammen a écrit :<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hi Franck,<br>
<br>
It looks like you've been making progress, so I'll answer your<br>
questions from your second email.<br>
<br>
 <br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Question 1 : how to write myWriter.xml ?<br>
<br>
1.1. seems I must set <InputProperty command="SetInputConnection"<br>
name="Input"> in myWriter.xml. Does this means I will also have to<br>
implement myWriter::SetInputConnection ?<br>
</blockquote>
<br>
No. Your writer will inherit from subclass of vtkAlgorithm, the class<br>
that defines "SetInputConnection", and you should not need to override<br>
it. XdmfWriter inherits from vtkDataObjectAlgorithm, which itself<br>
inherits vtkAlgorithm.<br>
 <br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
1.2. seems I must set <StringVectorProperty name="FileName"<br>
command="SetFileName"> in myWriter.xml. Does this means I will also<br>
have to implement myWriter::SetFileName ?<br>
</blockquote>
<br>
Yes, like vtkXdmfWriter.<br>
<br></span><span class="">
 2.2 in myWriter.hpp, I need to derive from a vtkObject this way<br>
(like XdmfWriter.cpp does)<br>
<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
ew (); // Needed to be plugged into paraview<br>
    vtkTypeMacro ( myWriter, vtkDataObjectAlgorithm ); // Needed<br>
to be plugged into paraview<br>
+ suppress copy constructor and operator=<br>
<br>
Am I correct ?<br>
<br>
Yes.<br>
<br>
Question 3 : in myWriter.cpp, on<br>
</blockquote></span>
I am supposed to be called back (to get focus back) when I click the<span class=""><br>
"save data" button ? Here, how can I get data to be saved (data that I<br>
can see in paraview viewer befo<br>
<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
n ParaView, when you choose, File -> Save Data, the data from the<br>
selected Pipeline Browser object will be saved. This will have some<br>
kind of data type, e.g., vtkImageData, vtkPolyData, etc. What kind<br>
of data type would you like your writer to support?<br>
<br>
The data should<br>
</blockquote></span>
in the member function myWriter::RequestData(). This is where you<span class=""><br>
should write your data. <br>
<br>
 Finally, myWriter.xml seems OK. myWriter.*pp compile OK. Paraview<br>
finds myWriter.xml at run time (exporting PV_PLUGIN_PATH) and loads<br>
libmywriter.so without problem. I see the writer in the "save data"<br>
GUI (drop down list with different save formats). I save with<br>
myWriter, I get a (basic) GUI with file name only (no extra parameter)<br>
: I crash when I click "OK, save" with this error message :<br>
 ERROR: In /.../ParaView-v4.3.1-sourc<br>
<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
ailed to create myWriter. Aborting for debugging purposes.<br>
<br>
vtkSIWriterProxy does this at line 303 :<br>
vtkObjectBase* obj = this->Interpreter->NewInstance(className);<br>
but obj is NULL.<br>
<br>
I get obj is NULL because I missed something in myWriter<br>
implementation : what did I miss ?<br>
<br>
Are you running pvserver separately and connecting to it with the<br>
client? If so, make sure PV_PLUGIN_PATH is defined in the<br>
environment in which pvserver is run. Have you tried to load your<br>
plugin through the Tools -> Manage Plugins... dialog?<br>
<br>
I hope that helps get you further in writing your data files.<br>
<br>
Thanks,<br>
Cory<br>
 <br>
Can somebody help<br>
</blockquote></span>
t me some clue ?<span class=""><br>
<br>
 FH<br>
<br>
 -------- Message original --------<br>
 Objet: How to plug into paraview his own writer ?<br>
 Date: 2015-06-12 15:54<br></span><span class="">
 De: houssen <<a href="mailto:houssen@imap.ipgp.fr" target="_blank">houssen@imap.ipgp.fr</a> [6]><br>
 À: <<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a> [7]><br>
<br>
 I followed 2 tutorials (<br>
<br>
Links:<br>
------<br>
[1] <a href="http://www.kitware.com" rel="noreferrer" target="_blank">http://www.kitware.com</a><br>
[2] <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
[3] <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
[4] <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
[5] <a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
[6] mailto:<a href="mailto:houssen@imap.ipgp.fr" target="_blank">houssen@imap.ipgp.fr</a><br>
[7] mailto:<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
</span></blockquote>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div>