[vtkusers] Interactive changes to visualisation pipeline

John Platt jcplatt at lineone.net
Sun Mar 14 15:58:41 EST 2004


Hi Dave,

Thanks for your suggestion. What I didn't state in my original mail was
that the filters F2, F4 are not easily tracked and could also be
switched in or out (likewise all filters up to the mapper).

However, this is the essence of what I had in mind as option 3.

I suppose what I am looking for is guidance on 'best' pipeline protocol.
Am I going to run into trouble making local changes to the pipeline
connectivity or switching filter types?

John.

-----Original Message-----
From: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org] On Behalf
Of David.Pont at ForestResearch.co.nz
Sent: 14 March 2004 20:20
To: John Platt
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Interactive changes to visualisation pipeline


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.



_




_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers





More information about the vtkusers mailing list