[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtkusers
Subject:    [vtkusers] Rendering multiple objects in one render window
From:       WangQ <wangq1979 () outlook ! com>
Date:       2015-12-28 14:06:23
Message-ID: SNT153-W55A118E6AA750B3D6753ECB4FB0 () phx ! gbl
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]

[Attachment #4 (text/plain)]

Hello there, 
I am quite new to VTK, and I am trying to render a volume and an isosurface in one \
render window using viewpoint. I follow the example of \
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/StructuredDataTypes but no \
luck so far. Here is the code I wrote. Could anyone help to figure out where is \
wrong?  Would appreciate any help.

               // Create an image data        vtkSmartPointer<vtkImageData> imageData \
                =            vtkSmartPointer<vtkImageData>::New();				// load data \
                here
        // Define viewport ranges        double upperViewport[4] = {0.0, 0.0, 1.0, \
0.5};        double centerViewport[4] = {0.0, 0.5, 1.0, 1.0};  // create render \
window        vtkSmartPointer<vtkRenderWindow> renWin = \
vtkSmartPointer<vtkRenderWindow>::New();        \
vtkSmartPointer<vtkRenderWindowInteractor> iren =            \
vtkSmartPointer<vtkRenderWindowInteractor>::New();        renWin->SetSize(1200, 600); \
renWin->Render();        renWin->SetWindowName("Volume Clipping");        \
iren->SetRenderWindow(renWin);  \
/****************************************************************                 \
create volume renderer to render stacked tomograms        \
****************************************************************/         \
vtkSmartPointer<vtkSmartVolumeMapper> volumeMapper =            \
vtkSmartPointer<vtkSmartVolumeMapper>::New();        \
volumeMapper->SetBlendModeToComposite(); // composite first        \
volumeMapper->SetInputData(imageData);        \
volumeMapper->SetInterpolationModeToLinear();        \
volumeMapper->SetRequestedRenderModeToGPU();  vtkSmartPointer<vtkVolumeProperty> \
volumeProperty =            vtkSmartPointer<vtkVolumeProperty>::New();        \
volumeProperty->SetInterpolationType(VTK_LINEAR_INTERPOLATION);        \
volumeProperty->ShadeOff();  vtkSmartPointer<vtkColorTransferFunction> color =        \
vtkSmartPointer<vtkColorTransferFunction>::New();        \
//color->SetColorSpaceToRGB();        color->AddRGBPoint(0.0, 0.0, 0.0, 1.0);        \
color->AddRGBPoint(0.25, 0.0, 1.0, 1.0);        color->AddRGBPoint(0.5, 0.0, 1.0, \
0.0);        color->AddRGBPoint(0.75, 1.0, 1.0, 0.0);        color->AddRGBPoint(1.0, \
1.0, 0.0, 0.0);        color->SetScaleToLinear();        \
volumeProperty->SetColor(color);  vtkSmartPointer<vtkPiecewiseFunction> \
compositeOpacity =            vtkSmartPointer<vtkPiecewiseFunction>::New();        \
compositeOpacity->AddPoint(-1.0, 0.0);        compositeOpacity->AddPoint(0.0, 0.0);   \
compositeOpacity->AddPoint(0.39, 0.4);        compositeOpacity->AddPoint(0.4, 0.8);   \
compositeOpacity->AddPoint(1.0, 1.0);        \
volumeProperty->SetScalarOpacity(compositeOpacity);		        \
vtkSmartPointer<vtkVolume> volume =            vtkSmartPointer<vtkVolume>::New();     \
volume->SetMapper(volumeMapper);        volume->SetProperty(volumeProperty);  \
vtkSmartPointer<vtkRenderer> volumeRenderer = vtkSmartPointer<vtkRenderer>::New();    \
renWin->AddRenderer(volumeRenderer);        \
volumeRenderer->SetViewPoint(upperViewport); // position volume rendering at upper \
part        volumeRenderer->SetBackground(0.4, 0.5, 0.6);  \
vtkSmartPointer<vtkScalarBarWidget> scalarWidget =            \
vtkSmartPointer<vtkScalarBarWidget>::New();        scalarWidget->SetInteractor(iren); \
scalarWidget->GetScalarBarActor()->SetTitle("Concentration");        \
scalarWidget->GetScalarBarActor()->SetLookupTable(color);        \
scalarWidget->GetScalarBarActor()->SetOrientationToHorizontal();        \
scalarWidget->RepositionableOn();        scalarWidget->ResizableOn();        \
scalarWidget->EnabledOn();  vtkSmartPointer<vtkAxesActor> axes =            \
vtkSmartPointer<vtkAxesActor>::New();        axes->SetTotalLength(50.0, 50.0, 50.0);  \
/**********************************End of volume \
renderer*********************************/  \
/****************************************************************        create \
contour renderer to contouring stacked tomograms        \
****************************************************************/        // Create an \
isosurface        vtkSmartPointer<vtkContourFilter> contourFilter =            \
vtkSmartPointer<vtkContourFilter>::New();        \
contourFilter->SetInputData(imageData);		        const double isovalue = 0.6;        \
contourFilter->GenerateValues(1, isovalue, isovalue); // (numContours, rangeStart, \
rangeEnd)        // Map the contours to graphical primitives        \
vtkSmartPointer<vtkPolyDataMapper> contourMapper =            \
vtkSmartPointer<vtkPolyDataMapper>::New();        \
contourMapper->SetInputData(contourFilter->GetOutput());  // Create an actor for the \
contours        vtkSmartPointer<vtkActor> contourActor =            \
vtkSmartPointer<vtkActor>::New();        contourActor->SetMapper(contourMapper);  // \
Create the outline        vtkSmartPointer<vtkOutlineFilter> outlineFilter =           \
vtkSmartPointer<vtkOutlineFilter>::New();        \
outlineFilter->SetInputData(imageData);		        vtkSmartPointer<vtkPolyDataMapper> \
outlineMapper =            vtkSmartPointer<vtkPolyDataMapper>::New();        \
outlineMapper->SetInputData(outlineFilter->GetOutput());        \
vtkSmartPointer<vtkActor> outlineActor =            vtkSmartPointer<vtkActor>::New(); \
outlineActor->SetMapper(outlineMapper);  // Visualize        \
vtkSmartPointer<vtkRenderer> contourRenderer =            \
vtkSmartPointer<vtkRenderer>::New();        renWin->AddRenderer(contourRenderer);     \
contourRenderer->SetViewPoint(centerViewport);        \
contourRenderer->SetBackground(0.5, .4, .6);        \
/**********************************End of contour \
                renderer*********************************/
        volumeRenderer->AddActor(volume);        volumeRenderer->AddActor(axes);
        contourRenderer->AddActor(contourActor);        \
                contourRenderer->AddActor(outlineActor);
        contourRenderer->SetActiveCamera(volumeRenderer->GetActiveCamera());        \
                volumeRenderer->ResetCamera();        contourRenderer->ResetCamera();
        // Render composite. In default mode. For coverage.        renWin->Render();  \
iren->Start(); 		 	   		  


[Attachment #5 (text/html)]

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><span style="color: rgb(34, 34, 34); \
font-family: arial, sans-serif; font-size: 12.8px; background-color: rgb(255, 255, \
255);">Hello there,&nbsp;</span><div style="color: rgb(34, 34, 34); font-family: \
arial, sans-serif; font-size: 12.8px; background-color: rgb(255, 255, \
255);"><br></div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; \
font-size: 12.8px; background-color: rgb(255, 255, 255);">I am quite new to VTK, and \
I am trying to render a volume and an isosurface in one render window using \
viewpoint. I follow the example of&nbsp;<a \
href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/StructuredDataTypes" \
target="_blank" style="color: rgb(17, 85, \
204);">http://www.vtk.org/Wiki/<wbr>VTK/Examples/Cxx/<wbr>Visualization/<wbr>StructuredDataTypes</a>&nbsp;but \
no luck so far. Here is the code I wrote. Could anyone help to figure out where is \
wrong?&nbsp;</div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; \
font-size: 12.8px; background-color: rgb(255, 255, 255);"><br></div><div \
style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8px; \
background-color: rgb(255, 255, 255);">Would appreciate any help.</div><div \
style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8px; \
background-color: rgb(255, 255, 255);"><br></div><div style="color: rgb(34, 34, 34); \
font-family: arial, sans-serif; font-size: 12.8px; background-color: rgb(255, 255, \
255);"><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp;</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; // Create an image data</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;vtkImageData&gt; imageData =</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; vtkSmartPointer&lt;vtkImageData&gt;:<wbr>:New();</div><div><span \
style="white-space: pre-wrap;">		</span></div><div><span style="white-space: \
pre-wrap;">		</span>// load data here</div><div><br></div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; // Define viewport ranges</div><div>&nbsp; &nbsp; &nbsp; &nbsp; double \
upperViewport[4] = {0.0, 0.0, 1.0, 0.5};</div><div>&nbsp; &nbsp; &nbsp; &nbsp; double \
centerViewport[4] = {0.0, 0.5, 1.0, 1.0};</div><div><br></div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; // create render window</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkRenderWindow&gt; renWin = \
vtkSmartPointer&lt;<wbr>vtkRenderWindow&gt;::New();</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; vtkSmartPointer&lt;<wbr>vtkRenderWindowInteractor&gt; iren =</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkRenderWindowInteractor&gt;::<wbr>New();</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; renWin-&gt;SetSize(1200, 600);</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; renWin-&gt;Render();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
renWin-&gt;SetWindowName("Volume Clipping");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
iren-&gt;SetRenderWindow(renWin);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; /*****************************<wbr>******************************<wbr>*****</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;create volume renderer to \
render stacked tomograms</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
******************************<wbr>******************************<wbr>****/&nbsp;</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; vtkSmartPointer&lt;<wbr>vtkSmartVolumeMapper&gt; volumeMapper \
=</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkSmartVolumeMapper&gt;::New();</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; volumeMapper-&gt;<wbr>SetBlendModeToComposite(); // composite \
first</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
volumeMapper-&gt;SetInputData(<wbr>imageData);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
volumeMapper-&gt;<wbr>SetInterpolationModeToLinear()<wbr>;</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; volumeMapper-&gt;<wbr>SetRequestedRenderModeToGPU();</div><div><br></div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; vtkSmartPointer&lt;<wbr>vtkVolumeProperty&gt; volumeProperty \
=</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkVolumeProperty&gt;::New();</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; volumeProperty-&gt;<wbr>SetInterpolationType(VTK_<wbr>LINEAR_INTERPOLATION);</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; volumeProperty-&gt;ShadeOff();</div><div><br></div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; vtkSmartPointer&lt;<wbr>vtkColorTransferFunction&gt; color \
=</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkColorTransferFunction&gt;::<wbr>New();</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; //color-&gt;SetColorSpaceToRGB();</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; color-&gt;AddRGBPoint(0.0, 0.0, 0.0, 1.0);</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; color-&gt;AddRGBPoint(0.25, 0.0, 1.0, 1.0);</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; color-&gt;AddRGBPoint(0.5, 0.0, 1.0, 0.0);</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; color-&gt;AddRGBPoint(0.75, 1.0, 1.0, 0.0);</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; color-&gt;AddRGBPoint(1.0, 1.0, 0.0, 0.0);</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; color-&gt;SetScaleToLinear();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
volumeProperty-&gt;SetColor(<wbr>color);</div><div><br></div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; vtkSmartPointer&lt;<wbr>vtkPiecewiseFunction&gt; compositeOpacity \
=</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkPiecewiseFunction&gt;::New();</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; compositeOpacity-&gt;AddPoint(-1.<wbr>0, 0.0);</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; compositeOpacity-&gt;AddPoint(0.<wbr>0, 0.0);</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; compositeOpacity-&gt;AddPoint(0.<wbr>39, 0.4);</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; compositeOpacity-&gt;AddPoint(0.<wbr>4, 0.8);</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; compositeOpacity-&gt;AddPoint(1.<wbr>0, 1.0);</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; volumeProperty-&gt;<wbr>SetScalarOpacity(<wbr>compositeOpacity);</div><div><span \
style="white-space: pre-wrap;">		</span></div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;vtkVolume&gt; volume =</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; vtkSmartPointer&lt;vtkVolume&gt;::<wbr>New();</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; volume-&gt;SetMapper(<wbr>volumeMapper);</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; volume-&gt;SetProperty(<wbr>volumeProperty);</div><div><br></div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; vtkSmartPointer&lt;vtkRenderer&gt; volumeRenderer = \
vtkSmartPointer&lt;vtkRenderer&gt;::<wbr>New();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
renWin-&gt;AddRenderer(<wbr>volumeRenderer);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
volumeRenderer-&gt;SetViewPoint(<wbr>upperViewport); // position volume rendering at \
upper part</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
volumeRenderer-&gt;SetBackground(<wbr>0.4, 0.5, 0.6);</div><div><br></div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; vtkSmartPointer&lt;<wbr>vtkScalarBarWidget&gt; scalarWidget \
=</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkScalarBarWidget&gt;::New();</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; scalarWidget-&gt;SetInteractor(<wbr>iren);</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; scalarWidget-&gt;<wbr>GetScalarBarActor()-&gt;SetTitle(<wbr>"Concentration");</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; \
scalarWidget-&gt;<wbr>GetScalarBarActor()-&gt;<wbr>SetLookupTable(color);</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; \
scalarWidget-&gt;<wbr>GetScalarBarActor()-&gt;<wbr>SetOrientationToHorizontal();</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; scalarWidget-&gt;<wbr>RepositionableOn();</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; scalarWidget-&gt;ResizableOn();</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; scalarWidget-&gt;EnabledOn();</div><div><br></div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; vtkSmartPointer&lt;vtkAxesActor&gt; axes =</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;vtkAxesActor&gt;:<wbr>:New();</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; axes-&gt;SetTotalLength(50.0, 50.0, 50.0);</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; /*****************************<wbr>*****End of volume \
renderer**********************<wbr>***********/</div><div><br></div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; \
/*****************************<wbr>******************************<wbr>*****</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; create contour renderer to contouring stacked \
tomograms</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
******************************<wbr>******************************<wbr>****/</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; // Create an isosurface</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkContourFilter&gt; contourFilter =</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkContourFilter&gt;::New();</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; contourFilter-&gt;SetInputData(<wbr>imageData);</div><div><span \
style="white-space: pre-wrap;">		</span></div><div>&nbsp; &nbsp; &nbsp; &nbsp; const \
double isovalue = 0.6;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
contourFilter-&gt;GenerateValues(<wbr>1, isovalue, isovalue); // (numContours, \
rangeStart, rangeEnd)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Map the contours to \
graphical primitives</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkPolyDataMapper&gt; contourMapper =</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkPolyDataMapper&gt;::New();</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; contourMapper-&gt;SetInputData(<wbr>contourFilter-&gt;GetOutput());</div><div><br></div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; // Create an actor for the contours</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; vtkSmartPointer&lt;vtkActor&gt; contourActor =</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;vtkActor&gt;::<wbr>New();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
contourActor-&gt;SetMapper(<wbr>contourMapper);</div><div><br></div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; // Create the outline</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkOutlineFilter&gt; outlineFilter =</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkOutlineFilter&gt;::New();</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; outlineFilter-&gt;SetInputData(<wbr>imageData);</div><div><span \
style="white-space: pre-wrap;">		</span></div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkPolyDataMapper&gt; outlineMapper =</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;<wbr>vtkPolyDataMapper&gt;::New();</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; outlineMapper-&gt;SetInputData(<wbr>outlineFilter-&gt;GetOutput());</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; vtkSmartPointer&lt;vtkActor&gt; outlineActor =</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;vtkActor&gt;::<wbr>New();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
outlineActor-&gt;SetMapper(<wbr>outlineMapper);</div><div><br></div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; // Visualize</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
vtkSmartPointer&lt;vtkRenderer&gt; contourRenderer =</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; vtkSmartPointer&lt;vtkRenderer&gt;::<wbr>New();</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; renWin-&gt;AddRenderer(<wbr>contourRenderer);</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; \
contourRenderer-&gt;SetViewPoint(<wbr>centerViewport);</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; contourRenderer-&gt;<wbr>SetBackground(0.5, .4, .6);</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; /*****************************<wbr>*****End of contour \
renderer**********************<wbr>***********/</div><div><br></div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; volumeRenderer-&gt;AddActor(<wbr>volume);</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; \
volumeRenderer-&gt;AddActor(axes)<wbr>;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; contourRenderer-&gt;AddActor(<wbr>contourActor);</div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; contourRenderer-&gt;AddActor(<wbr>outlineActor);</div><div><br></div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; \
contourRenderer-&gt;<wbr>SetActiveCamera(<wbr>volumeRenderer-&gt;<wbr>GetActiveCamera());</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; volumeRenderer-&gt;ResetCamera();</div><div>&nbsp; &nbsp; &nbsp; \
&nbsp; contourRenderer-&gt;ResetCamera()<wbr>;</div><div><br></div><div>&nbsp; &nbsp; \
&nbsp; &nbsp; // Render composite. In default mode. For coverage.</div><div>&nbsp; \
&nbsp; &nbsp; &nbsp; renWin-&gt;Render();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
iren-&gt;Start();</div></div> 		 	   		  </div></body> </html>



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic