I got this working, seems like I had "VolumeMapper->SetInput(dicomReader->GetOutput());" line after VolumeMapper->SetInput(scale->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's why everything is white. I have used before vtkFixedPointRayCastVolumeMapper, and I didn'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"><<a href="mailto:alex.dutu@gmail.com">alex.dutu@gmail.com</a>></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'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->SetDirectoryName("D:/images/MANIX/CER-CT/ANGIO CT");<br>
dicomReader->Update();<br><br> vtkImageShiftScale *scale = vtkImageShiftScale::New();<br> scale->SetInput(dicomReader->GetOutput());<br> scale->SetOutputScalarTypeToUnsignedShort();<br><br> vtkVolumeRayCastMapper *VolumeMapper = vtkVolumeRayCastMapper::New(); <br>
VolumeMapper->SetBlendModeToComposite();<br> VolumeMapper->SetInput(scale->GetOutput());</blockquote><div><br>Can anybody help me?<br><br>Thanks in advance,<br>Alex <br></div>
</blockquote></div><br>