[Paraview] Active Stereo on OS X

Andreas M. Gerndt andreas at louisiana.edu
Thu May 3 14:49:14 EDT 2007


Mike,

I posted a general solution to the mailing list two weeks ago. Meanwhile, I 
found also a way to modify the parallax by changing the EyeAngle property of 
the active camera. But keep into mind that my solution must be re-compiled 
into Paraview. It works fine with Linux in single display mode. I am not sure 
if this is the way to do that in ParaView. Anyway, this could help your 
friend with his Mac.

Andreas

===========================================================================
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());
    }
    if (pvm->GetOptions()->GetUseStereoRendering() > 0)
    {
       vtkSMDoubleVectorProperty * dvp =
          vtkSMDoubleVectorProperty::SafeDownCast(
           this->ActiveCameraProxy->GetProperty ("EyeAngle"));
        if (!dvp)
        {
          vtkErrorMacro("Failed to find property EyeAngle.");
        }
        else
        {
          // TODO: make it configurable!
          //dvp->SetElement(0, pvm->GetOptions()->GetEyeAngle());
          dvp->SetElement(0, 0.2);
        }
    }
...

===========================================================================
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>
...
  <ProxyGroup name="camera">
...
      <DoubleVectorProperty
        name="EyeAngle"
        command="SetEyeAngle"
        number_of_elements="1"
        default_values="0.2">  <!-- REDUCED -->
        <DoubleRangeDomain name="range" min="0" />
      </DoubleVectorProperty>
...
===========================================================================



On Thursday 03 May 2007 11:44, Mike Jackson wrote:
> This came in from a friend of mine:
> > quick question: if I want to start paraview in red-blue stereo mode
> > from X11 on the Mac, I simply type paraview --stereo
> >
> > What is the corresponding command to use active stereo?  I couldn't
> > find it in the manual or help pages...
>
> I had no idea.. Anyone want to help a friend out?
>
> --
> Mike Jackson
> imikejackson & gmail * com
>
>
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview

-- 

--------------------------------------------
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