[vtkusers] Interactive changes to visualisation pipeline

David.Pont at ForestResearch.co.nz David.Pont at ForestResearch.co.nz
Sun Mar 14 15:19:31 EST 2004


Hi John,
   whats wrong with creating the full pipeline, then anytime the user wants
to switch, doing something like:

  if ( F1Enabled )
    {
    F2->SetInput( F1->GetOutput() );
    F4->SetInput( F1->GetOutput() );
    }
  else
    {
    F2->SetInput( S->GetOutput() );
    F4->SetInput( S->GetOutput() );
    }
  myRenderWindow->Render();

Dave P



                                                                                                               
                      "John Platt"                                                                             
                      <jcplatt at lineone.        To:       <vtkusers at vtk.org>                                    
                      net>                     cc:                                                             
                      Sent by:                 Subject:  [vtkusers] Interactive changes to visualisation       
                      vtkusers-admin at vt         pipeline                                                       
                      k.org                                                                                    
                                                                                                               
                                                                                                               
                      13/03/2004 11:42                                                                         
                                                                                                               
                                                                                                               




Hi All,

I was wondering if anybody can give advice/preferences on making
interactive changes to a pipeline.

The particular pipeline structure of interest is shown below where the
source, S, is a vtkDataSet.

            S  >  F1   >    F2 > F3 ?           Mapper1
                           >    F4 > F5 ?           Mapper2
                           ??

F1 is the filter that needs to be switched in or out. It is also special in
that the input and output are of the same type.
Several approaches appear possible.

1. Leave F1 in place and configure so that F1->GetOutput() =
S->GetOutput(). This seems wasteful unless a bypass method could be added
which did precisely this.

2. Manage the section S > F1 manually. Connect F2 & F4 directly to S and
overwrite S using S->ShallowCopy(F1->GetOutput() ). A safe copy of the
original S is made so that when F1 is not required this is used in the
ShallowCopy().

3. Find all the current consumers of S or F1 and reset the inputs to F1 or
S.

4. Try and architect the system so the entire pipeline can easily be
rebuilt.

Perhaps there are other ways? Any comments welcomed.

John.



_







More information about the vtkusers mailing list