[vtkusers] Interactive changes to visualisation pipeline

David.Pont at ForestResearch.co.nz David.Pont at ForestResearch.co.nz
Sun Mar 14 20:40:31 EST 2004


Hi John,
   I am no expert, you might want to look under the hood of apps like
ParaView, MayaVi, RPD, etc, that allow interactive pipeline creation to see
if there are any lessons there. I think the ability to do this kind of
stuff is just one of the benefits of the vtk 'pipeline' design.
The obvious problem is avoiding filter input/output incompatibility,
vtkCastToConcrete will probably be useful. You should instantiate filters
on demand rather than at start up (unless there is a small set known
before). Get clear on reference counting and use it correctly.
   Dave P.


                                                                                                               
                      "John Platt"                                                                             
                      <jcplatt at lineone.        To:       <David.Pont at ForestResearch.co.nz>                     
                      net>                     cc:       <vtkusers at vtk.org>                                    
                                               Subject:  RE: [vtkusers] Interactive changes to visualisation   
                      15/03/2004 09:58          pipeline                                                       
                                                                                                               
                                                                                                               




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