[vtkusers] vtkDICOMImageReader and vtkImageShiftScale

Alex Duţu alex.dutu at gmail.com
Tue Jun 23 08:45:49 EDT 2009


I got this working, seems like I had
"VolumeMapper->SetInput(dicomReader->GetOutput());" line after
VolumeMapper->SetInput(scale->GetOutput()); line.

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.

How can I get the correct scaling so that the colors are rendered correctly?

Best Regards,
Alex

On Tue, Jun 23, 2009 at 2:55 PM, Alex Duţu <alex.dutu at gmail.com> wrote:

> Hi everyone,
>
> 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:
>
>
>>    vtkDICOMImageReader *dicomReader = vtkDICOMImageReader::New();
>>     dicomReader->SetDirectoryName("D:/images/MANIX/CER-CT/ANGIO CT");
>>     dicomReader->Update();
>>
>>     vtkImageShiftScale *scale = vtkImageShiftScale::New();
>>     scale->SetInput(dicomReader->GetOutput());
>>     scale->SetOutputScalarTypeToUnsignedShort();
>>
>>     vtkVolumeRayCastMapper *VolumeMapper =
>> vtkVolumeRayCastMapper::New();
>>     VolumeMapper->SetBlendModeToComposite();
>>     VolumeMapper->SetInput(scale->GetOutput());
>
>
> Can anybody help me?
>
> Thanks in advance,
> Alex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090623/0c923db1/attachment.htm>


More information about the vtkusers mailing list