<div dir="ltr">You are not using the correct mapper and I think your pipeline is also wrong (correct me if I am wrong).<br><br>Have a look at the example at this link  <a href="http://www.cmake.org/Wiki/VTK/Examples/Cxx/VolumeRendering/MinIntensityRendering">http://www.cmake.org/Wiki/VTK/Examples/Cxx/VolumeRendering/MinIntensityRendering</a><br>
<br>Jothy<br><br><div class="gmail_quote">On Tue, Nov 30, 2010 at 9:06 PM, <a href="mailto:ankit.master@gmail.com">ankit.master@gmail.com</a> <span dir="ltr">&lt;<a href="mailto:ankit.master@gmail.com">ankit.master@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
Hello ,<br>
<br>
Kindly pardon my question here. I know this has been asked several times in<br>
the past and yet ask it again. I am trying to read dicom files and view it<br>
interactively using windowInteractor. My ulitmate goal is to be able to pump<br>
this image through the volume rendering algorithm.<br>
<br>
However, when I run the following script (python script), I only get to see<br>
one slice as opposed to the entire volume. Could<br>
someone please help me trouble shoot this.<br>
<br>
<br>
#! /usr/bin/env python<br>
<br>
import vtk as v<br>
from vtk.libvtkGraphicsPython import*<br>
from vtk.libvtkCommonPython import*<br>
<br>
reader=v.vtkDICOMImageReader()<br>
reader.SetDirectoryName(&#39;$DICOM DIR&#39;)<br>
reader.Update()<br>
<br>
slope=1<br>
shift=0<br>
<br>
shifter=v.vtkImageShiftScale()<br>
shifter.SetShift(shift)<br>
shifter.SetScale(slope)<br>
shifter.SetOutputScalarTypeToUnsignedChar()<br>
shifter.SetInput(reader.GetOutput())<br>
shifter.Update()<br>
<br>
voxeldata=v.vtkImageData()<br>
voxeldata=shifter.GetOutput()<br>
voxeldata.AllocateScalars()<br>
<br>
<br>
actor=v.vtkImageActor()<br>
actor.SetInput(voxeldata)<br>
<br>
ren=v.vtkRenderer()<br>
renWin = v.vtkRenderWindow()<br>
renWin.AddRenderer(ren)<br>
renWin.SetSize(300,300)<br>
<br>
iren = v.vtkRenderWindowInteractor()<br>
iren.SetRenderWindow(renWin)<br>
ren.AddActor(actor)<br>
iren.Initialize()<br>
iren.Start()<br>
<br>
Thank you<br>
Sincerely,<br>
Ankit<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/help-with-reading-dicom-files-as-a-volume-and-rendering-it-in-vtk-tp3286769p3286769.html" target="_blank">http://vtk.1045678.n5.nabble.com/help-with-reading-dicom-files-as-a-volume-and-rendering-it-in-vtk-tp3286769p3286769.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>