[prev in list] [next in list] [prev in thread] [next in thread] 

List:       paraview
Subject:    [Paraview] WG: custom object panel with access to input
From:       "Lodron, Gerald" <Gerald.Lodron () joanneum ! at>
Date:       2013-11-29 5:26:21
Message-ID: E70FE8EA6EBE9241BDB4CA6D8D12E1D801C245213CF3 () RZJC1EX ! jr1 ! local
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Ok,

i found the solution: the reference proxy holds all input info:
pqPipelineFilter* poFilter = qobject_cast<pqPipelineFilter*>(this->referenceProxy());
QList<pqOutputPort*> oPorts = poFilter->getAllInputs();

thanks
Von: paraview-developers-bounces@paraview.org \
                [mailto:paraview-developers-bounces@paraview.org] Im Auftrag von \
                Lodron, Gerald
Gesendet: Donnerstag, 28. November 2013 08:12
An: Paraview Developer (Paraview-developers@paraview.org); Paraview User \
                (paraview@paraview.org)
Betreff: [Paraview-developers] custom object panel with access to input

Hi

I currently made my own custom object panel in PV 3.98.1 and successfully made \
buttons and input dialogs which are calling functions of my filter.

Now I want to make a list widget which depends on the input of the filter, so the \
number of entries in the list and their name should depend on the number of \
point/cell based arrays in the input, but how do I get access to the filters input \
data?

I currently invoke function calls over the source proxy:

vtkSMSourceProxy* poSourceProxy = vtkSMSourceProxy::SafeDownCast(this->proxy());
poSourceProxy->InvokeCommand("MyFunction");

now i need something like
vtkPolyData* poInputPolydata = vtkPolyData::SafeDownCast( poSourceProxy->GetInput() \
);

can anyone help me or give a hint where to look?

thanks
_________________________________________________________________

JOANNEUM RESEARCH Forschungsgesellschaft mbH

DIGITAL - Institute for Information and Communication Technologies
Steyrergasse 17, 8010 Graz, Austria

phone: +43 316 876-1751
fax: +43 316 8769-1751
e-mail: gerald.lodron@joanneum.at<mailto:gerald.lodron@joanneum.at>
web: www.joanneum.at/digital<http://www.joanneum.at/digital>
_________________________________________________________________

This message and any attached files are confidential and intended solely for the \
addressee(s). Any publication, transmission or other use of the information by a \
person or entity other than the intended addressee(s) is prohibited. If you receive \
this in error please contact the sender and delete the material. The sender does not \
accept liability for any errors or omissions as a result of the transmission.

Please consider the environment before printing this page.


[Attachment #5 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" \
CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 \
(filtered medium)"><style><!-- /* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.E-MailFormatvorlage17
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
span.E-MailFormatvorlage18
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE-AT link=blue vlink=purple><div \
class=WordSection1><p class=MsoNormal><span \
style='color:#1F497D'>Ok,<o:p></o:p></span></p><p class=MsoNormal><span \
style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB \
style='color:#1F497D'>i found the solution: the reference proxy holds all input \
info:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB \
style='font-size:10.0pt;font-family:"Courier \
New";color:#010001;mso-fareast-language:DE-AT'>pqPipelineFilter</span><span \
lang=EN-GB style='font-size:10.0pt;font-family:"Courier \
New";mso-fareast-language:DE-AT'>* <span style='color:#010001'>poFilter</span> = \
<span style='color:#010001'>qobject_cast</span>&lt;<span \
style='color:#010001'>pqPipelineFilter</span>*&gt;(<span \
style='color:blue'>this</span>-&gt;<span \
style='color:#010001'>referenceProxy</span>());<o:p></o:p></span></p><p \
class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier \
New";color:#010001;mso-fareast-language:DE-AT'>QList</span><span \
style='font-size:10.0pt;font-family:"Courier \
New";mso-fareast-language:DE-AT'>&lt;<span \
style='color:#010001'>pqOutputPort</span>*&gt; <span \
style='color:#010001'>oPorts</span> = <span \
style='color:#010001'>poFilter</span>-&gt;<span \
style='color:#010001'>getAllInputs</span>();</span><span \
style='color:#1F497D'><o:p></o:p></span></p><p \
class=MsoNormal><o:p>&nbsp;</o:p></p><p \
class=MsoNormal>thanks<o:p></o:p></p><div><div style='border:none;border-top:solid \
#B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=DE \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-language:DE-AT'>Von:</span></b><span \
lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-language:DE-AT'> \
paraview-developers-bounces@paraview.org \
[mailto:paraview-developers-bounces@paraview.org] <b>Im Auftrag von </b>Lodron, \
Gerald<br><b>Gesendet:</b> Donnerstag, 28. November 2013 08:12<br><b>An:</b> Paraview \
Developer (Paraview-developers@paraview.org); Paraview User \
(paraview@paraview.org)<br><b>Betreff:</b> [Paraview-developers] custom object panel \
with access to input<o:p></o:p></span></p></div></div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Hi<o:p></o:p></p><p \
class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><span lang=EN-GB>I currently \
made my own custom object panel in PV 3.98.1 and successfully made buttons and input \
dialogs which are calling functions of my filter.<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span \
lang=EN-GB>Now I want to make a list widget which depends on the input of the filter, \
so the number of entries in the list and their name should depend on the number of \
point/cell based arrays in the input, but how do I get access to the filters input \
data?<o:p></o:p></span></p><p class=MsoNormal><span \
lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB>I \
currently invoke function calls over the source proxy:<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span \
lang=EN-GB style='font-size:10.0pt;font-family:"Courier \
New";color:#010001'>vtkSMSourceProxy</span><span lang=EN-GB \
style='font-size:10.0pt;font-family:"Courier New"'>* <span \
style='color:#010001'>poSourceProxy</span> = <span \
style='color:#010001'>vtkSMSourceProxy</span>::<span \
style='color:#010001'>SafeDownCast</span>(<span \
style='color:blue'>this</span>-&gt;<span \
style='color:#010001'>proxy</span>());<o:p></o:p></span></p><p class=MsoNormal><span \
lang=EN-GB style='font-size:10.0pt;font-family:"Courier \
New";color:#010001'>poSourceProxy</span><span lang=EN-GB \
style='font-size:10.0pt;font-family:"Courier New"'>-&gt;<span \
style='color:#010001'>InvokeCommand</span>(<span \
style='color:#A31515'>&quot;MyFunction&quot;</span>);<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier \
New"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB \
style='font-size:10.0pt;font-family:"Courier New"'>now i need something \
like<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB \
style='font-size:10.0pt;font-family:"Courier New";color:#010001'>vtkPolyData* \
poInputPolydata = vtkPolyData::SafeDownCast( poSourceProxy-&gt;GetInput() \
);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB \
style='font-size:10.0pt;font-family:"Courier \
New";color:#010001'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span \
lang=EN-GB>can anyone help me or give a hint where to look?<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span \
lang=EN-GB>thanks<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB \
style='font-size:12.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-langu \
age:DE-AT'>_________________________________________________________________</span><span \
lang=EN-GB style='font-size:8.5pt;color:black;mso-fareast-language:DE-AT'><o:p></o:p></span></p><p \
class=MsoNormal style='text-autospace:none'><b><span lang=EN-GB \
style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:JA'><o:p>&nbsp;</o:p></span></b></p><p \
class=MsoNormal style='text-autospace:none'><b><span lang=DE \
style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:JA'>JOANNEUM \
RESEARCH Forschungsgesellschaft mbH</span></b><span lang=DE \
style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:JA'><o:p></o:p></span></p><p \
class=MsoNormal style='text-autospace:none'><span lang=DE \
style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:JA'>&nbs \
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span \
style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:JA'>DIGITAL \
&#8211; Institute for Information and Communication Technologies</span></b><span \
style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:JA'><o:p></o:p></span></p><p \
class=MsoNormal style='text-autospace:none'><span lang=EN-US \
style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:JA'>Steyrergasse \
17, 8010 Graz, Austria<o:p></o:p></span></p><p class=MsoNormal \
style='text-autospace:none'><span lang=EN-US \
style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#4D4D4D;mso-fareast-language:JA'>&nbsp;<o:p></o:p></span></p><p \
class=MsoNormal style='text-autospace:none'><span lang=EN-US \
style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:JA'>phone: \
+43 316 876-1751<o:p></o:p></span></p><p class=MsoNormal \
style='text-autospace:none'><span lang=EN-US \
style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:JA'>fax: \
+43 316 8769-1751<o:p></o:p></span></p><p class=MsoNormal \
style='text-autospace:none'><span lang=DE \
style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:JA'>e-mail: \
<a href="mailto:gerald.lodron@joanneum.at">gerald.lodron@joanneum.at</a> \
<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:JA'>web: \
<a href="http://www.joanneum.at/digital">www.joanneum.at/digital</a><o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='font-size:12.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-langu \
age:DE-AT'>_________________________________________________________________</span><span \
lang=EN-US style='font-size:8.5pt;color:black;mso-fareast-language:DE-AT'><o:p></o:p></span></p><p \
class=MsoNormal style='text-autospace:none'><span lang=EN-US \
style='mso-fareast-language:JA'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span \
lang=EN-US style='font-size:9.0pt;color:gray;mso-fareast-language:JA'>This message \
and any attached files are confidential and intended solely for the addressee(s). Any \
publication, transmission or other use of the information by a person or entity other \
than the intended addressee(s) is prohibited. If you receive this in error please \
contact the sender and delete the material. The sender does not accept liability for \
any errors or omissions as a result of the transmission.<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='font-size:9.0pt;color:gray;mso-fareast-language:JA'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='font-size:9.0pt;color:gray;mso-fareast-language:JA'>Please consider the \
environment before printing this page.</span><span lang=EN-US \
style='color:gray;mso-fareast-language:JA'><o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:JA'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p></div></body></html>


["ATT00001.txt" (text/plain)]

_______________________________________________
Paraview-developers mailing list
Paraview-developers@paraview.org
http://public.kitware.com/mailman/listinfo/paraview-developers


_______________________________________________
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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic