<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16981" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=901173000-21042010><FONT face=Arial
size=2>Hi David,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=901173000-21042010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=901173000-21042010><FONT face=Arial
size=2>Thanks for your reply.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=901173000-21042010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=901173000-21042010><FONT face=Arial size=2>I
hadn't thought about when the input type does not match the output type - as you
say it wouldn't make sense to disable a filter in this case.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=901173000-21042010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=901173000-21042010><FONT face=Arial
size=2>It would be interesting to hear people's thoughts on
this..</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=901173000-21042010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=901173000-21042010><FONT face=Arial
size=2>cheers,</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV align=left><FONT face=Arial size=2>Allan James</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>High Performance Computing &
Research Support<BR>Queensland University of Technology<BR>(07) 3138 9264<BR><A
href="mailto:ar.james@qut.edu.au">ar.james@qut.edu.au</A><BR><A
href="http://www.qut.edu.au/its/hpc">http://www.qut.edu.au/its/hpc</A></FONT><FONT
face=Arial size=2><BR> <BR>><(((º> ._.·´¯`·..
>++(((º> ._.·´¯`·.. >++(((º></FONT></DIV>
<DIV> </DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> daviddoria@gmail.com
[mailto:daviddoria@gmail.com] <B>On Behalf Of </B>David Doria<BR><B>Sent:</B>
Tuesday, 20 April 2010 9:43 PM<BR><B>To:</B> Allan James<BR><B>Cc:</B>
vtkusers@vtk.org<BR><B>Subject:</B> Re: [vtkusers] How to disable a VTK filter
that is connected to a VTK pipeline<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=gmail_quote>On Tue, Mar 30, 2010 at 11:34 PM, Allan James <SPAN
dir=ltr><<A
href="mailto:ar.james@qut.edu.au">ar.james@qut.edu.au</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV>
<DIV><FONT face=Arial size=2><SPAN>Hi all,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN>Does anyone know if it is possible to
disable a VTK filter without removing it from the
pipeline?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN>For example, while using vtkImageMask, I
would like to allow the user to be able to select whether to apply a mask to
an image or not - </SPAN></FONT><FONT face=Arial size=2><SPAN>I would like
to enable/disable the vtkImageMask filter during runtime without having to
disconnect/reconnect the pipeline everytime.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN>I am sure there are work-arounds
depending on the filter in question (such as setting a null mask image
perhaps?) - however, generally speaking it would be nice to be able to
disable a filter and have the input data pass through
untouched - is this possible in VTK?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN>Thanks,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><FONT face=Arial size=2>Allan James</FONT></DIV>
<DIV align=left></DIV></DIV></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV class=gmail_quote>Allan,</DIV>
<DIV class=gmail_quote><BR></DIV>
<DIV class=gmail_quote>This is a really good idea. I find myself constantly
having lines like this:</DIV>
<DIV class=gmail_quote><BR></DIV>
<DIV class=gmail_quote>nextFilter->SetInput(reader->GetOutput());</DIV>
<DIV
class=gmail_quote>//nextFilter->SetInput(lastFilter->GetOutput());</DIV>
<DIV class=gmail_quote><BR></DIV>
<DIV class=gmail_quote>When I want to test what happens when I skip a filter.
It would make a lot more sense to call lastFilter->Disable(). In cases
where the output type is the same as the input type, we could make Disable()
just pass the input through to the output. In cases where they DONT match, I
don't think it makes sense to disable the filter.</DIV>
<DIV class=gmail_quote><BR></DIV>
<DIV class=gmail_quote>Any comments from the devels?</DIV><BR
clear=all>Thanks,<BR><BR>
<DIV>David</DIV></DIV></BLOCKQUOTE></BODY></HTML>