<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"><<a href="mailto:wulihouxiaoshuai@163.com" target="_blank">wulihouxiaoshuai@163.com</a>></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 "vtkX3DExporter (05C64BA0): no<br>
actors found for writing X3D file." But from the<br>
following code,we can see that I attach the volume to the render. I don'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->AddRenderer(renderer);<br>
<br>
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<br>
iren->SetRenderWindow(renWin);<br>
<br>
vtkDICOMImageReader*reader=vtkDICOMImageReader::New();<br>
reader->SetDirectoryName("D:/image/CT");<br>
reader->Update();<br>
<br>
vtkColorTransferFunction*<br>
colorTransforFunction=vtkColorTransferFunction::New();<br>
colorTransforFunction->AddRGBSegment(0,1,1,1,255,1,1,1);<br>
<br>
vtkPiecewiseFunction* opacityFun=vtkPiecewiseFunction::New();<br>
opacityFun->AddSegment(-3024,0,1694,1);<br>
<br>
vtkVolumeProperty* volumeProperty=vtkVolumeProperty::New();<br>
volumeProperty->SetColor(colorTransforFunction);<br>
volumeProperty->SetScalarOpacity(opacityFun);<br>
volumeProperty->SetInterpolationTypeToLinear();<br>
<br>
vtkGPUVolumeRayCastMapper* mapper=vtkGPUVolumeRayCastMapper::New();<br>
mapper->SetInput(reader->GetOutput());<br>
mapper->SetBlendModeToMaximumIntensity();<br>
mapper->Update();<br>
<br>
vtkVolume* volume=vtkVolume::New();<br>
volume->SetMapper(mapper);<br>
volume->SetProperty(volumeProperty);<br>
<br>
renderer->AddVolume(volume);<br>
<br>
<br>
<br>
renWin->Render();<br>
<br>
<br>
vtkX3DExporter *exporter = vtkX3DExporter::New();<br>
exporter->SetInput(renWin);<br>
exporter->SetFileName("testX3DExporter.x3d");<br>
exporter->Update();<br>
exporter->Write();<br>
<br>
iren->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>