[Paraview] Arbitrary Stereo Modes

Andreas M. Gerndt andreas at louisiana.edu
Thu Apr 12 17:38:03 EDT 2007


Hi all,

ParaView offers a flag called "--stereo". This enables Red-Blue stereo, which 
is not really the best approach to present scientific data in stereo.

Some small changes of ParaView's source code (v.2.6.0) yield a more flexible 
stereo mode selection:

===========================================================================
Servers/Common/vtkPVOptions.cxx:
...
  /*this->AddBooleanArgument("--stereo", 0, &this->UseStereoRendering,
                           "Tell the application to enable stereo rendering"
                           " (only when running on a single process).",
                           vtkPVOptions::PVCLIENT | vtkPVOptions::PARAVIEW);*/
  this->AddArgument ("--stereo", 0, &this->UseStereoRendering,
                           "Tell the application which stereo render mode to 
use."
                           " (only when running on a single process).",
                           vtkPVOptions::PVCLIENT | vtkPVOptions::PARAVIEW);
...

===========================================================================
Servers/ServerManager/vtkSMRenderModuleProxy.cxx:
...
  if (pvm->GetOptions()->GetUseStereoRendering() > 0)
    {
...
    // vtkRenderWindow.h:
    // #define VTK_STEREO_CRYSTAL_EYES 1
    // #define VTK_STEREO_RED_BLUE     2
    // #define VTK_STEREO_INTERLACED   3
    // #define VTK_STEREO_LEFT         4
    // #define VTK_STEREO_RIGHT        5
    // #define VTK_STEREO_DRESDEN      6
    // #define VTK_STEREO_ANAGLYPH     7
    ivp = vtkSMIntVectorProperty::SafeDownCast(
      this->RenderWindowProxy->GetProperty("StereoType"));
    if (!ivp)
      {
      vtkErrorMacro("Failed to find property StereoType.");
      return;
      }
      ivp->SetElement(0, pvm->GetOptions()->GetUseStereoRendering());
    }
...

===========================================================================
Servers/ServerManager/Resources/rendering.xml:
...
  <ProxyGroup name="renderwindow">
...
      <IntVectorProperty
        name="StereoType"
        command="SetStereoType"
        number_of_elements="1"
        default_values="0">
        <IntRangeDomain name="range" min="0" max="7"/>
      </IntVectorProperty>
...
===========================================================================

Now e.g. "paraview --stereo=1" can be used to switch active stereo on. I 
wonder whether my changes are already sufficient for a general purpose in 
ParaView.

Changing stereo settings by means of the GUI would be a nice think. Is this 
already possible?

I can use ParaView now on our large immersive displays, but the eye distance 
is too large. How can I additionally change EyeAngle, Distance etc. of the 
vtkCamera object to adjust the stereo parallax?

Andreas

-- 

--------------------------------------------
Andreas M. Gerndt
Louisiana Immersive Technologies Enterprise
University of Louisiana at Lafayette (ULL)
537 Cajundome Boulevard
Lafayette, LA 70506, USA
Office: (337) 482-9609
Fax:    (337) 735-1346
mailto: andreas at louisiana.edu
http://www.lite3d.com
http://www.ull.edu
--------------------------------------------
. 


More information about the ParaView mailing list