<div dir="ltr">I think the X3d exporter only export surface mesh and not volume rendered data.<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 9, 2013 at 1:34 AM, Emptystack <span dir="ltr">&lt;<a href="mailto:wulihouxiaoshuai@163.com" target="_blank">wulihouxiaoshuai@163.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,everyone! I want to export the MIP volume rendering to a X3D file,but<br>
something unexpected happened.The bug is &quot;vtkX3DExporter (05C64BA0): no<br>
actors found for writing X3D file.&quot; But from the<br>
following code,we can see that I attach the volume to the render. I don&#39;t<br>
know where I am wrong,<br>
could anyone give me some help?<br>
<br>
Many thanks!<br>
<br>
<br>
<br>
int main( int argc, char *argv[] )<br>
{<br>
        vtkRenderer *renderer = vtkRenderer::New();<br>
<br>
<br>
        vtkRenderWindow *renWin = vtkRenderWindow::New();<br>
        renWin-&gt;AddRenderer(renderer);<br>
<br>
        vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<br>
        iren-&gt;SetRenderWindow(renWin);<br>
<br>
        vtkDICOMImageReader*reader=vtkDICOMImageReader::New();<br>
        reader-&gt;SetDirectoryName(&quot;D:/image/CT&quot;);<br>
        reader-&gt;Update();<br>
<br>
        vtkColorTransferFunction*<br>
colorTransforFunction=vtkColorTransferFunction::New();<br>
        colorTransforFunction-&gt;AddRGBSegment(0,1,1,1,255,1,1,1);<br>
<br>
        vtkPiecewiseFunction* opacityFun=vtkPiecewiseFunction::New();<br>
        opacityFun-&gt;AddSegment(-3024,0,1694,1);<br>
<br>
        vtkVolumeProperty* volumeProperty=vtkVolumeProperty::New();<br>
        volumeProperty-&gt;SetColor(colorTransforFunction);<br>
        volumeProperty-&gt;SetScalarOpacity(opacityFun);<br>
        volumeProperty-&gt;SetInterpolationTypeToLinear();<br>
<br>
        vtkGPUVolumeRayCastMapper* mapper=vtkGPUVolumeRayCastMapper::New();<br>
        mapper-&gt;SetInput(reader-&gt;GetOutput());<br>
        mapper-&gt;SetBlendModeToMaximumIntensity();<br>
        mapper-&gt;Update();<br>
<br>
        vtkVolume* volume=vtkVolume::New();<br>
        volume-&gt;SetMapper(mapper);<br>
        volume-&gt;SetProperty(volumeProperty);<br>
<br>
     renderer-&gt;AddVolume(volume);<br>
<br>
<br>
<br>
  renWin-&gt;Render();<br>
<br>
<br>
  vtkX3DExporter *exporter = vtkX3DExporter::New();<br>
  exporter-&gt;SetInput(renWin);<br>
  exporter-&gt;SetFileName(&quot;testX3DExporter.x3d&quot;);<br>
  exporter-&gt;Update();<br>
  exporter-&gt;Write();<br>
<br>
  iren-&gt;Start();<br>
}<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/vtkX3DExporter-tp5724920.html" target="_blank">http://vtk.1045678.n5.nabble.com/vtkX3DExporter-tp5724920.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br></div>