<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 9pt;
font-family:·s²Ó©úÅé
}
--></style>
</head>
<body class='hmmessage'>
<FONT size=2>Dear all :</FONT><BR>
<FONT size=2> </FONT><BR>
<FONT size=2></FONT> <BR>
<FONT size=2> <FONT color=#000000>OS : windows 7 64bit</FONT></FONT><BR>
<FONT color=#000000 size=2> VTK: 5.6 Version</FONT><BR>
<FONT color=#000000 size=2> Display Card : Quadro FX 570</FONT><BR>
<FONT color=#000000 size=2> Monitor : ASUS VG 236 H with NVIDIA 3D VISION KIT</FONT><BR>
<FONT color=#000000 size=2></FONT> <BR>
<FONT color=#000000 size=2> I code a stereo test program using VC2008. The following is my code.</FONT><BR>
<FONT size=2></FONT> <BR>
<FONT color=#000000 size=2> //---------------------------------------------------------------------------------------------------------------</FONT><BR>
<FONT color=#000000 size=2> vtkVolume16Reader *v16 = vtkVolume16Reader::New();</FONT><BR>
<FONT color=#000000 size=2> v16->SetDataDimensions( 64, 64);<BR> v16->SetDataByteOrderToLittleEndian();</FONT><BR>
<FONT color=#000000 size=2> v16->SetImageRange( 1, 93);<BR> v16->SetDataSpacing( 3.2, 3.2, 1.5);</FONT><BR>
<FONT color=#000000 size=2> v16->SetFilePrefix( "C:\\VTKData5.6\\Data\\headsq\\quarter" );</FONT><BR>
<FONT color=#000000 size=2> v16->SetFilePattern("%s.%d");<BR> v16->SetDataMask( 0x7fff);<BR> v16->Update();</FONT><BR>
<FONT color=#000000 size=2> </FONT><BR>
<FONT color=#000000 size=2> vtkContourFilter *contour = vtkContourFilter::New();<BR> contour->SetInputConnection(v16->GetOutputPort());<BR> contour->SetValue(0,1500);<BR> contour->SetValue(1,2500);</FONT><BR>
<FONT color=#000000 size=2> </FONT><BR>
<FONT color=#000000 size=2> vtkPolyDataNormals *skinNormals = vtkPolyDataNormals::New();<BR> skinNormals->SetInputConnection(contour->GetOutputPort());<BR> skinNormals->SetFeatureAngle(60.0);<BR> <BR> vtkPolyDataMapper *skinMapper = vtkPolyDataMapper::New();<BR> skinMapper->SetInputConnection(skinNormals->GetOutputPort());<BR> skinMapper->ScalarVisibilityOff();<BR> <BR> vtkActor *skin = vtkActor::New();<BR> skin->SetMapper(skinMapper);</FONT><BR>
<FONT color=#000000 size=2></FONT> <BR>
<FONT color=#000000 size=2> vtkRenderer *renderer = vtkRenderer::New();<BR> renderer->AddActor(skin);<BR> renderer->SetBackground(0,0,0);</FONT><BR>
<FONT color=#000000 size=2> </FONT><BR>
<FONT color=#000000 size=2> vtkRenderWindow *renWin = vtkRenderWindow::New();<BR> renWin->AddRenderer(renderer);<BR> renWin->SetStereoCapableWindow(1);<BR> renWin->StereoRenderOn();<BR> renWin->SetStereoTypeToCrystalEyes();<BR> renWin->StereoUpdate();</FONT><BR>
<FONT color=#000000 size=2> </FONT><BR>
<FONT color=#000000 size=2> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<BR> iren->SetRenderWindow(renWin);<BR> <BR> iren->Initialize();<BR> iren->Start();</FONT><BR>
<FONT color=#000000 size=2> //---------------------------------------------------------------------------------------------------------------</FONT><BR>
<FONT size=2></FONT> <BR>
<FONT size=2> The above code can render 3D image for Crystal eyes correctly. </FONT><BR>
<FONT size=2> However, when i use the same code on Borland C++ Builder, the stereo mode don't work.</FONT><BR>
<FONT size=2> I use ComboBox to select the stereo mode dynamically.</FONT><BR>
<FONT size=2> The effect work well except the crystal eyes.</FONT><BR>
<FONT size=2> This is my event code for ComboBox.</FONT><BR>
<FONT size=2></FONT> <BR>
<FONT size=2> //---------------------------------------------------------------------------------------------------------------</FONT><BR>
<FONT size=2> void __fastcall TForm1::ComboBox1Change(TObject *Sender)<BR> {<BR> TComboBox *cb = dynamic_cast<TComboBox *>(Sender);</FONT><BR>
<FONT size=2> </FONT><BR>
<FONT size=2> // The following code is essential. Because the stereo capable window must "ON" before the "the render window" rendered.</FONT><BR>
<FONT size=2> vtkWindow->GetRenderWindow()->Finalize();<BR> vtkWindow->GetRenderWindow()->SetStereoCapableWindow(1);<BR> vtkWindow->GetRenderWindow()->StereoRenderOn();</FONT><BR>
<FONT size=2> </FONT><BR>
<FONT size=2> switch (cb->ItemIndex) {<BR> case 0:<BR> vtkWindow->GetRenderWindow()->SetStereoTypeToDresden();<BR> break;<BR> case 1:<BR> vtkWindow->GetRenderWindow()->SetStereoTypeToCheckerboard();<BR> break;<BR> case 2:<BR> vtkWindow->GetRenderWindow()->SetStereoTypeToInterlaced();<BR> break;<BR> case 3:<BR> vtkWindow->GetRenderWindow()->SetStereoTypeToAnaglyph();<BR> break;<BR> case 4:<BR> vtkWindow->GetRenderWindow()->SetStereoTypeToRedBlue();<BR> break;<BR> case 5:<BR> vtkWindow->GetRenderWindow()->SetStereoTypeToCrystalEyes();<BR> break;<BR> case 6:<BR> vtkWindow->GetRenderWindow()->SetStereoTypeToLeft();<BR> break;<BR> case 7:<BR> vtkWindow->GetRenderWindow()->SetStereoTypeToRight();<BR> break;<BR> default:<BR> break;<BR> }</FONT><BR>
<FONT size=2> <BR> // My function to refresh vtkBorlandRenderWindow<BR> winRefresh();</FONT><BR>
}<BR>
<FONT size=2> //---------------------------------------------------------------------------------------------------------------</FONT><BR>
<FONT size=2></FONT> <BR>
<FONT size=2></FONT> <BR>
<FONT size=2>Does anyone meet the problem? How to resolve the problem??</FONT><BR>
<FONT size=2>Thanks</FONT><BR>
<BR>
<BR>
<BR>
<BR>
Wallance Lin<BR>
<BR>                                            </body>
</html>