[vtkusers] Problem of ScalarType after using vtkImageMathematics

Amy Squillacote amy.squillacote at kitware.com
Wed Aug 22 13:03:11 EDT 2007


Hi Alfredo,

Try using vtkImageShiftScale rather than vtkImageCast. It will allow you 
to put the data in the correct range for the output scalar type.

- Amy

Aldredo Gourbish wrote:
> Hi everybody !
>
> I've got a problem after using vtkImageMathematics in order to subtract 2 vtk volumes.
> In fact, the result is quiet good when I render it with vtkOpenGLVolumeTextureMapper3D which supports short ScalarType.
> But when I render the result with vtkOpenGLVolumeTextureMapper2D, it is bad since this mapper only supports UnsignedShort or UnsignedChar ScalarType, and the volume is all white.
> I saw that in fact the ScalarRange of the vtkImageMathematics result is (-15, 35), so I think there is a problem of ScalarRange for vtkOpenGLVolumeTextureMapper2D. I tried to use a vtkImageCast in order to cast the ScalarType to UnsignedShort but there is always the problem.
>
> I hope you understand my problem, and somebody has an idea. I spend a long time searching a solution but with no results !
>
> Thanks in advance,
>
> Alfredo.
>
> ------------------------ ALICE C'EST ENCORE MIEUX AVEC CANAL+ LE BOUQUET ! ---------------
> Découvrez vite l'offre exclusive ALICEBOX et CANAL+ LE BOUQUET, en cliquant ici http://alicebox.fr
> Soumis à conditions.
>
>
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>   

-- 
Amy Squillacote
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
Phone: (518) 371-3971 x106




More information about the vtkusers mailing list