I got this working, seems like I had &quot;VolumeMapper-&gt;SetInput(dicomReader-&gt;GetOutput());&quot; line after VolumeMapper-&gt;SetInput(scale-&gt;GetOutput()); line.<br><br>Now that everything renders I have another problem, all my volume is white, I guess that all the  scalars in the volume exceed unsigned short max limit so all my scalars are that value (65536), so that&#39;s why everything is white. I have used before vtkFixedPointRayCastVolumeMapper, and I didn&#39;t had this problem.  <br>
<br>How can I get the correct scaling so that the colors are rendered correctly?<br><br>Best Regards,<br>Alex<br><br><div class="gmail_quote">On Tue, Jun 23, 2009 at 2:55 PM, Alex Duţu <span dir="ltr">&lt;<a href="mailto:alex.dutu@gmail.com">alex.dutu@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi everyone,<br><br>I&#39;ve seen that many of you had problems with volumeRayCastMapper because it supports just unsigned char and unsigned short (vtkVolumeRayCastMapper (025D0198): Cannot volume render data of type short, only unsigned char or unsigned short.). I have the same problem so I used vtkImageShiftScale, but the problem is still there. My code looks like this:<br>

<div> </div><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">   vtkDICOMImageReader *dicomReader = vtkDICOMImageReader::New();<br>    dicomReader-&gt;SetDirectoryName(&quot;D:/images/MANIX/CER-CT/ANGIO CT&quot;);<br>

    dicomReader-&gt;Update();<br><br>    vtkImageShiftScale *scale = vtkImageShiftScale::New();<br>    scale-&gt;SetInput(dicomReader-&gt;GetOutput());<br>    scale-&gt;SetOutputScalarTypeToUnsignedShort();<br><br>    vtkVolumeRayCastMapper *VolumeMapper = vtkVolumeRayCastMapper::New();   <br>

    VolumeMapper-&gt;SetBlendModeToComposite();<br>    VolumeMapper-&gt;SetInput(scale-&gt;GetOutput());</blockquote><div><br>Can anybody help me?<br><br>Thanks in advance,<br>Alex <br></div>
</blockquote></div><br>