<HTML>
<HEAD>
<TITLE>Re: [Paraview-developers] Adding/writing paraview filters</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>If possible, I would wrap up the functionality in a plugin. That, along with many examples, is given here:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><a href="http://www.paraview.org/Wiki/Plugin_HowTo">http://www.paraview.org/Wiki/Plugin_HowTo</a><BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
-Ken<BR>
<BR>
On 10/22/09 6:39 AM, "David Doria" <<a href="daviddoria@gmail.com">daviddoria@gmail.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Sorry for the cross post - I think this question is much more<BR>
appropriate for this list, but I just found out about it yesterday.<BR>
<BR>
I have some time this week and I was hoping to try to implement these:<BR>
<a href="http://public.kitware.com/Bug/view.php?id=8999">http://public.kitware.com/Bug/view.php?id=8999</a><BR>
<a href="http://public.kitware.com/Bug/view.php?id=8998">http://public.kitware.com/Bug/view.php?id=8998</a><BR>
<BR>
For the ICP interface, all that needs to be selected is two items in<BR>
the pipeline and have a few text boxes to specify some parameters.<BR>
For the Landmark Transform interface, two sets of N points need to be<BR>
selected, one from each of the two selected items in the pipeline.<BR>
<BR>
This seems like it should be relatively easy to do, but the<BR>
plugin/servermanager/module/proxy terminology is quite confusing to<BR>
me.<BR>
<BR>
Is this the guide I should be following?<BR>
<a href="http://www.itk.org/Wiki/Extending_ParaView_at_Compile_Time">http://www.itk.org/Wiki/Extending_ParaView_at_Compile_Time</a><BR>
<BR>
That example shows how to add a source, but I imagine it is very<BR>
similar to add a filter? I looked at the paraview user guide and the<BR>
rest of the links on the wiki, but I didn't see anything like the<BR>
following analysis/descriptions - did I miss something major here?<BR>
<BR>
I looked at the TransformFilter in filters.xml as a starting point -<BR>
here are some line by line comments/questions about it:<BR>
<BR>
<SourceProxy name="TransformFilter" class="vtkTransformFilter"<BR>
label="Transform"><BR>
<BR>
1) What is a source proxy? This filter will use the vtkTransformFilter<BR>
filter, and it will be called "Transform" in the paraview menu.<BR>
<BR>
<Documentation<BR>
long_help="This filter applies transformation to the polygons."<BR>
short_help="Transform polygonal data."><BR>
The Transform filter allows you to specify the position, size,<BR>
and orientation of polygonal, unstructured grid, and curvilinear data<BR>
sets.<BR>
</Documentation><BR>
<BR>
2) Where does this help text get displayed?<BR>
<BR>
<InputProperty<BR>
name="Input"<BR>
command="SetInputConnection"><BR>
<BR>
3) We want to call SetInputConnection() on the input, which is called<BR>
Input. Is Input taken to be the selected item in the pipeline you are<BR>
attempting to apply the filter to?<BR>
<BR>
<ProxyGroupDomain name="groups"><BR>
<Group name="sources"/><BR>
<Group name="filters"/><BR>
</ProxyGroupDomain><BR>
<BR>
4) I'm assuming "Group name" means to add this to the "Filters" menu<BR>
in paraview? Why is "sources" also a "group name"?<BR>
<BR>
<DataTypeDomain name="input_type"><BR>
<DataType value="vtkPointSet"/><BR>
</DataTypeDomain><BR>
<BR>
5) What is "DataTypeDomain"? I understand that vtkPointSet is the<BR>
input type to vtkTransformFilter.<BR>
<BR>
<Documentation><BR>
This property specifies the input to the Transform filter.<BR>
</Documentation><BR>
</InputProperty><BR>
<BR>
6) Where does this documentation get displayed/placed?<BR>
<BR>
<ProxyProperty name="Transform" command="SetTransform"><BR>
<BR>
7) What is a ProxyProperty vs an InputProperty?<BR>
<BR>
<ProxyGroupDomain name="groups"><BR>
<Group name="transforms"/><BR>
</ProxyGroupDomain><BR>
<BR>
8) Where does this "group" called "transforms" appear?<BR>
<BR>
<ProxyListDomain name="proxy_list"><BR>
<Proxy group="extended_sources" name="Transform3" /><BR>
</ProxyListDomain><BR>
<BR>
9) What is "extended_sources" and "Transform3"?<BR>
<BR>
<Documentation><BR>
The values in this property allow you to specify the<BR>
transform (translation, rotation, and scaling) to apply to the input<BR>
dataset.<BR>
</Documentation><BR>
<BR>
10) I see that this string gets displayed if you hover over any of the<BR>
items in the transform GUI.<BR>
<BR>
<BR>
Even though they are similar, the two things I am trying to implement<BR>
could be quite different because with the Transform filter, you simply<BR>
choose an object in the pipeline and apply that filter to the object -<BR>
with my things you have to select TWO things in the pipeline (the<BR>
source and destination objects, in the case of ICP). Is there an easy<BR>
way to do this? Can you simply ctrl+click items in the pipeline to<BR>
select them and then sort out the inputs in the filter?<BR>
<BR>
Where is the code that creates the GUI (to take user input of the<BR>
transformation) for this filter?<BR>
<BR>
Can someone please help get me started? I think this will be a useful<BR>
exercise - I intend to document the process of adding a filter and<BR>
constructing the interface GUI and add it to the wiki so that future<BR>
users can hopefully contribute to the project with less of a learning<BR>
curve.<BR>
<BR>
Thanks!<BR>
<BR>
David<BR>
_______________________________________________<BR>
Paraview-developers mailing list<BR>
<a href="Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><BR>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers">http://public.kitware.com/mailman/listinfo/paraview-developers</a><BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="1"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:7.5pt'><BR>
**** Kenneth Moreland<BR>
*** Sandia National Laboratories<BR>
*********** <BR>
*** *** *** email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** *** ** phone: (505) 844-8919<BR>
*** web: <a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>