<div dir="ltr">Sorry my bad. A typo. You _can't_ pass data objects around if your intent is to connect pipelines anymore. Instead, you need to pass the (algorithm, output port) pair for the producer of the data around now. You could use something simple like<div><br></div><div>struct</div><div>{</div><div>vtkSmartPointer<vtkAlgorithms> Algorithm;</div><div>int OutputPort;</div><div>};</div><div><br></div><div>Here the (Algorithm, OutputPort) represent the port the data come from.</div><div><br></div><div>Best,</div><div>-berk</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 5, 2015 at 2:33 PM, Nicole Kovacs <span dir="ltr"><<a href="mailto:nkovac2@uwo.ca" target="_blank">nkovac2@uwo.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>It is actually supposed to make a pipeline connection. You're right, my mistake to think SetInputData() would work.</p>
<p><br>
</p>
<p>What do you mean by "you can simply pass data objects if you want to connect pipelines anymore"? I tried doing:</p>
<p><code>someAlgorithm->SetNthInputConnection(port, index, *someDataObject);</code></p>
<p>but it didn't work.</p>
<p><br>
</p>
<p>Also, by "refactored" do you mean using just SetInputConnection?</p>
<p><br>
</p>
<p>Nicole<br>
</p>
<div style="color:rgb(0,0,0)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> Berk Geveci <<a href="mailto:berk.geveci@kitware.com" target="_blank">berk.geveci@kitware.com</a>><br>
<b>Sent:</b> Monday, June 1, 2015 1:14 PM<br>
<b>To:</b> Nicole Kovacs<br>
<b>Cc:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Subject:</b> Re: [vtkusers] VTK 6 Migration - GetProducerPort in SetNthInputConnection replacement</font>
<div> </div>
</div><div><div class="h5">
<div>
<div dir="ltr">Is this call supposed make a pipeline connection? Note that SetNthInputConnection() makes a pipeline connection whereas SetInputData() and variants do not. Once you figure it out, if SetInputData() is still good, I can share a way of doing what
 you want. If not, this code will have to be refactored. You can simply pass data objects if you want to connect pipelines anymore.
<div><br>
</div>
<div>Best,</div>
<div>-berk</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, May 29, 2015 at 9:47 AM, Nicole Kovacs <span dir="ltr">
<<a href="mailto:nkovac2@uwo.ca" target="_blank">nkovac2@uwo.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi guys, </p>
<p><br>
</p>
<p>I apologize if this is a basic question, I'm new to VTK and I'm trying to port some VTK code from version 5.x to version 6.x</p>
<p><br>
</p>
<p>I'm facing various errors regarding GetProducerPort's removal from vtkDataObject. I know that I should be replacing
<code>someAlgorithm->SetInputConnection(someDataObject->GetProducerPort());</code><br>
by <code>someAlgorithm->SetInputData(someDataObject);</code></p>
<p><br>
</p>
<p>but the code I have is a bit different, such as:<br>
<code>someAlgorithm->SetNthInputConnection(port, index, someDataObject->GetProducerPort());</code></p>
<p><br>
<code></code></p>
<p>I thought about looking for some <code>SetNthInputData</code> method that takes as arguments a port and an index and could solve my problem, but haven't found anything that useful. I did find a method called
<code>SetInputDataObject(int port, vtkDataObject *data)</code> that has the port, but not the index.</p>
<p><br>
</p>
<p>Is there a way that I can port this part of my code? Is there a reason that <code>
SetInputData</code> methods don't have indices as arguments?</p>
<p><br>
</p>
<p>I have talked to the author of the code I'm porting and I know that in some cases I don't need to specify the port, only the input index. Is there a method that does that?
</p>
<p><br>
</p>
<p>Thank you for your attention!<br>
</p>
</div>
</div>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank">
http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br></div>