<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18812">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>That works fine. Many thanks for your
help.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>John.</FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=dave.demarle@kitware.com href="mailto:dave.demarle@kitware.com">David
E DeMarle</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=jcplatt@dsl.pipex.com
href="mailto:jcplatt@dsl.pipex.com">John Platt</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=vtkusers@vtk.org
href="mailto:vtkusers@vtk.org">vtkusers</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, September 16, 2009 8:26
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [vtkusers] Error using
SetOutput()</DIV>
<DIV><BR></DIV>I'm not really familiar with pre 4.0 vtk to comment about a
direct translation, but could you use:<BR><BR>f1 -> vtkPassThrough ->
g1/h1/j1 etc<BR><BR>?<BR>Then when you want to swap f2 and f3 in, you can just
change vtkPassThough's input.<BR><BR clear=all>David E DeMarle<BR>Kitware,
Inc.<BR>R&D Engineer<BR>28 Corporate Drive<BR>Clifton Park, NY
12065-8662<BR>Phone: 518-371-3971 x109<BR><BR><BR>
<DIV class=gmail_quote>On Wed, Sep 16, 2009 at 3:11 PM, John Platt <SPAN
dir=ltr><<A
href="mailto:jcplatt@dsl.pipex.com">jcplatt@dsl.pipex.com</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV bgcolor="#ffffff">
<DIV><FONT size=2 face=Arial>Hi Dave,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>This is the pipeline management problem I am
trying to solve</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2
face=Arial>
g1 -> g2 -> ...</FONT></DIV>
<DIV><FONT size=2 face=Arial>f1 -> [ f2 ] -> [ f3
] -></FONT><FONT size=2 face=Arial> h1 -> h2
-> ...</FONT></DIV>
<DIV><FONT size=2
face=Arial>
j1 -> j2 -> ...</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>where the filters in [] are optional. I want to
be able to add/remove f2 & f3 without having to find g1, h1 & j1 to
reset the input connection. I therefore create the output object for the
chain f1 -> [ f2 ] -> [ f3 ] and use SetOutput() on the
last filter. This way, the input connection to filters g1, h1 & j1 only
has to be set once.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>This is a technique I used in VTK 4.2 with the
'old' pipeline architecture. Are there any other ways to achieve this
effect?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Thanks for help.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>John.</FONT></DIV>
<DIV> </DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(0,0,0) 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV>
<DIV></DIV>
<DIV class=h5>
<DIV
style="FONT: 10pt arial; BACKGROUND: rgb(228,228,228); font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><B>From:</B>
<A title=dave.demarle@kitware.com href="mailto:dave.demarle@kitware.com"
target=_blank>David E DeMarle</A> </DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>To:</B>
<A title=jcplatt@dsl.pipex.com href="mailto:jcplatt@dsl.pipex.com"
target=_blank>John Platt</A> </DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Cc:</B>
<A title=vtkusers@vtk.org href="mailto:vtkusers@vtk.org"
target=_blank>vtkusers</A> </DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Sent:</B>
Wednesday, September 16, 2009 6:34 PM</DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Subject:</B>
Re: [vtkusers] Error using SetOutput()</DIV>
<DIV><BR></DIV>Are you sure you want to SetOutput? For the most part (that
is everywhere other than within the filter which typically gets its own
output from the executive and populates it) , filter outputs shouldn't be
messed with for two reasons :<BR><BR>* the next time the filter updates
the output will be replaced<BR><BR>* more than one thing can be connected
to a given filter's output, so changing the output or its contents will
cause inconsistency<BR><BR clear=all>David E DeMarle<BR>Kitware,
Inc.<BR>R&D Engineer<BR>28 Corporate Drive<BR>Clifton Park, NY
12065-8662<BR>Phone: 518-371-3971 x109<BR><BR><BR>
<DIV class=gmail_quote>On Tue, Sep 15, 2009 at 6:23 PM, John Platt <SPAN
dir=ltr><<A href="mailto:jcplatt@dsl.pipex.com"
target=_blank>jcplatt@dsl.pipex.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV bgcolor="#ffffff">
<DIV><FONT size=2 face=Arial>Hi,<BR>I am having trouble moving an output
between filters using SetOutput() as follows.</FONT></DIV>
<DIV><BR><FONT size=2 face=Arial>1. Single filter,
f1.<BR> vtkPolyData* myOutput =
vtkPolyData::New();</FONT></DIV>
<DIV><FONT size=2 face=Arial>
<DIV><FONT size=2 face=Arial> f1->SetOutput(
myOutput );</FONT></DIV>
<DIV> </DIV> vtkAppendPolyData* myAppend =
vtkAppendPolyData::New();</FONT></DIV>
<DIV><FONT size=2 face=Arial> myAppend->AddInput(
myOutput );</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT><FONT size=2 face=Arial></FONT><FONT
size=2 face=Arial></FONT><BR><FONT size=2 face=Arial>"myOutput" is
displayed correctly.</FONT></DIV><FONT face=Arial></FONT>
<DIV><BR><FONT size=2 face=Arial>2. Append filter f2 to
f1.<BR> f1->SetOutput( 0 );<BR>
f2->SetInputConnection( f1->GetOutputPort()
);<BR> f2->SetOutput( myOutput );</FONT></DIV><FONT
size=2 face=Arial>
<DIV><BR>"myOutput" does not appear to see the changes made by filter
f2.<BR></DIV>
<DIV>3. Remove filter f2.<BR>
f 2->Delete();<BR> f1->SetOutput( myOutput
);<BR></DIV>
<DIV>ERROR: In
/home/john/VTK/vtk-5.4.2/VTK/Filtering/vtkStreamingDemandDrivenPipeline.cxx,
line 747<BR>vtkStreamingDemandDrivenPipeline : No maximum number of
pieces has been set in the information for output port 0 on algorithm
vtkf1"<BR></DIV>
<DIV>Any help on using SetOutput() would be greatly appreciated.</DIV>
<DIV> </DIV>
<DIV>Thanks.</DIV>
<DIV> </DIV><FONT color=#888888>
<DIV>John.</DIV></FONT></FONT></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>Follow this
link to subscribe/unsubscribe:<BR><A
href="http://www.vtk.org/mailman/listinfo/vtkusers"
target=_blank>http://www.vtk.org/mailman/listinfo/vtkusers</A><BR><BR></BLOCKQUOTE></DIV><BR></DIV></DIV>
<P></P>
<HR>
<DIV class=im>
<P></P>_______________________________________________<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>Follow this link
to subscribe/unsubscribe:<BR><A
href="http://www.vtk.org/mailman/listinfo/vtkusers"
target=_blank>http://www.vtk.org/mailman/listinfo/vtkusers</A><BR></DIV></BLOCKQUOTE></DIV></BLOCKQUOTE></DIV><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>Powered by
www.kitware.com<BR><BR>Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html<BR><BR>Please keep messages
on-topic and check the VTK FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ<BR><BR>Follow this link to
subscribe/unsubscribe:<BR>http://www.vtk.org/mailman/listinfo/vtkusers<BR></BLOCKQUOTE></BODY></HTML>